/* ============================================================
   ParkingBox — Header Redesign (minimal & clean)
   Targets Astra header-main-layout-1 (#masthead)
   ============================================================ */

/* --- 1. HEADER SHELL: fundal negru, fără sticky --- */
#masthead.site-header {
    background: #0d0d0d !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    position: static !important;
    top: auto !important;
}

#masthead .ast-primary-header-bar,
#masthead .main-header-bar {
    background: #0d0d0d !important;
    border-bottom: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}

#masthead .site-primary-header-wrap {
    padding: 0 !important;
}

#masthead .ast-builder-grid-row,
#masthead .ast-builder-grid-row.ast-grid-center-col-layout {
    /* logo | menu | cart+cta */
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    column-gap: 22px !important;
    align-items: center !important;
    min-height: 84px;
    padding: 14px 0 !important;
}

/* --- 2. SECȚIUNI: lăsăm grid-ul să distribuie spațiul, fără fix-width pe right --- */
#masthead .site-header-primary-section-left,
#masthead .site-header-primary-section-center,
#masthead .site-header-primary-section-right {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

#masthead .site-header-primary-section-left {
    justify-content: flex-start !important;
}

#masthead .site-header-primary-section-center {
    justify-content: flex-start !important;
}

#masthead .site-header-primary-section-right {
    justify-content: flex-end !important;
    gap: 20px;
}

/* spacer-ele inutile dintre elemente — le neutralizăm */
#masthead .site-header-primary-section-left-center,
#masthead .site-header-primary-section-right-center {
    display: none !important;
}

/* --- 3. LOGO: dimensiune fixă, fără pad extra --- */
#masthead .site-branding {
    padding: 0 !important;
    line-height: 0;
}

#masthead .site-branding .custom-logo,
#masthead .site-branding .site-logo-img img {
    width: auto !important;
    height: 46px !important;
    max-height: 46px !important;
    max-width: none !important;
    display: block;
}

/* --- 4. MENIU: tipografie minimală, spațiu generos --- */
#masthead .ast-builder-menu-1,
#masthead .ast-main-header-bar-alignment,
#masthead .main-header-bar-navigation,
#masthead .site-navigation,
#masthead .main-navigation {
    height: auto !important;
    min-height: 0 !important;
    width: auto !important;
    margin-left: 0 !important;
}

#masthead .main-header-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px;
    box-shadow: none !important;
    background: transparent !important;
}

#masthead .site-header-primary-section-center .ast-builder-layout-element,
#masthead .site-header-primary-section-center .ast-builder-menu,
#masthead .site-header-primary-section-center .ast-main-header-bar-alignment {
    margin-left: 0 !important;
    justify-content: flex-start !important;
}

#masthead .main-header-menu > li {
    line-height: 1 !important;
    position: relative;
}

#masthead .main-header-menu > li > a {
    display: inline-flex !important;
    align-items: center;
    height: 36px;
    padding: 0 12px !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase;
    white-space: nowrap !important;
    color: #ffffff !important;
    transition: color 0.2s ease;
    line-height: 1 !important;
}

#masthead .main-header-menu > li > a:hover,
#masthead .main-header-menu > li.current-menu-item > a,
#masthead .main-header-menu > li.current-menu-ancestor > a {
    color: #c8a25b !important;
}

#masthead .main-header-menu .sub-menu {
    min-width: 250px !important;
    width: max-content !important;
    max-width: 320px;
    padding: 8px !important;
    margin-top: 10px !important;
    background: #111111 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 6px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32) !important;
    left: 0 !important;
    right: auto !important;
    text-align: left !important;
}

#masthead .main-header-menu .sub-menu,
#masthead .main-header-menu .sub-menu .menu-item,
#masthead .main-header-menu .sub-menu .menu-item:hover,
#masthead .main-header-menu .sub-menu .menu-item.focus {
    background-color: #111111 !important;
}

#masthead .main-header-menu .sub-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 24px;
    width: 12px;
    height: 12px;
    background: #111111;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    transform: rotate(45deg);
}

#masthead .main-header-menu .sub-menu li {
    display: block !important;
    width: 100% !important;
    line-height: 1.2 !important;
}

#masthead .main-header-menu .sub-menu a,
#masthead .main-header-menu .sub-menu .menu-link {
    display: flex !important;
    align-items: center;
    width: 100% !important;
    min-height: 38px;
    padding: 10px 12px !important;
    color: #ffffff !important;
    background: transparent !important;
    border-radius: 4px;
    font-size: 13px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    line-height: 1.25 !important;
    text-transform: none;
    white-space: normal !important;
    border: 0 !important;
}

