/* ================================================================
   PERFECTO SIDEBAR SYSTEM — ENVATO GRADE v3.0
   Clean, deduplicated, buttery smooth, premium UI
   ================================================================ */

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
  --pf-black: var(--pf-dark, #0a0a0a);
  --pf-white: #ffffff;
  --pf-gray-50: #f9fafb;
  --pf-gray-100: #f3f4f6;
  --pf-gray-200: #e5e7eb;
  --pf-gray-300: #d1d5db;
  --pf-gray-400: #9ca3af;
  --pf-gray-500: #6b7280;
  --pf-gray-700: #374151;
  --pf-gray-900: #111827;
  --pf-red: var(--pf-wishlist, #ef4444);
  --pf-red-light: var(--pf-wishlist-light, #fee2e2);
  --pf-blue: #2563eb;
  --pf-green: #059669;
  --pf-green-light: #f0fdf4;

  /* Animation — single source of truth */
  --pf-ease-slide: cubic-bezier(0.22, 1, 0.36, 1);
  --pf-ease-modal: cubic-bezier(0.4, 0, 0.2, 1);
  --pf-duration-slide: 0.38s;
  --pf-duration-overlay: 0.28s;

  /* Sidebar sizes */
  --pf-sidebar-width: 440px;
  --pf-sidebar-width-mobile: 92%;
  --pf-sidebar-radius-mobile: 20px;
}


/* ================================================================
   1. GLOBAL OVERLAY — ULTRA PERFORMANCE (NO BLUR)
   ================================================================ */
.pf-sidebar-overlay,
.pf-auth-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  
  /* Solid black background, we will animate the element's Opacity instead */
  background: #000000 !important; 
  
  z-index: 999998 !important; /* Behind sidebar */
  
  /* Start Invisible */
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;

  /* NO BLUR - Explicitly disabled for max FPS */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  /* The "Buttery" Curve - Smooth ease-out */
  transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s linear 0.35s !important;
  
  /* Force GPU Acceleration */
  will-change: opacity !important;
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  
  display: block !important;
}

/* Active State */
.pf-sidebar-overlay.active,
.pf-auth-overlay.active {
  /* We fade the whole element to 0.6 opacity */
  opacity: 0.6 !important; 
  visibility: visible !important;
  pointer-events: auto !important;

  /* Instant visibility, smooth opacity fade-in */
  transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s linear 0s !important;
}


/* ================================================================
   2. SIDEBAR BASE — buttery smooth slide (single definition)
   ================================================================ */
.pf-sidebar,
.pf-cart-sidebar,
.pf-wishlist-sidebar,
.pf-menu-sidebar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  height: 100% !important;
  height: 100dvh !important;
  width: 100% !important;
  max-width: var(--pf-sidebar-width) !important;
  background: var(--pf-white) !important;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12), -2px 0 8px rgba(0, 0, 0, 0.06) !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;

  /* THE buttery smooth slide — !important to beat theme CSS */
  transform: translate3d(101%, 0, 0) !important;
  transition: transform var(--pf-duration-slide) var(--pf-ease-slide) !important;
  will-change: transform !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  -webkit-font-smoothing: antialiased !important;
}

.pf-sidebar.active,
.pf-cart-sidebar.active,
.pf-wishlist-sidebar.active,
.pf-menu-sidebar.active {
  transform: translate3d(0, 0, 0) !important;
}

/* Clip header/nav content areas but NOT the bottom bar so dropdown can slide up */
.pf-menu-sidebar .pf-drawer-header { overflow: hidden; }
.pf-menu-sidebar .pf-drawer-search-wrap { overflow: hidden; }
.pf-menu-sidebar .pf-drawer-tabs { overflow: hidden; }


/* ================================================================
   3. MOBILE OVERRIDES
   ================================================================ */
@media (max-width: 767px) {
  .pf-sidebar,
  .pf-cart-sidebar,
  .pf-wishlist-sidebar,
  .pf-menu-sidebar {
    width: var(--pf-sidebar-width-mobile) !important;
    max-width: var(--pf-sidebar-width-mobile) !important;
    min-width: auto !important;
    right: 0 !important;
    left: auto !important;
    border-top-left-radius: var(--pf-sidebar-radius-mobile) !important;
    border-bottom-left-radius: var(--pf-sidebar-radius-mobile) !important;
    transition: transform 0.3s var(--pf-ease-slide) !important;
  }

}

/* JS uses 'sidebar-open' — keep both for safety */
body.sidebar-open,
body.pf-sidebar-open {
  overflow: hidden;
}


/* ================================================================
   4. SIDEBAR HEADER — CLEAN PROFESSIONAL
   ================================================================ */
.pf-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  z-index: 2;
}

.pf-sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #111111;
  margin: 0;
}

.pf-cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  letter-spacing: 0;
}

.pf-sidebar-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e8e8e8;
  background: #f9f9f9;
  color: #888;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pf-sidebar-close:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
  transform: rotate(90deg);
}

