/* ==========================================================================
   ON THE LOOSE — CART STYLING
   ========================================================================== */

/* --- CART BADGE --- */
.cart-link {
  position: relative;
  color: #888 !important;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8e8e8;
  color: #0d0d0d;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
}

/* --- TOAST --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #e8e8e8;
  color: #0d0d0d;
  padding: 0.75rem 2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show { 
  opacity: 1; 
}

/* --- CART PAGE & GRID --- */
.cart-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 2.5rem;
  position: relative;
  z-index: 2;
}


/* --- CART TABLE --- */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: #888; /* Changed from #444 to #888 for high contrast */
  text-transform: uppercase;
  text-align: left;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid #222;
}

.cart-table td {
  padding: 1.2rem 0;
  border-bottom: 1px solid #1a1a1a;
  vertical-align: middle;
}

/* --- CART ITEMS --- */
.cart-item-info { 
  display: flex; 
  align-items: center; 
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  background: #1a1a1a;
  margin-right: 1rem;
}

.cart-item-name {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.1rem;
  color: #e0e0e0;
  letter-spacing: 2px;
  display: block;
}

.cart-item-spec {
  font-size: 0.7rem;
  color: #444;
  letter-spacing: 1px;
  display: block;
  margin-top: 2px;
}

.cart-item-size {
  font-size: 1rem;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
}
/* Add this to keep the price text readable */
.cart-item-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem;
  color: #e0e0e0;
  letter-spacing: 1px;
}

.qty-input {
  width: 50px;
  background: #111;
  border: 1px solid #333;
  color: #e0e0e0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.4rem;
  letter-spacing: 1px;
}

.remove-btn {
  background: none;
  border: none;
  color: #888; /* Changed from #444 to #888 so users can actually see it */
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}

.remove-btn:hover { 
  color: #ff4d4d; /* Optional: transitions to a subtle red on hover instead of pure white */
}