#masthead .main-header-menu .sub-menu a:hover,
#masthead .main-header-menu .sub-menu .menu-link:hover,
#masthead .main-header-menu .sub-menu .current-menu-item > a {
    color: #0d0d0d !important;
    background: #c8a25b !important;
}

/* --- 5. COȘ: forțăm orizontal, fără rupere verticală --- */
#masthead .ast-header-woo-cart {
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
}

#masthead .ast-site-header-cart {
    height: auto !important;
    border: 0 !important;
    padding: 0 !important;
}

#masthead .ast-site-header-cart-li {
    height: auto !important;
    list-style: none;
    margin: 0;
    padding: 0;
}

#masthead .ast-site-header-cart .cart-container {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    white-space: nowrap !important;
    height: auto !important;
    padding: 8px 4px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    text-decoration: none;
    line-height: 1 !important;
}

#masthead .ast-site-header-cart .cart-container:hover {
    color: #c8a25b !important;
}

/* Asigur că wrapper-ul interior + textul + iconița sunt vizibile pe negru */
#masthead .ast-site-header-cart .ast-addon-cart-wrap {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 8px !important;
    color: #ffffff !important;
}

#masthead .ast-site-header-cart .ast-woo-header-cart-info-wrap,
#masthead .ast-site-header-cart .ast-woo-header-cart-total {
    color: #ffffff !important;
    font-size: 13px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

#masthead .ast-site-header-cart .ast-icon,
#masthead .ast-site-header-cart .astra-icon,
#masthead .ast-site-header-cart .icon-basket,
#masthead .ast-site-header-cart .icon-shopping-cart,
#masthead .ast-site-header-cart i {
    color: #ffffff !important;
    fill: #ffffff !important;
    font-size: 18px !important;
}

#masthead .ast-site-header-cart .ast-icon svg,
#masthead .ast-site-header-cart .astra-icon svg,
#masthead .ast-site-header-cart svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    width: 18px !important;
    height: 18px !important;
}

/* Bubble cu count produse — vizibil pe negru */
#masthead .ast-site-header-cart .ast-cart-menu-wrap .count,
#masthead .ast-site-header-cart .ast-woo-cart-count {
    background: #c8a25b !important;
    color: #0d0d0d !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 10px;
    line-height: 1;
}

#masthead .ast-site-header-cart .ast-cart-menu-wrap {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
}

#masthead .ast-site-header-cart .ast-cart-menu-wrap svg,
#masthead .ast-site-header-cart .ast-cart-menu-wrap .ast-icon {
    width: 18px !important;
    height: 18px !important;
}

#masthead .ast-site-header-cart .cart-container .ast-woo-header-cart-info-wrap,
#masthead .ast-site-header-cart .cart-container .amount {
    display: inline-block !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
    line-height: 1 !important;
}

/* --- 6. BUTON CTA "Solicită Ofertă": pill solid, nowrap --- */
#masthead .ast-builder-layout-element.ast-flex {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
}

#masthead .ast-builder-button-wrap {
    width: auto !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center;
}

#masthead .ast-custom-button-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: 40px !important;
    min-height: 40px !important;
    white-space: nowrap !important;
    padding: 0 22px !important;
    background: #ffffff !important;
    color: #0d0d0d !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid #ffffff;
    line-height: 1 !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

/* Astra învelește textul butonului într-un div interior — îl forțăm inline */
#masthead .ast-custom-button-link .ast-custom-button {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    font-size: inherit !important;
    color: inherit !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

#masthead .ast-custom-button-link:hover {
    background: #c8a25b !important;
    color: #0d0d0d !important;
    border-color: #c8a25b;
}

#masthead .ast-custom-button-link:hover .ast-custom-button {
    color: #0d0d0d !important;
}

/* --- 7. ascundem trigger-ul mobile pe desktop (Astra a lăsat butonul vizibil) --- */
@media (min-width: 922px) {
    #masthead .main-header-menu-toggle,
    #masthead [data-section="section-header-mobile-trigger"] {
        display: none !important;
    }
}

/* --- 8. Logo: folosim direct logo-ul alb (parkingbox-logo-white.png) pe header inchis, fara invert --- */
#masthead .site-branding .custom-logo,
#masthead .site-branding .site-logo-img img {
    filter: none;
}

/* --- 9. RESPONSIVE: tablet / mobile --- */
@media (max-width: 1100px) {
    #masthead .main-header-menu > li > a {
        padding: 10px 10px !important;
        font-size: 12px !important;
        letter-spacing: 0 !important;
    }
    #masthead .ast-builder-grid-row.ast-grid-center-col-layout {
        column-gap: 20px !important;
    }
}