.pf-sidebar-close svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}


/* ================================================================
   5. SCROLLABLE CONTENT AREA
   ================================================================ */
.pf-sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pf-sidebar-content::-webkit-scrollbar {
  width: 4px;
}
.pf-sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}
.pf-sidebar-content::-webkit-scrollbar-thumb {
  background: var(--pf-gray-200);
  border-radius: 4px;
}
.pf-sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--pf-gray-400);
}


/* ================================================================
   6. FREE SHIPPING PROGRESS — CLEAN LIGHT
   ================================================================ */
.pf-shipping-progress {
  padding: 10px 20px 13px;
  background: #fafafa;
  border-bottom: 1px solid #efefef;
}

.pf-shipping-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pf-shipping-label p {
  margin: 0;
  font-size: 12px;
  color: #777;
  line-height: 1.4;
}

.pf-shipping-label p strong {
  color: #111;
  font-weight: 700;
}

.pf-progress-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: #e8e8e8;
  border-radius: 99px;
  overflow: hidden;
}

.pf-progress-fill {
  height: 100%;
  background: #0a0a0a;
  border-radius: 99px;
  transition: width 0.7s var(--pf-ease-slide);
}

/* No ::after at all — clean track, no emoji */

/* Unlocked */
.pf-shipping-unlocked {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  background: #f0fdf4;
  border-bottom: 1px solid #d1fae5;
}

.pf-shipping-unlocked p {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #15803d;
}


/* ================================================================
   7. CART ITEMS — CLEAN PROFESSIONAL
   ================================================================ */
.pf-sidebar-content .pf-cart-items-wrapper {
  padding: 0;
  background: #ffffff;
}

.pf-cart-items {
  display: flex;
  flex-direction: column;
}

.pf-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #f2f2f2;
  position: relative;
  transition: background 0.15s ease;
}

.pf-cart-item:last-child {
  border-bottom: none;
}

.pf-cart-item:hover {
  background: #fafafa;
}

/* Image */
.pf-item-image {
  position: relative;
  width: 78px;
  height: 92px;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.pf-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.pf-cart-item:hover .pf-item-image img {
  transform: scale(1.04);
}

.pf-item-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.pf-item-image .pf-sale-badge,
.pf-item-image .onsale,
.pf-item-image .badge,
.pf-item-image .sale-badge {
  display: none !important;
}

/* Details */
.pf-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 2px;
  padding-right: 28px;
  gap: 5px;
}

/* Remove btn */
.pf-item-remove {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.18s ease;
  padding: 0;
}

.pf-item-remove:hover {
  background: #fff0f0;
  color: #e53e3e;
}

.pf-item-remove svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

/* Product name */
.pf-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #111;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-item-name a {
  color: inherit;
  text-decoration: none;
}

.pf-item-name a:hover {
  color: #555;
}

/* Variant attributes */
.pf-item-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pf-attr {
  font-size: 11px;
  color: #999;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.6;
}

.pf-attr strong {
  color: #555;
  font-weight: 600;
}

/* Price row — savings badge shown BEFORE price via order:-1 */
.pf-item-price-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

/* Savings badge — green pill, shown first before price */
.pf-savings-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #dcfce7;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  white-space: nowrap;
}

.pf-price-sale {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.2px;
}

.pf-price-regular {
  font-size: 12.5px;
  color: #bbb;
  text-decoration: line-through;
}

.pf-item-price-row .pf-price-regular:only-child {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
}

.pf-item-discount-tag {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #e53e3e;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

/* Qty row */
.pf-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pf-quantity-selector {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  height: 32px;
  background: #fff;
}

.pf-cart-qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #555;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.pf-cart-qty-btn:hover {
  background: #f5f5f5;
  color: #111;
}

.pf-cart-qty-btn svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.pf-qty-input,
.pf-cart-qty-input {
  width: 36px;
  height: 32px;
  border: none;
  border-left: 1.5px solid #e8e8e8;
  border-right: 1.5px solid #e8e8e8;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  background: #ffffff;
  padding: 0;
  -moz-appearance: textfield;
}

.pf-qty-input::-webkit-outer-spin-button,
.pf-qty-input::-webkit-inner-spin-button,
.pf-cart-qty-input::-webkit-outer-spin-button,
.pf-cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.pf-qty-input:focus,
.pf-cart-qty-input:focus {
  outline: none;
}


/* ================================================================
   8. SIDEBAR FOOTER — CLEAN PROFESSIONAL
   ================================================================ */
.pf-sidebar-footer {
  padding: 0;
  border-top: 1px solid #f0f0f0;
  background: #ffffff;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Trust strip */
.pf-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.pf-trust-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 6px;
  font-size: 10px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-right: 1px solid #f0f0f0;
}

.pf-trust-item:last-child {
  border-right: none;
}

.pf-trust-item svg {
  width: 13px;
  height: 13px;
  color: #aaa;
  flex-shrink: 0;
}

