/*
Theme Name: Farruniq
Author: Farrukh Azeem
Description: Online store
Version: 1.0.0
Text Domain: farruniq
*/

/* ========================================
   1. GLOBAL FONT SETTINGS
======================================== */

:root {
  --font-family: "Assistant", sans-serif;

  --body-size: 18px;
  --body-weight: 400;
  --body-line-height: 1.65;

  --heading-weight: 700;
  --heading-line-height: 1.2;
  --heading-spacing: -0.025em;

  --text-color: #252825;
  --page-background: #f8f6f1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text-color);
  background: var(--page-background);
  font-family: var(--font-family);
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: var(--body-line-height);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   2. HEADINGS AND PARAGRAPHS
======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 16px;
  font-family: var(--font-family);
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
  letter-spacing: var(--heading-spacing);
}

h1 { font-size: 54px; }
h2 { font-size: 36px; }
h3 { font-size: 30px; }
h4 { font-size: 24px; }
h5 { font-size: 20px; }
h6 { font-size: 18px; }

p {
  margin: 0 0 20px;
  font-weight: var(--body-weight);
}

strong,
b {
  font-weight: 700;
}

/* ========================================
   3. MAIN CONTENT
======================================== */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ========================================
   4. HEADER AND ACCESSIBILITY
======================================== */

.fh {
  position: relative;
  font-family: var(--font-family);
}

.fh-sr,
.fh-skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.fh-skip:focus {
  position: fixed;
  top: 45px;
  left: 15px;
  z-index: 99999;
  padding: 12px 18px;
  color: #111;
  background: #fff;
}

/* ========================================
   5. HEADER MAIN ROW
======================================== */

.fh-main {
  color: var(--fh-text);
  background: var(--fh-bg);
  border-bottom: 1px solid var(--fh-border);
}

.fh-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  max-width: var(--fh-width);
  min-height: var(--fh-row_height);
  margin: 0 auto;
  padding: var(--fh-row_padding) 24px;
}

/* ========================================
   6. LOGO AND SITE NAME
======================================== */

.fh-brand {
  flex: 0 1 auto;
  min-width: 0;
}

.fh-name {
  display: inline-block;
  color: inherit;
  font-family: var(--font-family);
  font-size: var(--fh-name_size);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.fh-brand .custom-logo-link {
  display: block;
  line-height: 0;
}

.fh-brand .custom-logo {
  display: block;
  width: auto;
  max-width: min(var(--fh-logo_width), 100%);
  height: auto;
}

/* ========================================
   7. PRODUCT SEARCH
======================================== */

.fh-search {
  display: flex;
  flex: 1 1 300px;
  max-width: var(--fh-search_width);
  min-width: 0;
  height: var(--fh-search_height);
  margin: 0 auto;
  border: 1px solid var(--fh-text);
  border-radius: var(--fh-radius);
  background: var(--fh-search_bg);
  overflow: hidden;
}

.fh-search:focus-within {
  outline: 2px solid var(--fh-accent);
  outline-offset: 3px;
}

.fh-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  outline: none;
  color: var(--fh-search_fg);
  background: transparent;
  font-family: var(--font-family);
  font-size: var(--fh-search_size);
  font-weight: 400;
}

.fh-search input::placeholder {
  color: var(--fh-search_fg);
  opacity: 0.65;
}

.fh-search button {
  display: grid;
  place-items: center;
  flex: 0 0 60px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--fh-button_fg);
  background: var(--fh-button_bg);
  cursor: pointer;
  transition: filter 180ms ease;
}

.fh-search button:hover {
  filter: brightness(0.85);
}

.fh-search button svg {
  width: 24px;
  height: 24px;
}

/* Live-search typography.
   Dropdown layout is supplied by live-search.php. */
.fh-live-results,
.fh-live-link,
.fh-live-status {
  font-family: var(--font-family);
}

/* ========================================
   8. WISHLIST, ACCOUNT AND CART
======================================== */

.fh-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--fh-icon_gap);
  margin-left: auto;
}

.fh-action {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: max(44px, calc(var(--fh-icon_size) + 16px));
  height: max(44px, calc(var(--fh-icon_size) + 16px));
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--fh-text);
  text-decoration: none;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.fh-action svg {
  width: var(--fh-icon_size);
  height: var(--fh-icon_size);
}

.fh-disabled {
  opacity: 0.55;
  cursor: default;
}

/* ========================================
   9. MENU ROW
======================================== */

.fh-nav {
  background: var(--fh-nav_bg);
  border-bottom: 1px solid var(--fh-border);
}

.fh-nav-inner {
  max-width: var(--fh-width);
  margin: 0 auto;
  padding: 0 24px;
}

.fh-menu,
.fh-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fh-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: var(--fh-align);
  gap: 0 var(--fh-menu_gap);
}

.fh-menu li {
  position: relative;
}

.fh-menu a {
  position: relative;
  display: block;
  padding: var(--fh-menu_padding) 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--fh-nav_text);
  font-family: var(--font-family);
  font-size: var(--fh-menu_size);
  font-weight: var(--fh-menu-weight);
  line-height: 1.4;
  letter-spacing: normal;
  text-decoration: none;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