@media (max-width: 921px) {
    #masthead .ast-builder-grid-row.ast-grid-center-col-layout {
        grid-template-columns: auto 1fr auto !important;
        min-height: 68px;
        padding: 10px 0 !important;
    }
    /* pe mobil, ascundem prețul coșului — păstrăm doar iconița */
    #masthead .ast-site-header-cart .cart-container .ast-woo-header-cart-info-wrap {
        display: none !important;
    }
    #masthead .ast-custom-button-link {
        padding: 9px 14px !important;
        font-size: 11px !important;
    }

    /* ---- Meniu mobil: dropdown vertical la toggle ---- */
    #ast-mobile-header .ast-main-header-wrap { position: relative; }
    #masthead .main-header-bar-navigation {
        display: none !important;
        position: fixed;
        top: 84px;
        left: 0;
        right: 0;
        width: 100% !important;
        background: #0e0e0e;
        box-shadow: 0 24px 40px rgba(0,0,0,0.35);
        z-index: 9999;
        max-height: calc(100vh - 84px);
        overflow-y: auto;
    }
    #masthead .main-header-bar-navigation.toggled {
        display: block !important;
    }
    #masthead .main-header-menu {
        display: block !important;
        flex-wrap: wrap !important;
        gap: 0 !important;
    }
    #masthead .main-header-menu > li {
        width: 100% !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    #masthead .main-header-menu > li > a {
        display: flex !important;
        align-items: center;
        height: auto !important;
        width: 100%;
        padding: 15px 22px !important;
        font-size: 15px !important;
        white-space: normal !important;
    }
    /* fundal transparent + text alb (linkurile moșteneau fundal alb din dropdown-ul desktop) */
    #masthead .main-header-bar-navigation .main-header-menu a,
    #masthead .main-header-bar-navigation .main-header-menu .menu-link {
        background: transparent !important;
        color: #ffffff !important;
    }
    #masthead .main-header-bar-navigation .main-header-menu a:hover,
    #masthead .main-header-bar-navigation .main-header-menu .menu-link:hover {
        color: #c8a25b !important;
    }
    /* submeniuri vizibile inline pe mobil (toate linkurile accesibile) */
    #masthead .main-header-menu .sub-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        background: rgba(255,255,255,0.04) !important;
        padding: 0 !important;
        margin: 0 !important;
        min-width: 0 !important;
    }
    #masthead .main-header-menu .sub-menu::before { display: none !important; }
    #masthead .main-header-menu .sub-menu a,
    #masthead .main-header-menu .sub-menu .menu-link {
        padding: 12px 22px 12px 38px !important;
    }
}

/* ==========================================================================
   PARKINGBOX CUSTOM CART DRAWER REDESIGN (Astra + Elementor Mini Cart)
   ========================================================================== */

/* Drawer container */
.astra-cart-drawer {
  background: #ffffff !important;
  color: #101211 !important;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif !important;
  box-shadow: -5px 0 30px rgba(15, 18, 22, 0.15) !important;
  border-left: 1px solid #e9ebef !important;
  width: 480px !important;
  max-width: 90vw !important;
}

/* Header styling */
.astra-cart-drawer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 24px 28px !important;
  border-bottom: 1px solid #e9ebef !important;
  background: #fdf6ee !important;
  position: relative !important;
  height: auto !important;
}

.astra-cart-drawer-title {
  font-family: 'Sora', system-ui, -apple-system, sans-serif !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  color: #101211 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin: 0 !important;
}

.astra-cart-drawer-close {
  order: 2 !important;
  background: transparent !important;
  border: none !important;
  color: #101211 !important;
  padding: 8px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
  width: 36px !important;
  height: 36px !important;
}
.astra-cart-drawer-close:hover {
  background: rgba(15, 18, 22, 0.05) !important;
  transform: rotate(90deg) !important;
}

/* Content wrapper */
.astra-cart-drawer-content {
  padding: 0 !important;
  height: calc(100% - 80px) !important;
  display: flex !important;
  flex-direction: column !important;
}

.astra-cart-drawer-content .widget_shopping_cart {
  height: 100% !important;
  margin: 0 !important;
}

.astra-cart-drawer-content .widget_shopping_cart_content {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  padding: 24px 28px !important;
}

