/* ============================================================
   VACATION BANNER
   ============================================================ */

.vacation-banner {
  background-color: #fef3c7;
  border-bottom: 1px solid #fde68a;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  max-height: 200px;
  transition: max-height 0.35s ease, padding 0.35s ease, border 0.35s ease, opacity 0.3s ease;
}

.vacation-banner.is-hiding {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  opacity: 0;
}

.vacation-banner__text {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
  margin: 0;
  line-height: 1.5;
}

.vacation-banner__close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #92400e;
  font-size: 16px;
  padding: 4px 6px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.vacation-banner__close:hover {
  opacity: 1;
}

/* ============================================================
   SITE HEADER — Mobile First
   ============================================================ */

.site-header {
    padding-top: 0;
    padding-bottom: 0;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
      margin-bottom: 32px !important;
}

/* ---- Banner contact ---- */
.banner-contact {
  background-color: #8C0F20;
}
.banner-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.banner-phone i { font-size: 13px; }
.banner-phone:hover { color: #ffffff; opacity: .9; }

/* ---- Header main row ---- */

.header-main {
  flex-direction: column;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

/* Logo */
.header-logo { flex: 0 0 auto; }
.header-logo img,
.header-logo .custom-logo {
    max-height: 72px;
    height: auto;
    width: auto !important;
    display: block;
}

.woocommerce-active .site-header .site-branding {
  float: none;
  width: auto;
  margin-bottom: 0;
}

.site-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2; }
.site-title a { color: #222222; }
.site-title a:hover { color: #8C0F20; }
.site-description { display: none; }

/* Search — hidden on mobile */
.header-search { display: none; }

/* Actions row */
.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* Shared icon button style */
.search-toggle,
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #333333;
  border-radius: 8px;
  font-size: 28px;
  transition: background-color .2s, color .2s;
}
.search-toggle:hover { background-color: #f5f5f5; color: #8C0F20; }
.search-toggle.active { color: #8C0F20; }

/* Account icon */
.header-account {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  color: #333333;
  text-decoration: none;
  border-radius: 8px;
  font-size: 28px;
  transition: background-color .2s, color .2s;
}
.header-account:hover { background-color: #f5f5f5; color: #8C0F20; }
.account-label { display: none; font-size: 14px; font-weight: 500; }

/* Nav toggle — FA icon swap */
.nav-toggle { font-size: 28px; color: #333333; }
.nav-toggle:hover { background-color: #f5f5f5; }
.nav-toggle .nav-icon-close { display: none; }
.nav-toggle.active .nav-icon-open { display: none; }
.nav-toggle.active .nav-icon-close { display: block; }

.site-header-cart .cart-contents::after {
  -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        display: inline-block;
        font-style: normal;
        font-variant: normal;
        font-weight: normal;
        line-height: 1;
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        line-height: inherit;
        vertical-align: baseline;
        content: "";
        height: 1em;
        float: right;
        line-height: 1.618;
        font-size: 28px;
}


/* ---- Cart (Storefront) ---- */
.woocommerce-active .site-header .header-actions .site-header-cart {
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 0;
}

.woocommerce-active .site-header .header-actions .site-header-cart li:first-child
{
  margin: 0;
}

.site-header-cart .cart-contents {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  color: #333333;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  transition: background-color .2s, color .2s;
  white-space: nowrap;
  display: flex !important;
  flex-direction: row-reverse;
}

.header-main .site-header-cart .cart-contents::after{
  float:none;
  height: auto;
}


.site-header-cart .cart-contents:hover { background-color: #f5f5f5; color: #8C0F20; }
.site-header-cart .cart-contents .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background-color: #8C0F20;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  line-height: 1;
}

/* Hide price on mobile */
.site-header-cart .cart-contents .woocommerce-Price-amount { display: none; }
/* Mini-cart dropdown — let Storefront JS control visibility, fix positioning */
.site-header-cart .widget_shopping_cart {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 9999;
  width: 300px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 16px;
  display: none;
}
.site-header-cart:hover .widget_shopping_cart,
.site-header-cart.focus .widget_shopping_cart {
    width: 350px;
    left: -290px !important;
    display: block;
 }

/* ---- Search bar (mobile: full-width row; desktop: flex-1 inline) ---- */
.header-search-drawer {
  width: 100%;
  background: #ffffff;
}

/* Cancel nested col-full padding — header-main already carries outer padding */
.header-search-drawer > .col-full {
  padding: 0;
  max-width: none;
}

/* Form layout */
.header-search-drawer .woocommerce-product-search {
  display: flex;
  width: 80%;
  margin: auto;
  padding: 8px 0;
}

/* Input */
.header-search-drawer .search-field {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #dddddd;
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 14px;
  outline: none;
  background: #f9f9f9;
}
.header-search-drawer .search-field:focus {
  border-color: #8C0F20;
  background: #ffffff;
}

/* Submit button */
.header-search-drawer button[type="submit"] {
  flex-shrink: 0;
  padding: 10px 16px;
  background: #8C0F20;
  color: #ffffff;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color .2s;
  line-height: 1;
}
.header-search-drawer button[type="submit"]:hover { background: #6b0a0a; }

/* ---- Storefront primary navigation — mobile ---- */
/* Hide Storefront's own toggle button (folosim propriul .nav-toggle) */
.main-navigation .menu-toggle,
#site-navigation .menu-toggle,
#site-navigation-menu-toggle { display: none !important; }

/* Nav wrapper vizibil pe mobile — conține meniul */
.storefront-primary-navigation { display: block; }

/* handheld-navigation — ascuns implicit, apare sub header când .toggled */
.handheld-navigation {
  display: none;
  background: #ffffff;
  border-top: 1px solid #eeeeee;
}

/* Nav items */
.handheld-navigation ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.handheld-navigation ul li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid #f2f2f2;
}
.handheld-navigation ul li:last-child { border-bottom: none; }

/* Linkul crește să ocupe toată linia, butonul rămâne fix la dreapta */
.handheld-navigation ul li > a {
  flex: 1;
  min-width: 0;
  display: block;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 500;
  color: #222222;
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
.handheld-navigation ul li > a:hover { color: #8C0F20; background-color: #fef9f9; }
.handheld-navigation ul li.current-menu-item > a { color: #8C0F20; }

/* Butonul dropdown — static în flow, nu mai e absolut */
.handheld-navigation .dropdown-toggle {
  flex-shrink: 0;
  width: 44px;
  height: 48px;
  background: none;
  border: none;
  border-left: 1px solid #f0f0f0;
  cursor: pointer;
  color: #666666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background-color .2s, color .2s;
}
.handheld-navigation .dropdown-toggle:hover { background: #f5f5f5; color: #8C0F20; }
.handheld-navigation .dropdown-toggle::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  transition: transform .25s ease;
}
.handheld-navigation .dropdown-toggle.toggled-on::after { transform: rotate(180deg); }

/* Sub-menu — width: 100% ca să ocupe rândul întreg în flex container */
.handheld-navigation .sub-menu {
  display: none !important;
  flex-basis: 100%;
  background-color: #fafafa;
  border-top: 1px solid #f0f0f0;
}
.handheld-navigation .sub-menu.toggled-on { display: block !important; }
.handheld-navigation .sub-menu li { border-bottom: 1px solid #eeeeee; }
.handheld-navigation .sub-menu li:last-child { border-bottom: none; }
.handheld-navigation .sub-menu li > a {
  padding: 12px 20px 12px 36px;
  font-size: 15px;
  font-weight: 400;
}

/* primary-navigation hidden on mobile */
.main-navigation .primary-navigation { display: none; }
  #page .storefront-breadcrumb {
    margin: 0;
    padding: 0 16px;
  }

/* ============================================================
   MOBILE (< 768px)
   ============================================================ */
@media (max-width: 767px) {

  /* Arată handheld-navigation (cu sub-menu buttons de la Storefront JS) când e toggled */
  .main-navigation.toggled .handheld-navigation { display: block !important; }

  /* Primary nav ascuns pe mobile întotdeauna */
  .main-navigation .primary-navigation { display: none !important; }

  .storefront-primary-navigation .col-full { padding-top: 0; padding-bottom: 0; }

  #page .storefront-breadcrumb {
    margin: 0;
  }

   body .site-main .storefront-sorting {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
   }

   .site-header-cart .cart-contents .count{
        min-width: 28px;
        height: 28px;
        font-size: 14px;
   }

}

/* ============================================================
   DESKTOP (≥ 768px)
   ============================================================ */
@media (min-width: 768px) {

  .site-header-cart .cart-contents::after {
    font-size: 18px;
  }

  .header-main {
        padding: 12px 0 12px 0;
        gap: 0;
        flex-direction: row;
  }

   .header-main .header-logo

  #page .storefront-breadcrumb {
    margin: 0;
    }

  /* Search bar: flex-1 between logo and actions on desktop */
  .header-search-drawer {
    flex: 1;
    min-width: 0;
    width: auto;
  }
  .header-search-drawer .woocommerce-product-search {
    padding: 0;
  }

  /* Hide mobile-only elements */
  .search-toggle { display: none; }
  .nav-toggle { display: none; }
  .nav-overlay { display: none !important; }

  .header-account,
  .nav-toggle{
    font-size: 18px;
  }

  /* Show account label */
  .account-label { display: inline; font-size: 13px; }
  .header-actions { gap: 10px; }

  /* Show cart price on desktop */
  .site-header-cart .cart-contents .woocommerce-Price-amount {
    display: inline;
    font-size: 13px;
    font-weight: 600;
  }
  .site-header-cart .cart-contents { font-size: 16px; padding: 8px 12px; }
  /* Mini-cart dropdown inner styling */
  .site-header-cart .widget_shopping_cart .cart_list { list-style: none; margin: 0 0 12px; padding: 0;
          max-height: 500px;
        overflow: overlay;}
  .site-header-cart .widget_shopping_cart .cart_list li {
     padding: 8px 0; border-bottom: 1px solid #f2f2f2; font-size: 13px;
    width:90%;
    }
    .site-header-cart .widget_shopping_cart .product_list_widget img
    {
      width: 90px !important;
      max-width: 90px !important;
      height: 90px !important;
    }

    .main-navigation ul li, .secondary-navigation ul li {
      margin-bottom: 0 !important;
    }
  .site-header-cart .widget_shopping_cart .total { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
  .site-header-cart .widget_shopping_cart .buttons { display: flex; flex-direction: column; gap: 8px; }
  .site-header-cart .widget_shopping_cart .buttons a { text-align: center; padding: 9px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; }
  .site-header-cart .widget_shopping_cart .buttons .wc-forward { background: #8C0F20; color: #fff; }
  .site-header-cart .widget_shopping_cart .buttons .checkout { background: #222; color: #fff; }

  /* Desktop nav bar */
  .storefront-primary-navigation {
    display: block;
    background-color: #8C0F20;
  }
  .storefront-primary-navigation .col-full { padding-top: 0; padding-bottom: 0; }

  /* Hide mobile handheld nav */
  .handheld-navigation { display: none !important; }
  .main-navigation .primary-navigation { display: block; }

  /* Primary nav layout */
  .primary-navigation ul.nav-menu,
  .primary-navigation div.menu > ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
  }
  .primary-navigation ul.nav-menu > li > a {
    display: block;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s;
  }
  .primary-navigation ul.nav-menu > li > a:hover,
  .primary-navigation ul.nav-menu > li.current-menu-item > a,
  .primary-navigation ul.nav-menu > li.current-menu-ancestor > a {
    background-color: rgba(0,0,0,.2);
  }

  /* Desktop dropdowns */
  .primary-navigation .menu-item-has-children { position: relative; }
  .primary-navigation .menu-item-has-children > .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    z-index: 800;
  }
  .primary-navigation .menu-item-has-children:hover > .sub-menu { display: block; }
  .primary-navigation .sub-menu li { border-bottom: 1px solid #f2f2f2; }
  .primary-navigation .sub-menu li:last-child { border-bottom: none; }
  .primary-navigation .sub-menu a {
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #222222;
    display: block;
    white-space: nowrap;
    transition: color .2s, background-color .2s;
    width:auto;
  }
  .primary-navigation .sub-menu a:hover { color: #8C0F20; background-color: #fef9f9; }

  .woocommerce-active .site-header .main-navigation { float: none; width: auto; }
}

/* ============================================================
   LARGE DESKTOP (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {

  .header-logo img,
  .header-logo .custom-logo { max-height: 60px; }
  .primary-navigation ul.nav-menu > li > a { padding: 13px 18px; font-size: 15px; }
  .site-description { display: block; font-size: 13px; color: #666666; margin: 2px 0 0; }
}

.primary-navigation ul.nav-menu > li > a:hover, .primary-navigation ul.nav-menu > li.current-menu-item > a, .primary-navigation ul.nav-menu > li.current-menu-ancestor > a {
  color: #ffffff;
}