/* Footer inner */
.pf-footer-inner {
  padding: 16px 20px 20px;
}

/* Totals */
.pf-cart-totals {
  margin-bottom: 14px;
}

.pf-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}

.pf-total-row span {
  font-size: 13px;
  color: #888;
  font-weight: 500;
}

.pf-total-row strong {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.5px;
}

.pf-total-savings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  margin-top: 8px;
  background: #f0fdf4;
  border-radius: 7px;
}

.pf-total-savings-row span {
  font-size: 12px;
  color: #15803d;
  font-weight: 500;
}

.pf-total-savings-row strong {
  font-size: 13px;
  font-weight: 700;
  color: #15803d;
}

/* Buttons — single row: icon btn + checkout */
.pf-cart-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* Cart icon button — small square */
.pf-btn-cart-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pf-btn-cart-icon:hover {
  background: #ececec;
  border-color: #ccc;
  color: #111;
}

.pf-btn-cart-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

/* ================================================================
   9. BUTTONS — CLEAN PROFESSIONAL
   ================================================================ */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  height: 48px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pf-btn-block {
  width: 100%;
}

/* Primary button — follows Redux primary button color */
.pf-btn-primary {
  background: var(--pf-pri-bg, #111111);
  color: var(--pf-pri-txt, #ffffff);
}

.pf-btn-primary:hover {
  background: var(--pf-pri-h-bg, #333333);
  color: var(--pf-pri-txt, #ffffff);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.pf-btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Checkout = fills remaining width in the row */
.pf-btn-checkout {
  flex: 1;
  background: var(--pf-pri-bg, #111111);
  color: var(--pf-pri-txt, #ffffff);
  height: 50px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.pf-btn-checkout:hover {
  background: var(--pf-pri-h-bg, #333);
  color: var(--pf-pri-txt, #ffffff);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

/* Secondary = light gray outline */
.pf-btn-secondary {
  background: #f5f5f5;
  color: #555;
  border: 1.5px solid #e8e8e8;
  height: 42px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
}

.pf-btn-secondary:hover {
  background: #eeeeee;
  color: #111;
  border-color: #ddd;
}

.pf-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}


/* ================================================================
   10. EMPTY STATE
   ================================================================ */
.pf-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.pf-empty-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pf-gray-100);
  border-radius: 50%;
  margin-bottom: 20px;
}

.pf-empty-icon svg {
  width: 34px;
  height: 34px;
  color: var(--pf-gray-400);
}

.pf-empty-state h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--pf-gray-900);
  margin: 0 0 8px;
  letter-spacing: -0.2px;
}

.pf-empty-state p {
  font-size: 13.5px;
  color: var(--pf-gray-500);
  margin: 0 0 24px;
  line-height: 1.5;
}


/* ================================================================
   11. LOADING STATE
   ================================================================ */
.pf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}

.pf-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--pf-gray-200);
  border-top-color: var(--pf-black);
  border-radius: 50%;
  animation: pfSpin 0.7s linear infinite;
  margin-bottom: 14px;
}

@keyframes pfSpin {
  to { transform: rotate(360deg); }
}

.pf-loading p {
  font-size: 13px;
  color: var(--pf-gray-500);
  margin: 0;
}


/* ================================================================
   12. MENU SIDEBAR
   ================================================================ */
.pf-menu-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--pf-gray-100);
}

.pf-user-avatar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.pf-user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pf-user-info strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--pf-gray-900);
}

.pf-user-info span {
  font-size: 12.5px;
  color: var(--pf-gray-500);
}

.pf-menu-auth {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pf-nav-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pf-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 24px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--pf-gray-700);
  text-decoration: none;
  transition: all 0.18s ease;
}

.pf-nav-list a:hover {
  background: var(--pf-gray-50);
  color: var(--pf-gray-900);
  padding-left: 28px;
}

.pf-nav-list .current-menu-item > a,
.pf-nav-list .current_page_item > a {
  color: var(--pf-gray-900);
  font-weight: 700;
  background: var(--pf-gray-50);
}

.pf-nav-list .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--pf-gray-50);
}

.pf-nav-list .sub-menu a {
  padding-left: 44px;
  font-size: 13.5px;
}

.pf-menu-links {
  padding: 12px 0;
  border-top: 1px solid var(--pf-gray-100);
}

.pf-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pf-gray-700);
  text-decoration: none;
  transition: all 0.18s ease;
}

.pf-menu-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.pf-menu-link:hover {
  background: var(--pf-gray-50);
  color: var(--pf-gray-900);
}

.pf-menu-link.pf-logout {
  color: var(--pf-red);
}

.pf-menu-link.pf-logout:hover {
  background: var(--pf-red-light);
}


/* ================================================================
   13. WISHLIST SIDEBAR
   ================================================================ */
.pf-wishlist-grid {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pf-w-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--pf-white);
  border-radius: 14px;
  border: 1px solid var(--pf-gray-100);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.pf-w-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