/* Current page */
.fh-menu .current-menu-item > a,
.fh-menu .current-menu-ancestor > a {
  color: var(--fh-accent);
  background: var(--fh-hover_bg);
  box-shadow: inset 0 -2px 0 var(--fh-accent);
}

/* Dropdown */
.fh-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--fh-border);
  border-radius: 8px;
  background: var(--fh-nav_bg);
  box-shadow: 0 12px 28px rgb(0 0 0 / 10%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.fh-menu > li:last-child .sub-menu {
  right: 0;
  left: auto;
}

.fh-menu li:hover > .sub-menu,
.fh-menu li:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.fh-menu .sub-menu a {
  padding: 12px;
  overflow-wrap: anywhere;
}

.fh-menu-toggle {
  display: none;
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  color: var(--fh-nav_text);
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ========================================
   10. FIVE HOVER EFFECTS
======================================== */

/* 1. Underline */
.fh[data-effect="underline"] .fh-menu a::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 6px;
  left: 14px;
  height: 2px;
  background: var(--fh-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.fh[data-effect="underline"] .fh-menu a:hover::after {
  transform: scaleX(1);
}

.fh[data-effect="underline"] a.fh-action:hover {
  color: var(--fh-accent);
  box-shadow: inset 0 -2px 0 var(--fh-accent);
}

/* 2. Background */
.fh[data-effect="background"] .fh-menu a:hover,
.fh[data-effect="background"] a.fh-action:hover {
  color: var(--fh-accent);
  background: var(--fh-hover_bg);
}

/* 3. Lift */
.fh[data-effect="lift"] .fh-menu a:hover,
.fh[data-effect="lift"] a.fh-action:hover {
  color: var(--fh-accent);
  background: var(--fh-hover_bg);
  transform: translateY(-3px);
}

/* 4. Outline */
.fh[data-effect="outline"] .fh-menu a:hover,
.fh[data-effect="outline"] a.fh-action:hover {
  color: var(--fh-accent);
  border-color: var(--fh-accent);
}

/* 5. Soft shadow */
.fh[data-effect="shadow"] .fh-menu a:hover,
.fh[data-effect="shadow"] a.fh-action:hover {
  color: var(--fh-accent);
  background: var(--fh-hover_bg);
  box-shadow: 0 5px 15px rgb(0 0 0 / 12%);
}

/* Press / click */
.fh .fh-menu a:active,
.fh a.fh-action:active,
.fh .fh-search button:active {
  transform: scale(0.97);
}

/* Keyboard focus */
.fh a:focus-visible,
.fh button:focus-visible {
  outline: 2px solid var(--fh-accent);
  outline-offset: 3px;
}

/* ========================================
   11. ANNOUNCEMENT FONT
======================================== */

/* Layout and controls remain in announcement-bar.php. */
.farruniq-ab {
  font-family: var(--font-family);
}

/* ========================================
   12. FOOTER
======================================== */

.site-footer {
  padding: 20px;
  border-top: 1px solid #ddd;
  background: #fff;
  text-align: center;
  font-family: var(--font-family);
}

.site-footer p {
  margin: 0;
  font-weight: 400;
}

/* ========================================
   13. MOBILE HEADER
======================================== */

@media (max-width: 800px) {
  .fh-inner {
    flex-wrap: wrap;
    gap: 16px;
    padding: var(--fh-row_padding) 16px;
  }

  .fh-brand {
    flex: 1;
  }

  .fh-name {
    font-size: min(var(--fh-name_size), 28px);
  }

  .fh-brand .custom-logo {
    max-width: min(var(--fh-logo_width), 160px);
  }

  .fh-search {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
  }

  .fh-actions {
    gap: min(var(--fh-icon_gap), 8px);
  }

  .fh-nav-inner {
    padding: 0 16px;
  }

  .fh-menu {
    display: block;
    padding-bottom: 10px;
  }

  .fh-has-js .fh-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .fh-has-js .fh-menu {
    display: none;
  }

  .fh-has-js .fh-menu.is-open {
    display: block;
  }

  .fh-menu .sub-menu {
    position: static;
    width: auto;
    margin-left: 14px;
    border: 0;
    border-left: 1px solid var(--fh-border);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .fh-menu a {
    padding: 12px;
  }
}

/* ========================================
   14. MOBILE TYPOGRAPHY
======================================== */

@media (max-width: 600px) {
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  h3 { font-size: 26px; }
  h4 { font-size: 22px; }

  main {
    padding: 30px 16px;
  }
}

/* ========================================
   15. REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
  .fh-menu a,
  .fh-menu a::after,
  .fh-action,
  .fh-search button,
  .fh-menu .sub-menu {
    transition: none;
  }

  .fh[data-effect="lift"] .fh-menu a:hover,
  .fh[data-effect="lift"] a.fh-action:hover {
    transform: none;
  }
}