/* Products list */
.elementor-menu-cart__products {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-grow: 1 !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* Single cart product item */
.elementor-menu-cart__product {
  display: grid !important;
  grid-template-columns: 80px 1fr auto !important;
  gap: 16px !important;
  padding: 0 0 20px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid #f1f3f5 !important;
  align-items: start !important;
  height: auto !important;
  width: 100% !important;
}

.elementor-menu-cart__product:last-child {
  border-bottom: none !important;
}

/* Thumbnail */
.elementor-menu-cart__product-image {
  width: 80px !important;
  height: 80px !important;
  background: #fdf6ee !important;
  border: 1px solid #e9ebef !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.elementor-menu-cart__product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Details column */
.elementor-menu-cart__product-name {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: auto !important;
  height: auto !important;
  text-align: left !important;
}

.elementor-menu-cart__product-name a {
  font-family: 'Sora', system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  color: #101211 !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
  transition: color 0.15s ease !important;
}
.elementor-menu-cart__product-name a:hover {
  color: #d96b00 !important;
}

/* Variation lists */
.elementor-menu-cart__product-name dl.variation {
  margin: 4px 0 0 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  color: #6b7380 !important;
  display: block !important;
}
.elementor-menu-cart__product-name dl.variation dt {
  float: left !important;
  clear: left !important;
  font-weight: 700 !important;
  margin-right: 4px !important;
}
.elementor-menu-cart__product-name dl.variation dd {
  margin: 0 0 4px 0 !important;
}
.elementor-menu-cart__product-name dl.variation dd p {
  margin: 0 !important;
  display: inline !important;
}

/* Price column */
.elementor-menu-cart__product-price {
  grid-column: 2 !important;
  margin-top: 4px !important;
  width: auto !important;
  height: auto !important;
  text-align: left !important;
}

.elementor-menu-cart__product-price .quantity {
  font-size: 14px !important;
  color: #6b7380 !important;
  font-weight: 500 !important;
}

.elementor-menu-cart__product-price .amount {
  font-weight: 700 !important;
  color: #d96b00 !important;
  font-size: 15px !important;
}

/* Remove column */
.elementor-menu-cart__product-remove {
  grid-column: 3 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
}

/* Hide Elementor's duplicate remove button, display only WooCommerce's */
.elementor-menu-cart__product-remove a.elementor_remove_from_cart_button {
  display: none !important;
}

.elementor-menu-cart__product-remove a.remove_from_cart_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  background: #fdf6ee !important;
  border: 1px solid #e9ebef !important;
  border-radius: 8px !important;
  color: #6b7380 !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
  position: relative !important;
}
.elementor-menu-cart__product-remove a.remove_from_cart_button:hover {
  background: #ffebee !important;
  border-color: #ffd0d0 !important;
  color: #c0392b !important;
}

/* Add an "x" icon inside the remove button */
.elementor-menu-cart__product-remove a.remove_from_cart_button::before {
  content: "×" !important;
  font-size: 18px !important;
  font-weight: bold !important;
}

/* Subtotal */
.elementor-menu-cart__subtotal {
  border-top: 1px solid #e9ebef !important;
  padding: 20px 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  font-family: 'Sora', system-ui, sans-serif !important;
  font-size: 16px !important;
  color: #101211 !important;
  margin: 0 !important;
  height: auto !important;
  width: 100% !important;
}

.elementor-menu-cart__subtotal strong {
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

.elementor-menu-cart__subtotal .amount {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #101211 !important;
}

/* Footer Buttons */
.elementor-menu-cart__footer-buttons {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin-top: 10px !important;
  padding: 0 0 20px 0 !important;
  width: 100% !important;
  height: auto !important;
}

.elementor-menu-cart__footer-buttons a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 48px !important;
  border-radius: 8px !important;
  font-family: 'Montserrat', system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* View Cart (ghost button) */
.elementor-menu-cart__footer-buttons a.elementor-button--view-cart {
  background: #ffffff !important;
  border: 1px solid #d6d6cd !important;
  color: #101211 !important;
}
.elementor-menu-cart__footer-buttons a.elementor-button--view-cart:hover {
  background: #fdf6ee !important;
  border-color: #101211 !important;
}

/* Checkout (primary brand button) */
.elementor-menu-cart__footer-buttons a.elementor-button--checkout {
  background: #d96b00 !important;
  border: 1px solid #d96b00 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(217, 107, 0, 0.2) !important;
}
.elementor-menu-cart__footer-buttons a.elementor-button--checkout:hover {
  background: #b85a00 !important;
  border-color: #b85a00 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(217, 107, 0, 0.3) !important;
}

/* Empty cart style */
.woocommerce-mini-cart__empty-message {
  font-family: 'Montserrat', system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  color: #6b7380 !important;
  text-align: center !important;
  padding: 60px 0 !important;
}