.pf-w-img {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--pf-gray-100);
}

.pf-w-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-w-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pf-w-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pf-gray-900);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-w-price {
  font-size: 13px;
  color: var(--pf-gray-500);
}

.pf-w-price del { color: var(--pf-gray-400); font-size: 11px; margin-right: 3px; }
.pf-w-price ins { text-decoration: none; color: var(--pf-gray-900); font-weight: 600; }

.pf-w-action { flex-shrink: 0; }

.pf-w-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 18px !important;
  height: 32px !important;
  background: var(--pf-black) !important;
  color: var(--pf-white) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  border-radius: 99px !important;
  text-decoration: none !important;
  border: none !important;
  transition: all 0.18s ease !important;
  white-space: nowrap !important;
}

.pf-w-btn:hover {
  background: #333 !important;
  transform: translateY(-1px) !important;
  color: var(--pf-white) !important;
}

.pf-w-remove {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  background: var(--pf-white);
  border: 1px solid var(--pf-gray-200);
  border-radius: 50%;
  color: var(--pf-gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: all 0.18s ease;
  opacity: 0;
}

.pf-w-card:hover .pf-w-remove { opacity: 1; }

.pf-w-remove:hover {
  background: var(--pf-red);
  color: var(--pf-white);
  border-color: var(--pf-red);
}

@media (max-width: 640px) {
  .pf-w-remove { opacity: 1; }
}

.pf-glass-footer {
  padding: 18px 20px;
  background: rgba(255,255,255,0.95);
  border-top: 1px solid var(--pf-gray-100);
}

.pf-footer-row {
  display: flex;
  gap: 10px;
}

.pf-btn-black {
  flex: 2;
  background: var(--pf-pri-bg, #111827);
  color: var(--pf-pri-txt, #ffffff);
  border: none;
  height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.pf-btn-black:hover { background: var(--pf-pri-h-bg, #222); }

.pf-btn-clean {
  flex: 1;
  background: transparent;
  border: 1.5px solid var(--pf-gray-200);
  color: var(--pf-gray-500);
  height: 48px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pf-btn-clean:hover {
  background: var(--pf-gray-50);
  color: var(--pf-gray-900);
  border-color: var(--pf-gray-400);
}


.pf-wishlist-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  letter-spacing: 0;
}


/* ================================================================
   14. AUTH PANEL
   ================================================================ */
.pf-auth-panel {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  max-height: 92vh;
  background: var(--pf-white);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.36s var(--pf-ease-slide);
  will-change: transform;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
}

.pf-auth-panel.active {
  transform: translateY(0);
}

.pf-auth-panel.keyboard-open {
  /* JS sets bottom and max-height dynamically via visualViewport */
  transition: bottom 0.15s ease, max-height 0.15s ease, transform 0.36s var(--pf-ease-slide);
}

@media (min-width: 769px) {
  .pf-auth-panel {
    top: 50%;
    left: 50%;
    bottom: auto;
    width: 480px;
    max-width: 90%;
    max-height: 90vh;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s var(--pf-ease-modal), opacity 0.3s var(--pf-ease-modal);
  }

  .pf-auth-panel.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .pf-auth-panel.keyboard-open {
    max-height: 90vh;
  }
}

.pf-auth-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  flex-shrink: 0;
}

.pf-auth-handle span {
  width: 36px;
  height: 4px;
  background: var(--pf-gray-200);
  border-radius: 2px;
}

@media (min-width: 769px) {
  .pf-auth-handle { display: none; }
}

.pf-auth-header {
  display: flex;
  justify-content: flex-end;
  padding: 0 20px 12px;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .pf-auth-header { padding: 16px 24px 0; }
}

.pf-auth-close {
  width: 32px;
  height: 32px;
  background: var(--pf-gray-100);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pf-auth-close:hover {
  background: var(--pf-gray-200);
  transform: rotate(90deg);
}

.pf-auth-close svg {
  width: 15px;
  height: 15px;
  color: var(--pf-gray-500);
}

.pf-auth-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 24px 32px;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 769px) {
  .pf-auth-content { padding: 0 32px 32px; }
}

.pf-auth-welcome {
  text-align: center;
  margin-bottom: 22px;
}

.pf-auth-welcome h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--pf-gray-900);
  margin: 0 0 6px;
  letter-spacing: -0.4px;
}

.pf-auth-welcome p {
  font-size: 13.5px;
  color: var(--pf-gray-500);
  margin: 0;
}

.pf-auth-tabs {
  position: relative;
  display: flex;
  background: var(--pf-gray-100);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
}

.pf-auth-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--pf-gray-500);
  cursor: pointer;
  border-radius: 7px;
  transition: color 0.2s;
  position: relative;
  z-index: 2;
}

.pf-auth-tab.active { color: var(--pf-gray-900); }

.pf-tab-indicator {
  position: absolute;
  bottom: 4px;
  left: 4px;
  height: calc(100% - 8px);
  background: var(--pf-white);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.28s var(--pf-ease-modal);
  z-index: 1;
}

.pf-auth-form-wrapper {
  display: none;
  flex-direction: column;
  animation: pfFadeUp 0.25s ease;
}

.pf-auth-form-wrapper.active { display: flex; }

@keyframes pfFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pf-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pf-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-gray-700);
}