/* --- ORDER SUMMARY --- */
.order-summary {
  background: #111; /* Consistent with dark-mode theme */
  border: 1px solid #222;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.summary-label {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.3rem;
  color: #e0e0e0;
  letter-spacing: 3px;
  margin-bottom: 1.2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.summary-divider {
  height: 1px;
  background: #222;
  margin: 1rem 0;
}

.btn-checkout {
  width: 100%;
  background: #e8e8e8;
  color: #0d0d0d;
  padding: 0.9rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: background 0.2s;
}

.btn-checkout:hover { 
  background: #ccc; 
}

.btn-continue {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: #555;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.btn-continue:hover { 
  color: #ccc; 
}

/* --- EMPTY CART --- */
.empty-cart {
  padding: 5rem 2.5rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.empty-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 3rem;
  color: #fff; /* Changed to white so the glow pops; change back to #333 if you want dark text with a light halo */
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
  
  /* Multi-layered text-shadow for an intense, bright glow */
  text-shadow: 
    0 0 7px #fff,
    0 0 10px #fff,
    0 0 21px #fff,
    0 0 42px rgba(255, 255, 255, 0.8),
    0 0 82px rgba(255, 255, 255, 0.6),
    0 0 92px rgba(255, 255, 255, 0.4);
}

.empty-sub {
  font-size: 0.85rem;
  color: #fff; /* Changed to white so the glow pops; change back to #444 if you want dark text */
  letter-spacing: 2px;
  margin-bottom: 2rem;

  /* Layered glow scaled down for smaller text so it remains readable */
  text-shadow: 
    0 0 4px #fff,
    0 0 10px #fff,
    0 0 18px rgba(255, 255, 255, 0.8),
    0 0 30px rgba(255, 255, 255, 0.5);
}

.btn-back {
  display: inline-block;
  background: #e8e8e8;
  color: #0d0d0d;
  padding: 0.8rem 2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-back:hover { 
  background: #ccc; 
}

/* --- MISC HELPER STYLES --- */
.eyebrow-reveal {
  color: white;
}
/* --- PAGE HEADER STYLING (FAR LEFT) --- */
.page-header {
  text-align: left;
  padding: 1.5rem 2.5rem 1rem 2.5rem; /* Keeps a small 2.5rem padding so it doesn't touch the screen edge */
  position: relative;
  z-index: 2;
  
  /* Remove width limits so it stretches to the far left of the viewport */
  max-width: none !important; 
  margin: 0 !important;    
}

.page-header .eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #888; /* Lighter gray so it's readable */
  margin: 0 0 0.5rem 0;
}

.page-header .page-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 3.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff; /* Bright white so it stands out */
  margin: 0;
  line-height: 1;
}
/* --- BACK TO SHOP ARROW --- */
.back-to-shop {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #888;
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-to-shop .arrow {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

/* Hover Effects */
.back-to-shop:hover {
  color: #fff; /* Brightens up on hover */
}

.back-to-shop:hover .arrow {
  transform: translateX(-4px); /* Subtle bounce to the left */
}
/* ==========================================================================
   IPHONE SE TO IPHONE 17 PRO MAX RESPONSIVENESS (320px - 440px) WITH BLUR
   ========================================================================== */

/* --- MOBILE BREAKPOINT (Under 768px) --- */
@media (max-width: 768px) {
  /* 1. Stack checkout layout */
  .cart-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 1.25rem !important;
  }

  /* 2. Convert Table Structure to Blocks */
  .cart-table, 
  .cart-table thead, 
  .cart-table tbody, 
  .cart-table tr, 
  .cart-table td {
    display: block !important;
    width: 100% !important;
  }

  /* Hide raw desktop table headers */
  .cart-table thead {
    display: none !important;
  }

  /* 3. Re-structure Row using CSS Grid with premium glassmorphism blur */
  .cart-table tr {
    position: relative !important;
    padding: 1.25rem !important;
    margin-bottom: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    
    /* Premium Glassmorphism Blur background */
    background: rgba(10, 10, 10, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    
    /* Layout coordinates: Left Column for Image (80px), Right Column for details */
    display: grid !important;
    grid-template-columns: 80px 1fr !important;
    gap: 1rem !important;
    align-items: start !important;
  }

  /* 4. Column Content Spacing Rules */
  
  /* CELL 1: Image, Title, Specifications */
  .cart-table td:nth-child(1) {
    grid-column: 1 / -1 !important;
    padding: 0 !important;
    border: none !important;
  }

  .cart-item-info {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }

  .cart-item-img {
    width: 80px !important;
    height: 80px !important;
    margin-right: 0 !important;
    object-fit: cover !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  .cart-item-name {
    font-size: 1.1rem !important;
    letter-spacing: 1.5px !important;
    line-height: 1.2 !important;
    margin-bottom: 0.3rem !important;
    display: block !important;
    color: #fff !important;
    max-width: calc(100% - 60px) !important; /* Leaves room for remove button */
  }

  .cart-item-spec {
    font-size: 0.75rem !important;
    color: #555 !important;
    display: block !important;
  }

  /* CELL 2: Size */
  .cart-table td:nth-child(2) {
    grid-column: 2 !important;
    padding: 0 !important;
    border: none !important;
    margin-bottom: 0.5rem !important;
  }

  .cart-item-size::before {
    content: "SIZE: " !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 0.75rem !important;
    color: #555 !important;
  }

  .cart-item-size {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #fff !important;
  }

  /* CELL 3: Quantity Input with subtle blur */
  .cart-table td:nth-child(3) {
    grid-column: 2 !important;
    padding: 0 !important;
    border: none !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .cart-table td:nth-child(3)::before {
    content: "QTY:" !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 0.75rem !important;
    color: #555 !important;
  }

  .qty-input {
    width: 48px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
    padding: 0.2rem !important;
    color: #fff !important;
    text-align: center !important;
    
    /* Blurry input styling */
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  /* CELL 4: Price Row */
  .cart-table td:nth-child(4) {
    grid-column: 2 !important;
    padding: 0 !important;
    border: none !important;
  }

  .cart-item-price {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    display: block !important;
  }

  /* CELL 5: Remove Link */
  .cart-table td:nth-child(5) {
    position: absolute !important;
    top: 1.25rem !important;
    right: 1.25rem !important; /* Pushed inward to match card padding */
    padding: 0 !important;
    border: none !important;
    width: auto !important;
    z-index: 5 !important;
  }

  .remove-btn {
    font-size: 0.65rem !important;
    letter-spacing: 1.5px !important;
    color: #ff4d4d !important;
    opacity: 0.85 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
  }

  .remove-btn:hover {
    opacity: 1 !important;
    text-decoration: underline !important;
  }

  /* Order Summary Card with matching frosted glass design */
  .order-summary {
    position: static !important;
    width: 100% !important;
    padding: 1.5rem !important;
    box-sizing: border-box !important;
    
    background: rgba(10, 10, 10, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .page-header {
    padding: 1.5rem 1.25rem 0.5rem !important;
  }

  .page-header .page-title {
    font-size: 2.8rem !important;
  }
}

/* --- ADAPTATIONS FOR SMALLER VIEWPORTS (iPhone SE to Standard iPhones) --- */
@media (max-width: 375px) {
  .cart-table tr {
    grid-template-columns: 70px 1fr !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
  }

  .cart-item-img {
    width: 70px !important;
    height: 70px !important;
  }

  .cart-item-name {
    font-size: 0.95rem !important;
    max-width: calc(100% - 50px) !important;
  }

  .cart-item-size {
    font-size: 0.8rem !important;
  }

  .qty-input {
    width: 44px !important;
    height: 26px !important;
    font-size: 0.8rem !important;
  }

  .cart-item-price {
    font-size: 0.95rem !important;
  }
  
  .cart-table td:nth-child(5) {
    top: 1rem !important;
    right: 1rem !important;
  }
}