.pf-form-group label .required { color: var(--pf-red); }

.pf-form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--pf-gray-200);
  border-radius: 10px;
  font-size: 16px;
  color: var(--pf-gray-900);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
  background: var(--pf-white);
}

.pf-form-control:focus {
  outline: none;
  border-color: var(--pf-gray-900);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.pf-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pf-checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--pf-gray-500);
}

.pf-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.pf-forgot-link {
  font-size: 13.5px;
  color: var(--pf-gray-900);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.pf-forgot-link:hover { opacity: 0.65; }

.pf-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.pf-login-divider::before,
.pf-login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--pf-gray-200);
}

.pf-login-divider span {
  font-size: 11.5px;
  color: var(--pf-gray-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.pf-social-login-wrapper { margin-top: 16px; }

.pf-social-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1.5px solid var(--pf-gray-200);
  background: var(--pf-white);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pf-gray-700);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}

.pf-social-btn:hover {
  background: var(--pf-gray-50);
  border-color: var(--pf-gray-400);
  transform: translateY(-1px);
}

.pf-social-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.pf-social-login:has(.pf-google-login):has(.pf-facebook-login) {
  flex-direction: row;
  gap: 8px;
}

.pf-social-login:has(.pf-google-login):has(.pf-facebook-login) .pf-social-btn {
  flex: 1;
  min-width: 0;
}

.pf-privacy-text,
.pf-info-text {
  font-size: 12px;
  color: var(--pf-gray-400);
  line-height: 1.6;
  margin-top: 8px;
}

.pf-privacy-text a {
  color: var(--pf-gray-900);
  text-decoration: underline;
}

body.auth-panel-open { overflow: hidden !important; }

/* Force full width on mobile — override Redux inline max-width */
@media (max-width: 768px) {
  .pf-auth-panel {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* ================================================================
   15. ACCESSIBILITY
   ================================================================ */
.pf-auth-close:focus-visible,
.pf-auth-tab:focus-visible,
.pf-form-control:focus-visible,
.pf-btn:focus-visible,
.pf-sidebar-close:focus-visible {
  outline: 2px solid var(--pf-black);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   16. MOBILE FINE-TUNING
   ================================================================ */
@media (max-width: 640px) {
  .pf-sidebar-header {
    padding: 16px 16px 14px;
  }

  .pf-cart-item {
    padding: 14px 16px;
    gap: 12px;
  }

  .pf-item-image {
    width: 72px;
    height: 86px;
    border-radius: 8px;
  }

  .pf-item-details {
    padding-right: 26px;
  }

  .pf-item-name {
    font-size: 13px;
  }

  .pf-price-sale,
  .pf-item-price-row .pf-price-regular:only-child {
    font-size: 14px;
  }

  .pf-footer-inner {
    padding: 14px 16px 18px;
  }

  .pf-total-row strong {
    font-size: 20px;
  }

  .pf-btn-checkout {
    height: 48px;
    font-size: 13.5px;
  }

  .pf-btn-secondary {
    height: 40px;
  }

  .pf-shipping-progress {
    padding: 11px 16px 12px;
  }
}




/* 2. Fix the "Save $10.00" spacing */
.pf-savings-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important; /* Forces a hard space between text and price */
}

/* 3. Fix the "X" Remove Button visibility and position */
.pf-item-remove {
  top: 14px !important;
  right: 14px !important;
  width: 30px !important;
  height: 30px !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  opacity: 1 !important;
}

.pf-item-remove svg {
  width: 15px !important;
  height: 15px !important;
  stroke: #6b7280 !important;
}

.pf-item-remove:hover {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
}

.pf-item-remove:hover svg {
  stroke: #ef4444 !important;
}

/* 4. Restore the light background to the shipping bar to separate it */
.pf-shipping-progress {
  background: #f9fafb !important;
}

/* ================================================================
   PERFECTO MENU DRAWER — PREMIUM UI
   Search → Tabs → Menu Content → Bottom Widgets
   ================================================================ */

/* ── Direction overrides ───────────────────────────────────────── */
/* Right (default — matches base rules, no override needed) */
.pf-drawer-right {
  left: auto !important;
  right: 0 !important;
  border-radius: 20px 0 0 20px !important;
  /* inherits base transform: translate3d(101%, 0, 0) hidden → 0 active */
}

/* Left — slides in from left side */
.pf-drawer-left {
  left: 0 !important;
  right: auto !important;
  transform: translate3d(-101%, 0, 0) !important;
  border-radius: 0 20px 20px 0 !important;
  box-shadow: 8px 0 40px rgba(0,0,0,0.12), 2px 0 8px rgba(0,0,0,0.06) !important;
}
.pf-drawer-left.active {
  transform: translate3d(0, 0, 0) !important;
}

@media (max-width: 767px) {
  .pf-drawer-left {
    left: 0 !important;
    right: auto !important;
    border-top-right-radius: var(--pf-sidebar-radius-mobile) !important;
    border-bottom-right-radius: var(--pf-sidebar-radius-mobile) !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
  }
}

/* ── Header ────────────────────────────────────────────────────── */
.pf-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--pf-gray-100);
  background: #fff;
}

.pf-drawer-header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pf-gray-900);
  letter-spacing: -0.01em;
  transition: opacity 0.2s ease;
}

.pf-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--pf-gray-100);
  color: var(--pf-gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}
.pf-drawer-close:hover {
  background: var(--pf-gray-200);
  color: var(--pf-gray-900);
}

/* ── Search Bar ────────────────────────────────────────────────── */
.pf-drawer-search-wrap {
  padding: 14px 16px 0;
  flex-shrink: 0;
  background: #fff;
  position: relative;
}

.pf-drawer-search-form {
  position: relative;
}

.pf-drawer-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--pf-gray-50);
  border: 1.5px solid var(--pf-gray-200);
  border-radius: 12px;
  padding: 0 6px 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pf-drawer-search-inner:focus-within {
  border-color: var(--pf-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
  background: #fff;
}

.pf-drawer-search-icon {
  flex-shrink: 0;
  color: var(--pf-gray-400);
  transition: color 0.2s ease;
  pointer-events: none;
}
.pf-drawer-search-inner:focus-within .pf-drawer-search-icon {
  color: var(--pf-blue);
}

.pf-drawer-search-input {
  flex: 1;
  height: 44px;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 14px;
  color: var(--pf-gray-900);
  box-shadow: none !important;
  padding: 0 !important;
}
.pf-drawer-search-input::placeholder {
  color: var(--pf-gray-400);
}

.pf-drawer-search-submit {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--pf-gray-900);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.15s ease;
}
.pf-drawer-search-submit:hover {
  background: var(--pf-blue);
  transform: scale(1.05);
}
.pf-drawer-search-submit:active {
  transform: scale(0.96);
}

/* Ajax search results drop inside drawer */
.pf-drawer-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--pf-gray-200);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 9999;
  overflow: hidden;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.pf-drawer-search-results.active {
  display: block;
}

/* ── Tabs Bar ──────────────────────────────────────────────────── */
.pf-drawer-tabs {
  display: flex;
  align-items: stretch;
  position: relative;
  margin: 14px 16px 0;
  background: var(--pf-gray-100);
  border-radius: 10px;
  padding: 3px;
  flex-shrink: 0;
  gap: 0;
}

.pf-drawer-tab {
  flex: 1;
  position: relative;
  z-index: 2;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pf-gray-500);
  cursor: pointer;
  transition: color 0.22s ease;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
}
.pf-drawer-tab.active {
  color: var(--pf-gray-900);
}

/* Sliding pill indicator */
.pf-drawer-tab-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
}

/* ── Menu Content / Panels ─────────────────────────────────────── */
.pf-drawer-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  margin-top: 10px;
  -webkit-overflow-scrolling: touch;
}
.pf-drawer-content::-webkit-scrollbar { width: 3px; }
.pf-drawer-content::-webkit-scrollbar-track { background: transparent; }
.pf-drawer-content::-webkit-scrollbar-thumb { background: var(--pf-gray-200); border-radius: 99px; }

.pf-drawer-panel {
  display: none;
  animation: pfPanelIn 0.22s ease both;
}
.pf-drawer-panel.active {
  display: block;
}
@keyframes pfPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nav list inside drawer — refined */
.pf-drawer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pf-drawer-nav-list > li {
  border-bottom: 1px solid var(--pf-gray-100);
}
.pf-drawer-nav-list > li:last-child {
  border-bottom: none;
}

.pf-drawer-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--pf-gray-700);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
  line-height: 1.2;
}
.pf-drawer-nav-list a:hover {
  background: var(--pf-gray-50);
  color: var(--pf-gray-900);
  padding-left: 24px;
}
.pf-drawer-nav-list .current-menu-item > a,
.pf-drawer-nav-list .current_page_item > a {
  color: var(--pf-blue);
  font-weight: 600;
}

/* Submenu arrow */
.pf-drawer-nav-list .menu-item-has-children > a::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.22s ease;
  flex-shrink: 0;
  margin-left: 8px;
  opacity: 0.5;
}
.pf-drawer-nav-list .menu-item-has-children.submenu-open > a::after {
  transform: rotate(-135deg);
}

/* Sub-menu */
.pf-drawer-nav-list .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--pf-gray-50);
  display: none;
}
.pf-drawer-nav-list .sub-menu a {
  padding-left: 36px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--pf-gray-500);
  border-bottom: 1px solid var(--pf-gray-100);
}
.pf-drawer-nav-list .sub-menu a:hover {
  color: var(--pf-gray-900);
  padding-left: 40px;
}
.pf-drawer-nav-list .sub-menu li:last-child > a {
  border-bottom: none;
}

/* Level 3 */
.pf-drawer-nav-list .sub-menu .sub-menu a {
  padding-left: 52px;
}

/* Empty state */
.pf-drawer-no-menu {
  padding: 24px 20px;
  font-size: 13px;
  color: var(--pf-gray-400);
  text-align: center;
}

/* ── Bottom Bar ────────────────────────────────────────────────── */
.pf-drawer-bottom {
  overflow: visible;
  flex-shrink: 0;
  border-top: 1px solid var(--pf-gray-100);
  background: #fff;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
}

/* Extra padding for drawer with bottom bar */
.pf-drawer-has-bottom .pf-drawer-content {
  padding-bottom: 4px;
}

.pf-drawer-widget {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  overflow: visible;
  min-width: 0;
}
.pf-drawer-widget + .pf-drawer-widget {
  border-left: 1px solid var(--pf-gray-100);
  border-bottom: none;
}

.pf-drawer-widget-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--pf-gray-100);
  color: var(--pf-gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-drawer-widget-body {
  flex: 1;
  min-width: 0;
  overflow: visible;
}

/* ==========================================================
   PERFECTO - MOBILE DRAWER BOTTOM BAR (60/40 SPLIT & UPWARD DROPDOWN)
   ========================================================== */

/* 1. Layout: 60% Language / 40% Currency */
.pf-drawer-bottom {
  overflow: visible;
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pf-drawer-widget.pf-drawer-lang {
    width: 60% !important;
}

.pf-drawer-widget.pf-drawer-currency {
    width: 40% !important;
}

/* 2. Reset the wrappers so they fill their containers */
.pf-menu-sidebar .pf-drawer-bottom .pf-topbar-item,
.pf-menu-sidebar .pf-drawer-bottom .pf-custom-dropdown {
    width: 100% !important;
    display: block !important;
    background: none !important;
    padding: 0 !important;
}

/* 3. The Main Buttons (Reduced Font Size) */
.pf-menu-sidebar .pf-drawer-bottom .pf-custom-dropdown .current-selected {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 6px 10px !important;
    
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: var(--pf-gray-900, #111827) !important;
    background: var(--pf-gray-100, #f3f4f6) !important;
    
    border-radius: 8px !important;
    cursor: pointer !important;
    border: 1.5px solid transparent !important;
    transition: all 0.18s ease !important;
    user-select: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pf-menu-sidebar .pf-drawer-bottom .pf-custom-dropdown .current-selected:hover {
    border-color: var(--pf-gray-300, #d1d5db) !important;
    background: #ffffff !important;
}

/* 4. FORCE DROPDOWN TO OPEN UPWARDS */
.pf-menu-sidebar .pf-drawer-bottom .pf-custom-dropdown {
    position: relative !important;
}

    .pf-menu-sidebar .pf-drawer-bottom .pf-topbar-item .pf-custom-dropdown .pf-dropdown-list,
    .pf-menu-sidebar .pf-drawer-bottom .pf-custom-dropdown .pf-dropdown-list {
        position: absolute !important;
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        left: 0 !important;
        right: auto !important;
        margin: 0 !important;
        width: 100% !important;
        min-width: 100% !important;

        background: #ffffff !important;
        border: 1.5px solid var(--pf-gray-200, #e5e7eb) !important;
        border-radius: 10px !important;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.10) !important;
        list-style: none !important;
        padding: 4px !important;
        z-index: 99999 !important;

        display: flex !important;
        flex-direction: column !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(6px) !important;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
        pointer-events: none !important;
    }

    /* 5. Open state */
    .pf-menu-sidebar .pf-drawer-bottom .pf-topbar-item .pf-custom-dropdown.open .pf-dropdown-list,
    .pf-menu-sidebar .pf-drawer-bottom .pf-custom-dropdown.open .pf-dropdown-list {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }

    /* Disable hover/focus-within open on mobile */
    .pf-menu-sidebar .pf-drawer-bottom .pf-topbar-item .pf-custom-dropdown:hover .pf-dropdown-list,
    .pf-menu-sidebar .pf-drawer-bottom .pf-topbar-item .pf-custom-dropdown:focus-within .pf-dropdown-list {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    .pf-menu-sidebar .pf-drawer-bottom .pf-topbar-item .pf-custom-dropdown.open:hover .pf-dropdown-list,
    .pf-menu-sidebar .pf-drawer-bottom .pf-topbar-item .pf-custom-dropdown.open:focus-within .pf-dropdown-list {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

/* 6. Dropdown List Links */
.pf-menu-sidebar .pf-drawer-bottom .pf-dropdown-list li a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: var(--pf-gray-700, #374151) !important;
    text-decoration: none !important;
    border-radius: 7px !important;
    transition: background 0.15s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.pf-menu-sidebar .pf-drawer-bottom .pf-dropdown-list li a:hover {
    background: var(--pf-gray-50, #f9fafb) !important;
    color: var(--pf-gray-900, #111827) !important;
}

/* 7. Currency Symbol Size */
.pf-menu-sidebar .pf-drawer-bottom .curr-symbol {
    font-size: 10px !important;
    color: var(--pf-gray-400, #9ca3af) !important;
}


/* Hide WooCommerce default variation data in sidebar */
.pf-cart-sidebar .pf-item-details dl.variation,
.pf-cart-sidebar .pf-item-details .wc-item-meta,
.pf-cart-sidebar .pf-item-details .variation {
    display: none !important;
}

/* ================================================================
   FIX: pf-sidebar-loading spinner
   ================================================================ */
.pf-cart-sidebar.pf-sidebar-loading .pf-cart-items-wrapper {
    position: relative;
    min-height: 200px;
}

.pf-cart-sidebar.pf-sidebar-loading .pf-cart-items-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.75);
    z-index: 10;
}

.pf-cart-sidebar.pf-sidebar-loading .pf-cart-items-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid var(--pf-gray-200, #e5e7eb);
    border-top-color: var(--pf-primary, #111827);
    border-radius: 50%;
    animation: pf-sidebar-spin 0.7s linear infinite;
    z-index: 11;
}

@keyframes pf-sidebar-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================
   PERFECTO — DRAWER CUSTOM BOTTOM MENU
   2-column grid · equal-width buttons · 6px radius
   ========================================================== */

.pf-drawer-custom-bottom-menu {
    flex-shrink: 0;
    border-top: 1px solid var(--pf-gray-100, #f3f4f6);
    padding: 14px 16px 12px;
    background: #fff;
}

/* Optional heading label */
.pf-drawer-custom-bottom-menu__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pf-gray-400, #9ca3af);
    margin-bottom: 9px;
    padding-left: 2px;
}

/* 2-column equal-width grid */
.pf-drawer-custom-bottom-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.pf-drawer-custom-bottom-menu__list > li {
    margin: 0;
    padding: 0;
    display: flex;
}

.pf-drawer-custom-bottom-menu__list > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    color: var(--pf-gray-600, #4b5563);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--pf-gray-200, #e5e7eb);
    background: var(--pf-gray-50, #f9fafb);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-drawer-custom-bottom-menu__list > li > a:hover,
.pf-drawer-custom-bottom-menu__list > li.current-menu-item > a {
    background: var(--pf-primary, #111827);
    color: #fff;
    border-color: var(--pf-primary, #111827);
}

/* Extra bottom padding when no lang/curr bar below */
.pf-drawer-has-custom-bottom-menu:not(.pf-drawer-has-bottom) .pf-drawer-custom-bottom-menu {
    padding-bottom: 18px;
}

/* ── Submenu inside custom bottom menu ── */

/* When a parent item has an open submenu, stretch it across both columns */
.pf-drawer-custom-bottom-menu__list > li.menu-item-has-children.submenu-open {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
}

/* Arrow indicator on parent link */
.pf-drawer-custom-bottom-menu__list .menu-item-has-children > a {
    position: relative;
    overflow: visible;
}
.pf-drawer-custom-bottom-menu__list .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    margin-left: 7px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.pf-drawer-custom-bottom-menu__list .menu-item-has-children.submenu-open > a::after {
    transform: rotate(-135deg) translateY(-2px);
}

/* Sub-menu list — hidden by default, shown via JS slideToggle */
.pf-drawer-custom-bottom-menu__list .sub-menu {
    display: none;
    list-style: none;
    margin: 6px 0 0;
    padding: 4px 0;
    border: 1px solid var(--pf-gray-200, #e5e7eb);
    border-radius: 6px;
    background: #fff;
    width: 100%;
}
.pf-drawer-custom-bottom-menu__list .sub-menu li {
    margin: 0;
}
.pf-drawer-custom-bottom-menu__list .sub-menu a {
    display: block;
    padding: 9px 14px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--pf-gray-600, #4b5563);
    text-decoration: none;
    text-align: left;
    border-bottom: 1px solid var(--pf-gray-100, #f3f4f6);
    transition: background 0.15s ease, color 0.15s ease;
}
.pf-drawer-custom-bottom-menu__list .sub-menu li:last-child > a {
    border-bottom: none;
}
.pf-drawer-custom-bottom-menu__list .sub-menu a:hover {
    background: var(--pf-gray-50, #f9fafb);
    color: var(--pf-primary, #111827);
}

/* ==========================================================
   MAX Z-INDEX OVERRIDE FOR ALL SIDEBARS
   ========================================================== */

.pf-sidebar,
.pf-cart-sidebar,
.pf-wishlist-sidebar,
.pf-menu-sidebar,
.shop-sidebar {
    z-index: 2147483647 !important; 
}