/**
 * Batul Herbs Theme - Main Stylesheet
 * Inspired by modern herbal e-commerce design
 * Fonts: Avenir (all pages - headings and body text)
 * Color Scheme: Warm brown accent (#8c5a4f primary, #f3ede8 light)
 */

/* ==========================================
   CUSTOM FONTS - AVENIR
   ========================================== */
@font-face {
  font-family: 'Avenir';
  src: url('../fonts/avenir/AvenirLight.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/avenir/AvenirBook.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/avenir/AvenirRegular.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/avenir/AvenirHeavy.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/avenir/AvenirBlack.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================
   CUSTOM FONTS - GOTHAM
   ========================================== */
@font-face {
  font-family: 'Avenir';
  src: url('../fonts/Gotham-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/Gotham Book Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/GOTHAM-MEDIUM.TTF') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/GOTHAM-MEDIUMITALIC.TTF') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/GOTHAM-BOLD.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Avenir';
  src: url('../fonts/Gotham-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ==========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================== */
:root {
  /* Colors - Inspired by justherbs.in */
  --color-accent: #8c5a4f;
  --color-accent-dark: #6d4439;
  --color-accent-light: #a67565;
  --color-text-primary: #2c2c2c;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-background: #ffffff;
  --color-background-secondary: #f8f8f8;
  --color-background-tertiary: #f4f1ed;
  --color-border: #e8e8e8;
  --color-success: #4caf50;
  --color-danger: #dc3545;
  --color-warning: #ff9800;

  /* Typography */
  --font-heading: 'Avenir', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Avenir', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;

  /* Container */
  --container-max-width: none;
  --container-padding: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100vh;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Make main content area grow to push footer down */
body > * {
  flex-shrink: 0;
}

#checkout-cart,
#content,
.container {
  flex: 1 0 auto;
}

/* Footer always at bottom */
footer,
#footer {
  margin-top: auto;
  flex-shrink: 0;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-dark);
}

/* ==========================================
   CONTAINER & LAYOUT
   ========================================== */
.container,
#content .container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

/* ==========================================
   HEADER STYLES
   ========================================== */
#header {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
#logo {
  flex: 0 0 auto;
}

#logo a {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.5px;
}

#logo img {
  max-height: 65px;
  width: auto;
}

/* Navigation */
#menu {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

#menu .nav {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
}

#menu .nav > li > a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

#menu .nav > li > a:hover,
#menu .nav > li.active > a {
  color: var(--color-accent);
  background: var(--color-background-tertiary);
}

/* Header Actions */
#header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

#search {
  position: relative;
}

#search input {
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 250px;
  transition: all var(--transition-fast);
}

#search input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(140, 90, 79, 0.1);
}

/* Cart */
#header-cart {
  position: relative;
}

#cart button {
  background: var(--color-accent);
  color: white;
  border: none;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

#cart button:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ==========================================
   PRODUCT GRID
   ========================================== */
.product-layout {
  margin-bottom: var(--spacing-lg);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
}

/* ==========================================
   PRODUCT CARD (Thumb)
   ========================================== */
.product-thumb {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-thumb:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-accent-light);
}

/* Product Image */
.product-thumb .image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--color-background-secondary);
}

.product-thumb .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-thumb:hover .image img {
  transform: scale(1.08);
}

/* Product Content */
.product-thumb .content {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-thumb .description {
  flex: 1;
}

.product-thumb h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.product-thumb h4 a {
  color: var(--color-text-primary);
  transition: color var(--transition-fast);
}

.product-thumb h4 a:hover {
  color: var(--color-accent);
}

.product-description {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product Price */
.product-thumb .price {
  margin: var(--spacing-sm) 0;
}

.price-new {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-accent);
}

.price-old {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-left: var(--spacing-xs);
}

.price small.text-muted {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-left: var(--spacing-xs);
}

/* Product Rating */
.product-thumb .rating {
  margin-bottom: var(--spacing-sm);
  color: var(--color-warning);
  font-size: 0.9rem;
}

/* Product Buttons */
.product-thumb .button-group {
  display: flex;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
}

.product-thumb .button-group button {
  flex: 1;
  background: var(--color-accent);
  color: white;
  border: none;
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
}

.product-thumb .button-group button:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-thumb .button-group button i {
  font-size: 1rem;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

/* ==========================================
   FOOTER
   ========================================== */
#footer {
  background: var(--color-background-tertiary);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-xxl);
}

#footer h5 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
}

#footer ul {
  list-style: none;
  padding: 0;
}

#footer ul li {
  margin-bottom: var(--spacing-xs);
}

#footer ul li a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

#footer ul li a:hover {
  color: var(--color-accent);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --container-padding: 1.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-md);
  }

  #menu .nav {
    gap: var(--spacing-sm);
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* Cart Table - Default (Mobile < 768px) */
/* Hide desktop quantity controls by default */
.desktop-qty-controls {
  display: none !important;
}

/* Show mobile controls by default */
.mobile-qty-controls {
  display: block !important;
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --container-padding: 1rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--spacing-sm);
  }

  #header .container {
    flex-wrap: wrap;
  }

  /* Remove header padding on mobile */
  body #header,
  body header,
  #header.py-3,
  header.py-3,
  #header .container,
  header .container {
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Mobile header - center logo by making it single column */
  .header-row.align-items-center {
    display: block !important;
    text-align: center !important;
  }

  .header-logo-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
  }

  .header-icons-col {
    display: none !important;
  }

  #logo {
    text-align: center !important;
    margin: 0 auto !important;
  }

  #logo img {
    max-height: 65px !important;
    display: inline-block !important;
  }

  /* Full width banners on mobile */
  [id^="carousel-banner-"] {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: 100vw !important;
    padding: 0 !important;
    min-height: 250px !important;
  }

  .carousel-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 250px !important;
  }

  .carousel-item {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 250px !important;
  }

  .carousel-item img {
    min-height: 250px !important;
    object-fit: cover !important;
  }

  .carousel .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  /* Carousel indicators (dots) - position inside banner at bottom center */
  .carousel-indicators {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    z-index: 10 !important;
  }

  .carousel-indicators [data-bs-target] {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: none !important;
    margin: 0 5px !important;
  }

  .carousel-indicators .active {
    background-color: rgba(255, 255, 255, 1) !important;
    width: 12px !important;
    height: 12px !important;
  }

  #menu {
    order: 3;
    width: 100%;
    margin-top: var(--spacing-sm);
  }

  #menu .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  #search input {
    width: 180px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .price-new {
    font-size: 1.2rem;
  }

  /* Quantity controls for product cards */
  .product-thumb .qty-controls,
  div.qty-controls {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 8px 15px !important;
    background: #8c5a4f !important;
    border-radius: 5px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .product-thumb .qty-controls[style*="display: flex"],
  .product-thumb .qty-controls[style*="display:flex"],
  div.qty-controls[style*="display: flex"],
  div.qty-controls[style*="display:flex"],
  .qty-controls.active {
    display: flex !important;
  }

  .product-thumb .qty-controls .qty-btn,
  div.qty-controls .qty-btn {
    background: white !important;
    color: #8c5a4f !important;
    border: none !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
  }

  .product-thumb .qty-controls .qty-btn:active,
  div.qty-controls .qty-btn:active {
    background: #f0f0f0 !important;
  }

  .product-thumb .qty-controls .qty-display,
  div.qty-controls .qty-display {
    color: white !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    min-width: 40px !important;
    min-height: 30px !important;
    padding: 0 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .product-thumb .button-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  .product-thumb .btn-buy-now {
    width: 100% !important;
  }

  /* Mobile Cart Styling */
  .desktop-cart-view {
    display: none !important;
  }

  .mobile-cart-view {
    display: block !important;
    padding: 0 !important;
    margin-top: 20px !important;
  }

  /* Mobile Empty Cart */
  .mobile-empty-cart {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 20px !important;
    text-align: center !important;
    min-height: 60vh !important;
  }

  .empty-cart-icon {
    font-size: 5rem !important;
    color: #8c5a4f !important;
    margin-bottom: 20px !important;
    opacity: 0.3 !important;
  }

  .empty-cart-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #333 !important;
    margin-bottom: 10px !important;
  }

  .empty-cart-text {
    font-family: 'Avenir', sans-serif !important;
    font-size: 0.95rem !important;
    color: #666 !important;
    margin-bottom: 30px !important;
    line-height: 1.5 !important;
  }

  .btn-start-shopping {
    display: inline-block !important;
    padding: 15px 40px !important;
    background: #8c5a4f !important;
    color: white !important;
    text-decoration: none !important;
    font-family: 'Avenir', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    transition: all 0.3s ease !important;
  }

  .btn-start-shopping:hover {
    background: #6d4439 !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(140, 90, 79, 0.3) !important;
  }

  .btn-start-shopping:active {
    background: #6d4439 !important;
    transform: translateY(0) !important;
  }

  .mobile-cart-item {
    background: white !important;
    border-bottom: none !important;
    padding: 15px !important;
    margin-bottom: 10px !important;
  }

  .cart-item-main {
    display: flex !important;
    gap: 12px !important;
    align-items: flex-start !important;
  }

  .cart-item-image {
    flex-shrink: 0 !important;
  }

  .cart-item-image img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }

  .cart-item-details {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .cart-item-details h6 {
    font-family: 'Avenir', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    margin: 0 0 5px 0 !important;
    line-height: 1.3 !important;
  }

  .cart-item-details h6 a {
    color: #333 !important;
    text-decoration: none !important;
  }

  .item-label {
    display: inline-block !important;
    background: none !important;
    color: #888 !important;
    font-size: 0.8rem !important;
    padding: 0 !important;
    margin-bottom: 5px !important;
  }

  /* Cart item actions - price, qty, delete in one row below title */
  .cart-item-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
  }

  .cart-item-price {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .cart-item-price .price-current {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #8c5a4f !important;
  }

  .qty-form {
    flex: 0 0 auto !important;
  }

  .cart-item-qty {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 5px 10px !important;
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
  }

  .remove-form {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .btn-remove {
    background: none !important;
    border: none !important;
    color: #dc3545 !important;
    font-size: 1.2rem !important;
    padding: 5px !important;
    cursor: pointer !important;
  }

  .btn-remove:active {
    color: #bb2d3b !important;
  }

  .qty-btn-mobile {
    background: white !important;
    color: #8c5a4f !important;
    border: 1px solid #8c5a4f !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .qty-btn-mobile:active {
    background: #8c5a4f !important;
    color: white !important;
  }

  .qty-input-mobile {
    border: none !important;
    text-align: center !important;
    width: 40px !important;
    font-family: 'Avenir', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    background: transparent !important;
  }

  .mobile-cart-footer {
    background: white !important;
    padding: 0 !important;
    border-top: none !important;
    position: sticky !important;
    bottom: 0 !important;
  }

  .cart-total-mobile .total-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    font-family: 'Avenir', sans-serif !important;
  }

  .cart-total-mobile .total-row:last-child {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #8c5a4f !important;
    border-top: 2px solid #e0e0e0 !important;
    padding-top: 12px !important;
    margin-top: 8px !important;
  }

  /* Hide cart page title and breadcrumb on mobile */
  #checkout-cart .breadcrumb,
  #checkout-cart ul.breadcrumb,
  #checkout-cart .container .breadcrumb,
  #checkout-cart .container > ul.breadcrumb {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  #checkout-cart h1,
  #checkout-cart .container > .row > .col > h1,
  #checkout-cart #content h1,
  #content h1 {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Hide bottom nav on cart page */
  body:has(#checkout-cart) .mobile-bottom-nav {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    position: absolute !important;
    top: -9999px !important;
  }

  /* Hide header and global mobile header on cart page */
  body:has(#checkout-cart) header,
  body:has(#checkout-cart) #header,
  body:has(#checkout-cart) .mobile-page-header {
    display: none !important;
  }

  /* Mobile Cart Header */
  .mobile-cart-header {
    display: none !important;
  }

  body:has(#checkout-cart) .mobile-cart-header {
    display: flex !important;
    align-items: center !important;
    padding: 15px !important;
    background: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    gap: 15px !important;
  }

  .mobile-cart-back {
    background: none !important;
    border: none !important;
    font-size: 1.3rem !important;
    color: #333 !important;
    padding: 5px !important;
    cursor: pointer !important;
  }

  .mobile-cart-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    flex: 1 !important;
    text-align: center !important;
  }

  /* Hide modules section on mobile */
  .desktop-only-text,
  .desktop-only-modules {
    display: none !important;
  }

  /* Hide desktop cart summary on mobile */
  .desktop-cart-summary {
    display: none !important;
  }

  /* Hide desktop empty cart on mobile */
  .desktop-empty-cart {
    display: none !important;
  }

  /* Hide desktop cart header on mobile */
  .desktop-cart-header {
    display: none !important;
  }

  /* Hide desktop checkout header on mobile */
  .desktop-checkout-header {
    display: none !important;
  }

  /* Mobile Checkout Page Styles */
  /* Hide bottom nav on checkout page */
  body:has(#checkout-checkout) .mobile-bottom-nav {
    display: none !important;
  }

  /* Hide regular header and global mobile header on checkout page */
  body:has(#checkout-checkout) header,
  body:has(#checkout-checkout) #header,
  body:has(#checkout-checkout) .mobile-page-header {
    display: none !important;
  }

  /* Hide breadcrumb on checkout */
  #checkout-checkout .breadcrumb {
    display: none !important;
  }

  /* Mobile Checkout Header */
  .mobile-checkout-header {
    display: none !important;
  }

  body:has(#checkout-checkout) .mobile-checkout-header {
    display: flex !important;
    align-items: center !important;
    padding: 15px !important;
    background: white !important;
    border-bottom: 1px solid #e0e0e0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    gap: 15px !important;
  }

  .mobile-checkout-back {
    background: none !important;
    border: none !important;
    font-size: 1.3rem !important;
    color: #333 !important;
    padding: 5px !important;
    cursor: pointer !important;
  }

  .mobile-checkout-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    flex: 1 !important;
    text-align: center !important;
  }

  /* Hide bottom buttons on mobile */
  .cart-bottom-buttons {
    display: none !important;
  }

  /* Mobile Coupon Section */
  .mobile-coupon-section {
    display: block !important;
    padding: 0 !important;
    background: white !important;
    border-bottom: none !important;
    margin-bottom: 10px !important;
  }

  .coupon-input-group {
    display: flex !important;
    gap: 10px !important;
  }

  .coupon-input {
    flex: 1 !important;
    padding: 12px 15px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-family: 'Avenir', sans-serif !important;
    font-size: 0.95rem !important;
  }

  .coupon-input::placeholder {
    color: #999 !important;
  }

  .coupon-apply-btn {
    padding: 12px 25px !important;
    background: #8c5a4f !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Avenir', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
  }

  .coupon-apply-btn:active {
    background: #6d4439 !important;
  }

  /* Mobile Sticky Checkout Button */
  .mobile-sticky-checkout {
    display: none !important;
  }

  body:has(#checkout-cart) .mobile-sticky-checkout {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 15px !important;
    background: white !important;
    border-top: 1px solid #e0e0e0 !important;
    z-index: 999 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
  }

  /* Hide checkout button when cart is empty */
  body:has(.mobile-empty-cart) .mobile-sticky-checkout {
    display: none !important;
  }

  .btn-checkout-mobile {
    display: block !important;
    width: 100% !important;
    padding: 15px !important;
    background: #8c5a4f !important;
    color: white !important;
    text-align: center !important;
    text-decoration: none !important;
    font-family: 'Avenir', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
  }

  .btn-checkout-mobile:hover {
    color: white !important;
  }

  .btn-checkout-mobile:active {
    background: #6d4439 !important;
  }

  /* Add padding to body for sticky button */
  body:has(#checkout-cart) {
    padding-bottom: 80px !important;
  }

  /* Mobile cart footer totals */
  .mobile-cart-footer {
    display: block !important;
    background: white !important;
    padding: 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
  }

  .cart-total-mobile .total-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px !important;
    font-family: 'Avenir', sans-serif !important;
    font-size: 0.95rem !important;
    border-bottom: none !important;
  }

  .cart-total-mobile .total-row:last-child {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #8c5a4f !important;
    border-bottom: none !important;
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .cart-total-mobile .total-row span:first-child {
    color: #666 !important;
  }

  .cart-total-mobile .total-row span:last-child {
    font-weight: 600 !important;
    color: #333 !important;
  }

  .cart-total-mobile .total-row:last-child span {
    color: #8c5a4f !important;
  }
}

/* Desktop - show coupon section hidden on mobile */
@media (min-width: 768px) {
  .mobile-cart-header {
    display: none !important;
  }

  .mobile-coupon-section {
    display: none !important;
  }

  .mobile-sticky-checkout {
    display: none !important;
  }
}

/* Desktop cart */
@media (min-width: 768px) {
  .mobile-cart-view {
    display: none !important;
  }

  .desktop-cart-view {
    display: block !important;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-thumb .content {
    padding: var(--spacing-sm);
  }

  .product-thumb h4 {
    font-size: 0.95rem;
  }

  .product-description {
    font-size: 0.8rem;
  }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--color-text-muted); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-primary { color: var(--color-accent); }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--spacing-xs) !important; }
.mb-2 { margin-bottom: var(--spacing-sm) !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--spacing-xs) !important; }
.mt-2 { margin-top: var(--spacing-sm) !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.mt-4 { margin-top: var(--spacing-lg) !important; }

/* Home Page Featured Products - Custom Styling */
.row.row-cols-2 .product-description,
.row-cols-2 .product-thumb .product-description {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.row.row-cols-2 .price-tax,
.row-cols-2 .product-thumb .price-tax {
  display: none !important;
  visibility: hidden !important;
}

.row.row-cols-2 .text-muted,
.row-cols-2 .product-thumb .text-muted {
  display: none !important;
  visibility: hidden !important;
}

.row.row-cols-2 h4 a,
.row-cols-2 .product-thumb h4 a {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.4 !important;
  max-height: 2.8em !important;
  white-space: normal !important;
}

/* Remove underline from product titles */
.row.row-cols-2 h4 a,
.row-cols-2 .product-thumb h4 a {
  text-decoration: none !important;
}

.row.row-cols-2 h4 a:hover,
.row-cols-2 .product-thumb h4 a:hover {
  text-decoration: none !important;
}

/* Product titles not bold on home page */
.row.row-cols-2 h4,
.row.row-cols-2 h4 a,
.row-cols-2 .product-thumb h4,
.row-cols-2 .product-thumb h4 a {
  font-weight: 400 !important;
  text-align: center !important;
}

/* Center align prices on home page */
.row.row-cols-2 .price,
.row-cols-2 .product-thumb .price {
  text-align: center !important;
}

/* Remove border from product thumbnails on home page */
.row.row-cols-2 .product-thumb,
.row-cols-2 .product-thumb {
  border: none !important;
  border: 0 !important;
}

/* Remove padding from prices on home page products */
.row.row-cols-2 .price,
.row-cols-2 .product-thumb .price {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.row.row-cols-2 .price-new,
.row.row-cols-2 .price-old,
.row-cols-2 .product-thumb .price-new,
.row-cols-2 .product-thumb .price-old {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Force 4 columns on home products at lg breakpoint (1025px) instead of xl (1200px) */
@media (min-width: 1025px) {
  .row.row-cols-md-3 > *,
  .row-cols-md-3 > * {
    width: 25% !important;
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}

/* 5 columns on home products at 1250px+ */
@media (min-width: 1250px) {
  .row.row-cols-md-3 > *,
  .row-cols-md-3 > * {
    width: 20% !important;
    flex: 0 0 20% !important;
    max-width: 20% !important;
  }
}

/* Remove padding-top from buy now button on home products */
.row.row-cols-2 .button-group button,
.row-cols-2 .product-thumb .button-group button,
.row.row-cols-2 button[formaction*="add_to_cart"],
.row-cols-2 .product-thumb button[formaction*="add_to_cart"] {
  padding-top: 0 !important;
}

/* Responsive font sizes for home products */
/* Mobile - smaller fonts */
@media (max-width: 767px) {
  .row.row-cols-2 h4,
  .row.row-cols-2 h4 a,
  .row-cols-2 .product-thumb h4,
  .row-cols-2 .product-thumb h4 a {
    font-size: 0.85rem !important;
  }

  .row.row-cols-2 .price-new,
  .row.row-cols-2 .price-old,
  .row-cols-2 .product-thumb .price-new,
  .row-cols-2 .product-thumb .price-old {
    font-size: 0.9rem !important;
  }

  .row.row-cols-2 .button-group button,
  .row-cols-2 .product-thumb .button-group button {
    font-size: 0.8rem !important;
  }
}

/* Tablet - medium fonts */
@media (min-width: 768px) and (max-width: 1024px) {
  .row.row-cols-2 h4,
  .row.row-cols-2 h4 a,
  .row-cols-2 .product-thumb h4,
  .row-cols-2 .product-thumb h4 a {
    font-size: 0.95rem !important;
  }

  .row.row-cols-2 .price-new,
  .row.row-cols-2 .price-old,
  .row-cols-2 .product-thumb .price-new,
  .row-cols-2 .product-thumb .price-old {
    font-size: 1rem !important;
  }

  .row.row-cols-2 .button-group button,
  .row-cols-2 .product-thumb .button-group button {
    font-size: 0.85rem !important;
  }
}

/* Desktop - larger fonts */
@media (min-width: 1025px) {
  .row.row-cols-2 h4,
  .row.row-cols-2 h4 a,
  .row-cols-2 .product-thumb h4,
  .row-cols-2 .product-thumb h4 a {
    font-size: 1rem !important;
  }

  .row.row-cols-2 .price-new,
  .row.row-cols-2 .price-old,
  .row-cols-2 .product-thumb .price-new,
  .row-cols-2 .product-thumb .price-old {
    font-size: 1.1rem !important;
  }

  .row.row-cols-2 .button-group button,
  .row-cols-2 .product-thumb .button-group button {
    font-size: 0.9rem !important;
  }
}

/* Remove padding-top from button-group container on home products */
.row.row-cols-2 .button-group,
.row-cols-2 .product-thumb .button-group {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Restore button padding-top (revert previous change) */
.row.row-cols-2 .button-group button,
.row-cols-2 .product-thumb .button-group button,
.row.row-cols-2 button[formaction*="add_to_cart"],
.row-cols-2 .product-thumb button[formaction*="add_to_cart"] {
  padding-top: inherit !important;
}

/* Ensure buy now button has padding-top on home products */
.row.row-cols-2 .button-group button,
.row-cols-2 .product-thumb .button-group button,
.row.row-cols-2 button[formaction*="add_to_cart"],
.row-cols-2 .product-thumb button[formaction*="add_to_cart"] {
  padding-top: 0.5rem !important;
}

/* Revert button padding-top to default */
.row.row-cols-2 .button-group button,
.row-cols-2 .product-thumb .button-group button,
.row.row-cols-2 button[formaction*="add_to_cart"],
.row-cols-2 .product-thumb button[formaction*="add_to_cart"] {
  padding-top: revert !important;
}

/* Add padding-top for buy now button text on home products */
.row.row-cols-2 .button-group button,
.row-cols-2 .product-thumb .button-group button,
.row.row-cols-2 button[formaction*="add_to_cart"],
.row-cols-2 .product-thumb button[formaction*="add_to_cart"] {
  padding-top: 0.75rem !important;
}

/* Set buy now button padding to 0.5rem top and bottom on home products */
.row.row-cols-2 .button-group button,
.row-cols-2 .product-thumb .button-group button,
.row.row-cols-2 button[formaction*="add_to_cart"],
.row-cols-2 .product-thumb button[formaction*="add_to_cart"] {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Updated responsive grid for home products */
/* 4 columns between 768px - 1024px (tablet) */
@media (min-width: 768px) and (max-width: 1024px) {
  .row.row-cols-md-3 > *,
  .row-cols-md-3 > * {
    width: 25% !important;
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}

/* 5 columns from 1025px and above (desktop) */
@media (min-width: 1025px) {
  .row.row-cols-md-3 > *,
  .row-cols-md-3 > * {
    width: 20% !important;
    flex: 0 0 20% !important;
    max-width: 20% !important;
  }
}

/* ========================================
   TABLET & DESKTOP CART PAGE REDESIGN (≥768px)
   ======================================== */
@media (min-width: 768px) {
  /* Hide mobile quantity controls on tablet/desktop */
  .desktop-cart-table .mobile-qty-controls {
    display: none !important;
  }

  /* Show desktop quantity controls */
  .desktop-cart-table .desktop-qty-controls {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }

  /* Hide model column on tablet & desktop */
  .desktop-cart-model-cell {
    display: none !important;
  }

  /* Model column header is hidden (thead is completely hidden) */

  /* Give more space to product name (takes model column space) */
  .desktop-cart-name-cell {
    width: auto !important;
  }

  /* Table container styling */
  .desktop-cart-view {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
  }

  /* Table styling */
  .desktop-cart-table {
    border: none !important;
    border-top: none !important;
    margin-bottom: 0 !important;
  }

  /* ===== NEW CART LAYOUT: 60% LEFT (PRODUCTS) + 40% RIGHT (SUMMARY) ===== */

  /* Main Layout Container */
  .desktop-cart-layout {
    display: flex !important;
    gap: 30px !important;
    align-items: flex-start !important;
  }

  /* Left Section: Products (60%) */
  .desktop-cart-products {
    flex: 0 0 60% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* Individual Product Item */
  .desktop-cart-item {
    display: flex !important;
    gap: 20px !important;
    background: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 20px !important;
    transition: box-shadow 0.2s ease !important;
  }

  .desktop-cart-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  }

  /* Product Image (20% of item) */
  .desktop-cart-item-image {
    flex: 0 0 20% !important;
  }

  .desktop-cart-item-image img {
    width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
    object-fit: cover !important;
  }

  /* Product Content (80% of item) */
  .desktop-cart-item-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 15px !important;
  }

  /* Product Title */
  .desktop-cart-item-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #2c2c2c !important;
    margin: 0 !important;
    line-height: 1.4 !important;
  }

  .desktop-cart-item-title a {
    color: #2c2c2c !important;
    text-decoration: none !important;
  }

  .desktop-cart-item-title a:hover {
    color: #8c5a4f !important;
  }

  /* Product Options */
  .desktop-cart-item-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }

  .desktop-cart-item-options small {
    color: #666 !important;
    font-size: 0.85rem !important;
  }

  /* Price + Quantity Controls + Delete in Same Row */
  .desktop-cart-item-actions {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
  }

  /* Price in Actions Row */
  .desktop-cart-item-actions .desktop-price-total {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #8c5a4f !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
  }

  .desktop-cart-item-actions .desktop-qty-controls {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
  }

  .desktop-cart-item-actions .desktop-qty-btn {
    background: none !important;
    border: none !important;
    color: #8c5a4f !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    transition: color 0.2s ease !important;
  }

  .desktop-cart-item-actions .desktop-qty-btn:hover {
    color: #6d4439 !important;
  }

  .desktop-cart-item-actions .desktop-qty-display {
    font-weight: 600 !important;
    color: #2c2c2c !important;
    min-width: 30px !important;
    text-align: center !important;
  }

  .desktop-cart-item-actions .desktop-remove-form {
    margin: 0 !important;
  }

  .desktop-cart-item-actions .desktop-remove-btn {
    background: none !important;
    border: none !important;
    color: #dc3545 !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    padding: 8px 12px !important;
    transition: color 0.2s ease !important;
  }

  .desktop-cart-item-actions .desktop-remove-btn:hover {
    color: #c82333 !important;
  }

  /* Old pricing section removed - price is now in actions row */

  /* Right Section: Summary Sidebar (40%) */
  .desktop-cart-summary-sidebar {
    flex: 0 0 40% !important;
    position: sticky !important;
    top: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* Summary Box */
  .desktop-summary-box {
    background: white !important;
    border: 2px solid #e8e8e8 !important;
    border-radius: 8px !important;
    padding: 25px !important;
  }

  .desktop-summary-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #2c2c2c !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  .desktop-summary-row {
    display: flex !important;
    justify-content: space-between !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  .desktop-summary-row:first-of-type {
    padding-top: 0 !important;
  }

  .desktop-summary-label {
    color: #666 !important;
    font-size: 1rem !important;
  }

  .desktop-summary-amount {
    color: #2c2c2c !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
  }

  .desktop-summary-grand {
    padding: 8px 0 !important;
    margin: 0 !important;
    border: none !important;
    font-size: 1.2rem !important;
  }

  .desktop-summary-grand .desktop-summary-label {
    color: #2c2c2c !important;
    font-weight: 700 !important;
  }

  .desktop-summary-grand .desktop-summary-amount {
    color: #8c5a4f !important;
    font-weight: 700 !important;
    font-size: 1.3rem !important;
  }

  /* Coupon Box */
  .desktop-coupon-box {
    background: #f8f8f8 !important;
    border-radius: 8px !important;
    padding: 20px !important;
  }

  .desktop-coupon-box-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #2c2c2c !important;
    margin: 0 0 15px 0 !important;
  }

  .desktop-coupon-input-group {
    display: flex !important;
    gap: 10px !important;
  }

  .desktop-coupon-input-field {
    flex: 1 !important;
    padding: 12px 15px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    font-size: 0.95rem !important;
  }

  .desktop-coupon-input-field:focus {
    outline: none !important;
    border-color: #8c5a4f !important;
  }

  .desktop-coupon-apply-btn {
    padding: 12px 25px !important;
    background: #8c5a4f !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    white-space: nowrap !important;
  }

  .desktop-coupon-apply-btn:hover {
    background: #6d4439 !important;
  }

  /* Full-Width Checkout Button */
  .desktop-btn-checkout-full {
    display: block !important;
    width: 100% !important;
    padding: 16px 20px !important;
    background: #8c5a4f !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }

  .desktop-btn-checkout-full:hover {
    background: #6d4439 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(140, 90, 79, 0.3) !important;
  }

  /* Table body rows */
  .desktop-cart-row {
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background 0.2s ease !important;
  }

  .desktop-cart-row:hover {
    background: #fafafa !important;
  }

  .desktop-cart-row:last-child {
    border-bottom: none !important;
  }

  .desktop-cart-row td {
    padding: 20px !important;
    vertical-align: middle !important;
    border: none !important;
  }

  /* Product image styling */
  .desktop-cart-image-cell {
    width: 140px !important;
  }

  .desktop-cart-image {
    width: 100px !important;
    height: 100px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
  }

  /* Product name styling */
  .desktop-cart-product-name {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
  }

  .desktop-cart-product-name:hover {
    color: #8c5a4f !important;
  }

  .desktop-cart-name-cell small {
    color: #999 !important;
    font-size: 0.85rem !important;
  }

  /* Model column styling */
  .desktop-cart-model-cell {
    color: #999 !important;
    font-size: 0.9rem !important;
    width: 120px !important;
  }

  /* Quantity cell styling */
  .desktop-cart-quantity-cell {
    width: 220px !important;
  }

  /* Desktop quantity controls */
  .desktop-qty-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 2px solid #8c5a4f !important;
    background: white !important;
    color: #8c5a4f !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.9rem !important;
  }

  .desktop-qty-btn:hover {
    background: #8c5a4f !important;
    color: white !important;
    transform: scale(1.05) !important;
  }

  .desktop-qty-btn:active {
    transform: scale(0.95) !important;
  }

  .desktop-qty-display {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    color: #333 !important;
    min-width: 30px !important;
    text-align: center !important;
  }

  /* Desktop remove button */
  .desktop-remove-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 2px solid #dc3545 !important;
    background: white !important;
    color: #dc3545 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 0.9rem !important;
  }

  .desktop-remove-btn:hover {
    background: #dc3545 !important;
    color: white !important;
    transform: scale(1.05) !important;
  }

  .desktop-remove-btn:active {
    transform: scale(0.95) !important;
  }

  /* Price and total styling */
  .desktop-cart-price-cell,
  .desktop-cart-total-cell {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    color: #8c5a4f !important;
  }

  .desktop-cart-price-cell {
    width: 120px !important;
  }

  .desktop-cart-total-cell {
    width: 130px !important;
  }

  /* Table footer (totals) styling */
  .desktop-cart-table tfoot tr {
    border: none !important;
  }

  .desktop-cart-table tfoot tr:first-child {
    border-top: 2px solid #e8e8e8 !important;
  }

  .desktop-cart-table tfoot tr td {
    padding: 15px 20px !important;
    border: none !important;
    font-size: 1rem !important;
  }

  /* Total labels and values */
  .desktop-total-label {
    color: #333 !important;
  }

  .desktop-total-value {
    color: #8c5a4f !important;
    font-weight: 600 !important;
  }

  .desktop-cart-table tfoot tr:last-child td {
    font-weight: 700 !important;
    font-size: 1.3rem !important;
    color: #8c5a4f !important;
    padding-top: 20px !important;
  }
}

/* Tablet-specific adjustments (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Make table more compact for tablet */
  .desktop-cart-row td {
    padding: 12px 10px !important;
  }

  /* Smaller image on tablet */
  .desktop-cart-image {
    width: 80px !important;
    height: 80px !important;
  }

  .desktop-cart-image-cell {
    width: 100px !important;
  }

  /* Compact quantity cell */
  .desktop-cart-quantity-cell {
    width: 180px !important;
  }

  /* Smaller quantity buttons */
  .desktop-qty-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
  }

  .desktop-remove-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
  }

  .desktop-qty-display {
    font-size: 1rem !important;
    min-width: 25px !important;
  }

  /* Compact price and total columns */
  .desktop-cart-price-cell {
    width: 90px !important;
    font-size: 1rem !important;
  }

  .desktop-cart-total-cell {
    width: 100px !important;
    font-size: 1rem !important;
  }

  /* Smaller product name */
  .desktop-cart-product-name {
    font-size: 0.9rem !important;
  }

  /* Compact footer totals */
  .desktop-cart-table tfoot tr td {
    padding: 12px 10px !important;
    font-size: 0.9rem !important;
  }

  .desktop-cart-table tfoot tr:last-child td {
    font-size: 1.1rem !important;
  }

  /* Adjust footer for tablet - hide one cell to compensate for hidden model column */
  .desktop-cart-table tfoot tr td:nth-child(1).desktop-total-label {
    display: table-cell !important;
  }

  /* Make table responsive on tablet */
  .desktop-cart-table {
    table-layout: auto !important;
  }

  .desktop-cart-total-row .desktop-total-value {
    min-width: 110px !important;
    max-width: 110px !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  /* Reduce table container padding */
  .desktop-cart-view {
    padding: 15px !important;
  }

  /* Tablet: Smaller coupon and totals section */
  .desktop-cart-summary-row {
    gap: 20px !important;
  }

  .desktop-coupon-title {
    font-size: 1rem !important;
  }

  .desktop-coupon-input {
    font-size: 0.9rem !important;
    padding: 10px 12px !important;
  }

  .desktop-coupon-btn {
    font-size: 0.9rem !important;
    padding: 10px 20px !important;
  }

  .desktop-totals-box {
    padding: 20px !important;
  }

  .desktop-total-row {
    font-size: 0.95rem !important;
  }

  .desktop-total-grand {
    font-size: 1.1rem !important;
  }
}

/* Desktop quantity controls - larger and more spacious */
@media (min-width: 768px) {
  /* Desktop/Tablet Cart Header */
  .desktop-cart-header {
    display: flex !important;
    align-items: center !important;
    padding: 20px 0 !important;
    gap: 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
  }

  .desktop-cart-back {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #333 !important;
    padding: 8px !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
  }

  .desktop-cart-back:hover {
    color: #8c5a4f !important;
  }

  .desktop-cart-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 !important;
  }

  /* Hide mobile cart header on desktop/tablet */
  .mobile-cart-header {
    display: none !important;
  }

  /* Desktop/Tablet Checkout Header */
  .desktop-checkout-header {
    display: flex !important;
    align-items: center !important;
    padding: 20px 0 !important;
    gap: 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
  }

  .desktop-checkout-back {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #333 !important;
    padding: 8px !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
  }

  .desktop-checkout-back:hover {
    color: #8c5a4f !important;
  }

  .desktop-checkout-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 !important;
  }

  /* Checkout Page Content Styling */
  #checkout-checkout .container {
    max-width: 1200px !important;
  }

  #checkout-checkout .row {
    gap: 30px !important;
  }

  #checkout-checkout .col-md-7 {
    background: white !important;
    border-radius: 8px !important;
    padding: 30px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  }

  #checkout-checkout .col:not(.col-md-7) {
    background: white !important;
    border-radius: 8px !important;
    padding: 30px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  }

  /* Cart dropdown is now handled by Bootstrap responsive classes in cart.twig */

  /* Hide "What would you like to do next?" section and modules on desktop/tablet */
  .desktop-only-text,
  .desktop-only-modules {
    display: none !important;
  }

  /* Hide table footer totals on desktop/tablet (we show them in the summary section instead) */
  .desktop-cart-table tfoot {
    display: none !important;
  }

  /* Hide the old bottom buttons section on desktop/tablet */
  .cart-bottom-buttons {
    display: none !important;
  }

  /* Hide breadcrumb on cart page for desktop/tablet */
  #checkout-cart .breadcrumb {
    display: none !important;
  }

  /* Hide "Shopping Cart" heading on desktop/tablet */
  #checkout-cart h1 {
    display: none !important;
  }

  /* Hide breadcrumb and heading on checkout page for desktop/tablet */
  #checkout-checkout .breadcrumb {
    display: none !important;
  }

  #checkout-checkout h1 {
    display: none !important;
  }

  /* Desktop/Tablet Empty Cart UI */
  .desktop-empty-cart {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 80px 20px !important;
    text-align: center !important;
    min-height: 400px !important;
  }

  .desktop-empty-cart-icon {
    font-size: 80px !important;
    color: #d0d0d0 !important;
    margin-bottom: 25px !important;
  }

  .desktop-empty-cart-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 15px 0 !important;
  }

  .desktop-empty-cart-text {
    font-size: 1.1rem !important;
    color: #999 !important;
    margin: 0 0 30px 0 !important;
  }

  .desktop-btn-start-shopping {
    display: inline-block !important;
    padding: 14px 40px !important;
    background: #8c5a4f !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: background 0.2s ease !important;
  }

  .desktop-btn-start-shopping:hover {
    background: #6d4439 !important;
    color: white !important;
  }

  /* Desktop Cart Summary Section (Coupon + Totals) */
  .desktop-cart-summary {
    display: block !important;
    margin-top: 30px !important;
  }

  .desktop-cart-summary-row {
    display: flex !important;
    gap: 30px !important;
    align-items: flex-start !important;
  }

  /* Coupon Section - Left Side */
  .desktop-coupon-section {
    flex: 1 !important;
    background: #f8f8f8 !important;
    padding: 25px !important;
    border-radius: 8px !important;
  }

  .desktop-coupon-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 15px 0 !important;
  }

  .desktop-coupon-form {
    display: flex !important;
    gap: 10px !important;
  }

  .desktop-coupon-input {
    flex: 1 !important;
    padding: 12px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    color: #333 !important;
    transition: border-color 0.2s ease !important;
  }

  .desktop-coupon-input:focus {
    outline: none !important;
    border-color: #8c5a4f !important;
  }

  .desktop-coupon-btn {
    padding: 12px 30px !important;
    background: #8c5a4f !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
  }

  .desktop-coupon-btn:hover {
    background: #6d4439 !important;
  }

  /* Cart Action Buttons Below Coupon */
  .desktop-cart-buttons {
    display: flex !important;
    gap: 15px !important;
    margin-top: 25px !important;
    padding-top: 25px !important;
    border-top: 1px solid #e0e0e0 !important;
  }

  .desktop-cart-buttons .btn-continue-shopping,
  .desktop-cart-buttons .btn-proceed-checkout {
    flex: 1 !important;
    text-align: center !important;
    padding: 14px 20px !important;
  }

  /* Totals Section - Right Side */
  .desktop-totals-section {
    flex: 1 !important;
  }

  .desktop-totals-box {
    background: white !important;
    border: 2px solid #e8e8e8 !important;
    border-radius: 8px !important;
    padding: 25px !important;
  }

  .desktop-total-row {
    display: flex !important;
    justify-content: space-between !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 1rem !important;
  }

  .desktop-total-row:last-child {
    border-bottom: none !important;
  }

  .desktop-total-title {
    color: #666 !important;
    font-weight: 500 !important;
  }

  .desktop-total-amount {
    color: #8c5a4f !important;
    font-weight: 600 !important;
  }

  .desktop-total-grand {
    padding-top: 15px !important;
    margin-top: 10px !important;
    border-top: 2px solid #e8e8e8 !important;
    font-size: 1.3rem !important;
  }

  .desktop-total-grand .desktop-total-title {
    color: #333 !important;
    font-weight: 700 !important;
  }

  .desktop-total-grand .desktop-total-amount {
    color: #8c5a4f !important;
    font-weight: 700 !important;
  }

  /* Cart Bottom Buttons */
  .btn-continue-shopping {
    display: inline-block !important;
    padding: 14px 35px !important;
    background: #f3ede8 !important;
    color: #8c5a4f !important;
    border: 2px solid #8c5a4f !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
  }

  .btn-continue-shopping:hover {
    background: #8c5a4f !important;
    color: white !important;
  }

  .btn-proceed-checkout {
    display: inline-block !important;
    padding: 14px 35px !important;
    background: #8c5a4f !important;
    color: white !important;
    border: 2px solid #8c5a4f !important;
    border-radius: 4px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
  }

  .btn-proceed-checkout:hover {
    background: #6d4439 !important;
    border-color: #6d4439 !important;
  }
}

/* Tablet-specific adjustments (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Ensure buttons stay on one line on tablets */
  .desktop-cart-buttons {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }

  /* Reduce button font size on tablets only */
  .desktop-cart-buttons .btn-continue-shopping,
  .desktop-cart-buttons .btn-proceed-checkout,
  .btn-continue-shopping,
  .btn-proceed-checkout {
    font-size: 0.85rem !important;
    padding: 12px 20px !important;
    white-space: nowrap !important;
  }

  .product-thumb .qty-controls,
  div.qty-controls {
    padding: 10px 20px !important;
    gap: 15px !important;
  }

  .product-thumb .qty-controls .qty-btn,
  div.qty-controls .qty-btn {
    width: 35px !important;
    height: 35px !important;
    font-size: 1.3rem !important;
  }

  .product-thumb .qty-controls .qty-display,
  div.qty-controls .qty-display {
    min-width: 50px !important;
    min-height: 35px !important;
    padding: 0 20px !important;
    font-size: 1.1rem !important;
  }
}

/* Desktop-specific adjustments (>1024px) */
@media (min-width: 1025px) {
  .product-thumb .qty-controls,
  div.qty-controls {
    padding: 10px 20px !important;
    gap: 15px !important;
    background: transparent !important;
  }

  .product-thumb .qty-controls .qty-btn,
  div.qty-controls .qty-btn {
    background: #8c5a4f !important;
    color: white !important;
    width: 35px !important;
    height: 35px !important;
    font-size: 1.3rem !important;
    border-radius: 50% !important;
  }

  .product-thumb .qty-controls .qty-btn:hover,
  div.qty-controls .qty-btn:hover {
    background: #6d4439 !important;
  }

  .product-thumb .qty-controls .qty-display,
  div.qty-controls .qty-display {
    color: #2c2c2c !important;
    min-width: 50px !important;
    min-height: 35px !important;
    padding: 0 20px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
  }
}

/* Hide search bar in header */
#search,
.header-search,
#header #search {
  display: none !important;
  visibility: hidden !important;
}

/* Hide search bar in header - updated selectors */
.header-search-col,
.search-bar-wrapper,
.search-bar {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

/* Mobile Product Page Header */
.mobile-product-header {
  display: none;
}

@media (max-width: 767px) {
  /* Mobile product header styles (deprecated - now using global mobile-page-header) */
  .mobile-product-header {
    display: none !important;
    align-items: center !important;
    padding: 15px 10px !important;
    background: #fff !important;
    border-bottom: 1px solid #e0e0e0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    gap: 10px !important;
  }

  .mobile-back-btn {
    background: none !important;
    border: none !important;
    font-size: 1.2rem !important;
    color: #333 !important;
    padding: 5px 10px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mobile-product-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    margin: 0 !important;
    text-decoration: none !important;
    flex: 1 !important;
    line-height: 1.3 !important;
  }

  /* Reduce product title font size below image on mobile */
  #product-info h1 {
    font-size: 1.1rem !important;
    font-family: 'Avenir', sans-serif !important;
  }

  /* Hide breadcrumb on product page for mobile */
  #product-info .breadcrumb {
    display: none !important;
  }

  /* General Mobile Page Header (Non-Home Pages) */
  .mobile-page-header {
    display: flex !important;
    align-items: center !important;
    padding: 15px !important;
    background: #fff !important;
    border-bottom: 1px solid #e0e0e0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
  }

  .mobile-page-title {
    flex: 1 !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #2c2c2c !important;
  }

  .mobile-header-spacer {
    width: 40px !important;
  }

  /* Make product image smaller on mobile with margin */
  #product-info .image img,
  #product-info .img-thumbnail {
    max-width: 80% !important;
    height: auto !important;
    margin: 20px auto !important;
    display: block !important;
    border: none !important;
  }

  /* Position additional image thumbnails inside main image at top-right */
  #product-info .image {
    position: relative !important;
  }

  #product-info .image > div:not(.product-main-image-wrapper) {
    position: absolute !important;
    top: 10px !important;
    right: 10% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }

  #product-info .image > div:not(.product-main-image-wrapper) img {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    margin: 0 !important;
    max-width: none !important;
  }

  /* Main product image wrapper */
  #product-info .image > .product-main-image-wrapper {
    position: relative !important;
    display: block !important;
    width: 100% !important;
  }

  #product-info .image > .product-main-image-wrapper > a {
    display: block !important;
  }

  #product-info .image > .product-main-image-wrapper > a > img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    margin: 0 auto 15px auto !important;
  }

  /* Hide "per piece" text on mobile for product page */
  #product-info .text-muted {
    display: none !important;
  }

  /* Hide bottom navigation bar on product page */
  body:has(#product-info) .mobile-bottom-nav {
    display: none !important;
  }

  /* Remove existing qty and add to cart button */
  #product-info #button-cart,
  #product-info input[name="quantity"],
  #product-info .input-group,
  #product-info form .btn-group {
    display: none !important;
  }

  /* Hide qty label text */
  #product-info label[for="input-quantity"] {
    display: none !important;
  }

  /* Hide brand/manufacturer */
  #product-info .list-unstyled li:has(a[href*="manufacturer"]),
  #product-info li:has(a[href*="manufacturers"]) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Reorder product info to show stock after price */
  #product-info .col-sm {
    display: flex !important;
    flex-direction: column !important;
  }

  #product-info .col-sm > h1 {
    order: 1 !important;
  }

  #product-info .col-sm > .list-unstyled:first-of-type {
    order: 3 !important;
  }

  #product-info .col-sm > .list-unstyled:nth-of-type(2) {
    order: 2 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  #product-info .col-sm > #product {
    order: 4 !important;
  }

  /* Add padding bottom to body for sticky add to cart */
  body:has(#product-info) {
    padding-bottom: 80px !important;
  }

  /* Hide toast notifications on product page */
  body:has(#product-info) .toast,
  body:has(#product-info) .toast-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* Mobile Sticky Add to Cart */
  .mobile-sticky-cart {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    border-top: 1px solid #e0e0e0 !important;
    padding: 10px 15px !important;
    gap: 10px !important;
    z-index: 1000 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
  }

  .sticky-cart-qty {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    overflow: hidden !important;
  }

  .qty-btn {
    background: #f8f8f8 !important;
    border: none !important;
    padding: 10px 15px !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    color: #333 !important;
  }

  .qty-btn:active {
    background: #e0e0e0 !important;
  }

  #mobile-qty {
    border: none !important;
    text-align: center !important;
    width: 50px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    -moz-appearance: textfield !important;
  }

  #mobile-qty::-webkit-outer-spin-button,
  #mobile-qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
  }

  .sticky-cart-btn {
    flex: 1 !important;
    background: #8c5a4f !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 5px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .sticky-cart-btn:active {
    background: #6d4439 !important;
  }

  /* Mobile Cart Success Notification */
  .mobile-cart-notification {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 10000 !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 20px !important;
    animation: fadeIn 0.3s ease !important;
  }

  .mobile-cart-notification.show {
    display: flex !important;
  }

  .cart-notification-content {
    background: white !important;
    border-radius: 12px !important;
    padding: 15px !important;
    width: 90% !important;
    max-width: 400px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    animation: slideDown 0.3s ease !important;
  }

  .cart-notification-close {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    background: none !important;
    border: none !important;
    font-size: 1.2rem !important;
    color: #999 !important;
    cursor: pointer !important;
    padding: 5px !important;
    line-height: 1 !important;
    z-index: 10 !important;
  }

  .cart-notification-body {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
  }

  .cart-notification-icon {
    flex: 0 0 20% !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .cart-notification-icon i {
    font-size: 2.5rem !important;
    color: #4CAF50 !important;
  }

  .cart-notification-details {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .cart-notification-title {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #333 !important;
  }

  .cart-notification-buttons {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
  }

  .cart-notification-btn {
    flex: 1 !important;
    padding: 10px 12px !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
    text-align: center !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  .btn-continue {
    background: #f0f0f0 !important;
    color: #333 !important;
  }

  .btn-cart {
    background: #8c5a4f !important;
    color: white !important;
  }

  .btn-cart:hover {
    color: white !important;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes slideDown {
    from {
      transform: translateY(-50px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* Hide product tabs on mobile */
@media (max-width: 767px) {
  .product-tabs-tablet {
    display: none !important;
  }
}

/* Hide product tabs on desktop */
@media (min-width: 1025px) {
  .product-tabs-tablet {
    display: none !important;
  }
}

/* Hide mobile sticky cart and notification on desktop and tablet */
@media (min-width: 768px) {
  .mobile-sticky-cart,
  .mobile-cart-notification {
    display: none !important;
  }
}

/* Tablet Product Detail Page */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Hide breadcrumb on product page */
  #product-info .breadcrumb {
    display: none !important;
  }

  /* Align image column with product title */
  #product-info .row.mb-3 {
    align-items: flex-start !important;
  }

  #product-info .row.mb-3 > .col-sm {
    align-self: flex-start !important;
  }

  /* Position additional image thumbnails inside main image at left center */
  #product-info .image {
    position: relative !important;
  }

  #product-info .image > div:not(.product-main-image-wrapper) {
    position: absolute !important;
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  #product-info .image > div:not(.product-main-image-wrapper) img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    cursor: pointer !important;
    border-radius: 4px !important;
  }

  #product-info .image > div:not(.product-main-image-wrapper) img:hover {
    border-color: #8c5a4f !important;
  }

  /* Main product image wrapper */
  #product-info .image > .product-main-image-wrapper {
    position: relative !important;
    display: block !important;
  }

  #product-info .image > .product-main-image-wrapper > a > img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Add margin-top to content */
  #product-info #content,
  #product-info .row.mb-3 {
    margin-top: 15px !important;
  }

  /* Hide inline description below add to cart button */
  #product-info form .mb-3:last-child,
  #product-info #form-product > div > .mb-3:has(~ *) + .mb-3:last-of-type {
    display: none !important;
  }

  /* More specific: hide description div */
  #product-info #form-product .mb-3:nth-last-child(1):not(:has(button)):not(:has(input)):not(:has(select)) {
    display: none !important;
  }

  /* Product Tabs for Tablet */
  .product-tabs-tablet {
    display: block !important;
    margin-top: 20px !important;
    width: 100% !important;
    order: 999 !important;
  }

  .product-tabs-tablet .nav-tabs {
    border-bottom: 2px solid #8c5a4f !important;
  }

  .product-tabs-tablet .nav-link {
    font-family: 'Avenir', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #666 !important;
    border: none !important;
    padding: 10px 20px !important;
    background: transparent !important;
  }

  .product-tabs-tablet .nav-link.active {
    color: #8c5a4f !important;
    border-bottom: 3px solid #8c5a4f !important;
    background: transparent !important;
  }

  .product-tabs-tablet .nav-link:hover {
    color: #8c5a4f !important;
  }

  .product-tabs-tablet .tab-content {
    padding: 20px 10px !important;
    background: #fff !important;
  }

  /* Make product title smaller with Avenir font */
  #product-info h1 {
    font-size: 1.5rem !important;
    font-family: 'Avenir', sans-serif !important;
  }

  /* Ensure Avenir font for all product info text */
  #product-info,
  #product-info p,
  #product-info li,
  #product-info label,
  #product-info button,
  #product-info .price-new,
  #product-info .price-old {
    font-family: 'Avenir', sans-serif !important;
  }

  /* Hide "per piece" text on product page */
  #product-info .text-muted {
    display: none !important;
  }

  /* Hide brand/manufacturer */
  #product-info .list-unstyled li:has(a[href*="manufacturer"]),
  #product-info li:has(a[href*="manufacturers"]) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Qty and add to cart in one row */
  #product-info .mb-3:has(#input-quantity) {
    display: flex !important;
    align-items: flex-end !important;
    gap: 10px !important;
  }

  #product-info label[for="input-quantity"] {
    margin-bottom: 5px !important;
  }

  #product-info #input-quantity {
    flex: 0 0 80px !important;
    width: 80px !important;
    height: 48px !important;
    padding: 0.375rem 0.75rem !important;
  }

  #product-info #button-cart {
    flex: 1 !important;
    margin-top: 0 !important;
    height: 48px !important;
  }

  /* Add to cart button styling */
  #product-info #button-cart,
  #product-info button[type="submit"] {
    background-color: #8c5a4f !important;
    color: white !important;
    border-color: #8c5a4f !important;
  }

  #product-info #button-cart:hover,
  #product-info button[type="submit"]:hover {
    background-color: #6d4439 !important;
    border-color: #6d4439 !important;
  }
}

/* Desktop Product Detail Page */
@media (min-width: 1025px) {
  /* Hide breadcrumb on product page */
  #product-info .breadcrumb {
    display: none !important;
  }

  /* Hide "per piece" text */
  #product-info .text-muted {
    display: none !important;
  }

  /* Hide brand/manufacturer */
  #product-info .list-unstyled li:has(a[href*="manufacturer"]),
  #product-info li:has(a[href*="manufacturers"]) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Add margin-top to content */
  #product-info #content,
  #product-info .row.mb-3 {
    margin-top: 15px !important;
  }

  /* Position additional image thumbnails inside main image at left center */
  #product-info .image {
    position: relative !important;
  }

  #product-info .image > div:not(.product-main-image-wrapper) {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  #product-info .image > div:not(.product-main-image-wrapper) img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
    cursor: pointer !important;
    border-radius: 5px !important;
  }

  #product-info .image > div:not(.product-main-image-wrapper) img:hover {
    border-color: #8c5a4f !important;
    transform: scale(1.05) !important;
    transition: all 0.2s ease !important;
  }

  /* Qty and add to cart in one row */
  #product-info .mb-3:has(#input-quantity) {
    display: flex !important;
    align-items: flex-end !important;
    gap: 10px !important;
  }

  #product-info label[for="input-quantity"] {
    margin-bottom: 5px !important;
  }

  #product-info #input-quantity {
    flex: 0 0 100px !important;
    width: 100px !important;
    height: 48px !important;
    padding: 0.375rem 0.75rem !important;
  }

  #product-info #button-cart {
    flex: 1 !important;
    margin-top: 0 !important;
    height: 48px !important;
    background-color: #8c5a4f !important;
    color: white !important;
    border-color: #8c5a4f !important;
  }

  #product-info #button-cart:hover {
    background-color: #6d4439 !important;
    border-color: #6d4439 !important;
  }

  /* Ensure Avenir font for all product info text */
  #product-info h1 {
    font-family: 'Avenir', sans-serif !important;
  }

  #product-info,
  #product-info p,
  #product-info li,
  #product-info label,
  #product-info button,
  #product-info .price-new,
  #product-info .price-old {
    font-family: 'Avenir', sans-serif !important;
  }
}

/* Enlarge logo for tablet view */
@media (min-width: 768px) and (max-width: 1024px) {
  #logo img {
    max-height: 80px !important;
    height: 80px !important;
  }
}

/* Enlarge logo overall (width and height) for tablet view */
@media (min-width: 768px) and (max-width: 1024px) {
  #logo img {
    max-height: 100px !important;
    height: auto !important;
    max-width: 200px !important;
    width: auto !important;
  }
}

/* Bottom nav with padding on tablet */
@media (min-width: 768px) and (max-width: 1024px) {
  .mobile-bottom-nav {
    left: 100px !important;
    right: 100px !important;
    width: calc(100% - 200px) !important;
  }
}

/* ==========================================
   NEW CART DESIGN - SCREENSHOT BASED
   ========================================== */

/* Desktop/Tablet Only (≥768px) */
@media (min-width: 768px) {

  /* Avenir font is now applied globally via CSS variables */

  /* Override font for icons */
  .new-cart-container i,
  .new-cart-container i::before {
    font-family: "Font Awesome 6 Free" !important;
    font-style: normal !important;
    display: inline-block !important;
  }

  /* Solid icons */
  .new-cart-container .fa-solid {
    font-weight: 900 !important;
  }

  /* Regular/Outline icons */
  .new-cart-container .fa-regular {
    font-weight: 400 !important;
  }

  /* Main Layout: 70% / 30% */
  .new-cart-layout {
    display: flex;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
  }

  .new-cart-left {
    flex: 0 0 70%;
    min-width: 0;
    box-sizing: border-box;
  }

  .new-cart-right {
    flex: 0 0 calc(30% - 40px);
    min-width: 0;
    box-sizing: border-box;
  }

  /* Continue Shopping Link */
  .continue-shopping-top,
  .continue-shopping-bottom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 20px;
  }

  .continue-shopping-top i,
  .continue-shopping-bottom i {
    font-size: 12px;
  }

  .continue-shopping-top:hover,
  .continue-shopping-bottom:hover {
    color: #666;
  }

  .continue-shopping-bottom {
    margin-top: 30px;
    margin-bottom: 0;
  }

  /* My Bag Heading */
  .my-bag-heading {
    font-size: 28px;
    font-weight: 500;
    color: #000;
    margin: 0 0 30px 0;
  }

  /* Products Table */
  .cart-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
  }

  .cart-products-table thead {
    border-bottom: 1px solid #e0e0e0;
  }

  .cart-products-table thead th {
    text-align: left;
    padding: 15px 10px;
    font-size: 14px;
    font-weight: 500;
    color: #000;
  }

  .col-product {
    width: 55%;
  }

  .col-quantity {
    width: 25%;
  }

  .col-price {
    width: 20%;
    text-align: right !important;
  }

  /* Product Row */
  .cart-product-row {
    border-bottom: none;
  }

  .cart-product-row:last-child {
    border-bottom: none;
  }

  .cart-product-cell {
    padding: 25px 10px;
  }

  .product-info {
    display: flex;
    gap: 20px;
  }

  .product-image {
    flex: 0 0 100px;
  }

  .product-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
  }

  .product-details {
    flex: 1;
    margin-top: 25px;
  }

  .product-name {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0 0 5px 0;
  }

  .product-name a {
    color: #000;
    text-decoration: none;
  }

  .product-name a:hover {
    color: #666;
  }

  .product-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
  }

  .product-actions {
    display: flex;
    gap: 20px;
    align-items: center;
  }

  .action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  .action-link i {
    font-size: 14px;
  }

  .action-link:hover {
    color: #666;
  }

  .remove-form-inline {
    display: inline;
    margin: 0;
  }

  /* Quantity Column */
  .cart-quantity-cell {
    padding: 25px 10px;
    vertical-align: middle;
  }

  .qty-controls-new {
    display: inline-flex;
    align-items: center;
    gap: 15px;
  }

  .qty-btn-new {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #000;
    transition: all 0.2s;
  }

  .qty-btn-new i {
    font-size: 12px;
  }

  .qty-btn-new:hover {
    background: #f5f5f5;
    border-color: #ccc;
  }

  .qty-number {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    min-width: 20px;
    text-align: center;
  }

  /* Price Column */
  .cart-price-cell {
    padding: 25px 10px;
    text-align: right;
    vertical-align: middle;
    font-size: 16px;
    font-weight: 500;
    color: #000;
  }

  /* Send as Gift */
  .send-gift-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
  }

  .send-gift-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
  }

  .send-gift-checkbox label {
    font-size: 14px;
    color: #000;
    cursor: pointer;
    margin: 0;
  }

  /* Right Sidebar */
  .new-cart-right {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    width: 100%;
    box-sizing: border-box;
  }

  /* Discount Section */
  .discount-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
  }

  .discount-title-static {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0 0 15px 0;
  }

  .discount-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
  }

  .discount-header:hover {
    background: #f9f9f9;
  }

  .discount-title {
    font-size: 16px;
    font-weight: 500;
    color: #000;
  }

  .discount-arrow {
    font-size: 14px;
    color: #666;
    transition: transform 0.3s;
  }

  .discount-content {
    padding: 0 20px 20px 20px;
    display: block;
  }

  .coupon-input-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .coupon-input-new {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
  }

  .coupon-input-new:focus {
    outline: none;
    border-color: #000;
  }

  .coupon-apply-btn-new {
    padding: 12px 30px;
    background: #f3ede8;
    color: #8c5a4f;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }

  .coupon-apply-btn-new:hover {
    background: #e8dfd7;
    color: #8c5a4f;
  }

  /* Order Summary */
  .order-summary-box {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
    width: 100%;
  }

  .summary-heading {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    margin: 0 0 20px 0;
  }

  .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 14px;
    gap: 10px;
  }

  .summary-label {
    color: #000;
    font-weight: 400;
    flex-shrink: 0;
  }

  .summary-value {
    color: #000;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
  }

  .summary-free {
    color: #ff0000 !important;
    font-weight: 700 !important;
  }

  .summary-total {
    border-top: 1px solid #f0f0f0;
    margin-top: 5px;
    padding-top: 17px;
  }

  .summary-total .summary-label,
  .summary-total .summary-value {
    font-weight: 500;
  }

  /* Tabby Banner */
  .tabby-banner {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
  }

  .tabby-text {
    flex: 1;
    font-size: 13px;
    color: #000;
    line-height: 1.5;
  }

  .tabby-link {
    color: #000;
    text-decoration: underline;
    font-weight: 500;
  }

  .tabby-link:hover {
    text-decoration: none;
  }

  .tabby-logo {
    flex: 0 0 auto;
  }

  .tabby-badge {
    background: #3CDBC0;
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
  }

  /* Proceed to Checkout Button */
  .btn-proceed-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    background: #8c5a4f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
  }

  .btn-proceed-new:hover {
    background: #6d4439;
    color: #fff;
  }

  .btn-proceed-new i {
    font-size: 14px;
  }

}

  /* Hide breadcrumb on cart page */
  @media (min-width: 768px) {
    #checkout-cart .breadcrumb {
      display: none !important;
    }
  }

/* ==========================================
   CHECKOUT STYLES - Single Page OTP Checkout
   ========================================== */

/* Desktop Checkout Header */
@media (min-width: 768px) {
  .desktop-checkout-header {
    display: flex !important;
    align-items: center !important;
    padding: 20px 0 !important;
    gap: 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
  }

  .desktop-checkout-back {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #333 !important;
    cursor: pointer !important;
  }

  .desktop-checkout-title {
    font-size: 1.8rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    font-family: 'Avenir', sans-serif !important;
  }
}

/* Checkout Step 2 Header */
.checkout-step2-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.btn-back-to-details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: white;
  color: #8c5a4f;
  border: 2px solid #8c5a4f;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Avenir', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-back-to-details:hover {
  background: #8c5a4f;
  color: white;
  transform: translateX(-3px);
}

.btn-back-to-details i {
  font-size: 0.9rem;
}

.step2-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c2c2c;
  margin: 0;
  font-family: 'Avenir', sans-serif;
  flex: 1;
}

@media (max-width: 767px) {
  .checkout-step2-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 15px;
  }

  .btn-back-to-details {
    padding: 8px 16px;
    font-size: 0.875rem;
  }

  .step2-title {
    font-size: 1.2rem;
    width: 100%;
  }
}

/* Checkout Sections */
.checkout-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Checkout Form Container */
#checkout-checkout #form-checkout {
  width: 100%;
}

/* Checkout Form Inputs - Native Look */
#checkout-checkout .form-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #2c2c2c;
  margin-bottom: 8px;
  font-family: 'Avenir', sans-serif;
  display: block;
}

#checkout-checkout .form-control,
#checkout-checkout .form-select {
  height: 48px;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: 'Avenir', sans-serif;
  color: #2c2c2c;
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: none;
}

#checkout-checkout .form-control:focus,
#checkout-checkout .form-select:focus {
  border-color: #8c5a4f;
  box-shadow: 0 0 0 3px rgba(140, 90, 79, 0.1);
  outline: none;
}

#checkout-checkout .form-control::placeholder {
  color: #999999;
  opacity: 1;
}

#checkout-checkout textarea.form-control {
  height: auto;
  min-height: 80px;
  resize: vertical;
}

/* Select Dropdowns - Native Styling */
#checkout-checkout .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232c2c2c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 12px;
  padding-right: 40px;
  cursor: pointer;
}

#checkout-checkout .form-select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

/* Input Group (Phone Number with +965) */
#checkout-checkout .input-group {
  display: flex;
  align-items: stretch;
}

#checkout-checkout .input-group-text {
  height: 48px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Avenir', sans-serif;
  color: #2c2c2c;
  background-color: #f8f8f8;
  border: 1px solid #d0d0d0;
  border-right: none;
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
}

#checkout-checkout .input-group .form-control {
  border-radius: 0;
  border-left: none;
  flex: 1;
}

#checkout-checkout .input-group .btn {
  height: 48px;
  border-radius: 0 8px 8px 0;
  padding: 12px 20px;
  font-weight: 500;
  white-space: nowrap;
}

/* OTP Button Specific Styles */
#btn-send-otp {
  background-color: #8c5a4f !important;
  border-color: #8c5a4f !important;
  color: white !important;
}

#btn-send-otp:hover {
  background-color: #6d4439 !important;
  border-color: #6d4439 !important;
}

#btn-verify-otp {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
  color: white !important;
}

#btn-verify-otp:hover {
  background-color: #218838 !important;
  border-color: #1e7e34 !important;
}

/* Form Helper Text */
#checkout-checkout .form-text {
  font-size: 0.875rem;
  color: #666666;
  margin-top: 6px;
  font-family: 'Avenir', sans-serif;
}

/* Required Asterisk */
#checkout-checkout .text-danger {
  color: #dc3545;
  font-weight: 600;
}

/* Form Row Spacing - Let Bootstrap Grid Work Naturally */
#checkout-checkout .row {
  margin-left: -7.5px;
  margin-right: -7.5px;
  display: flex;
  flex-wrap: wrap;
}

#checkout-checkout .row > [class*="col-"] {
  padding-left: 7.5px;
  padding-right: 7.5px;
}

#checkout-checkout .mb-3 {
  margin-bottom: 20px;
}

/* Ensure all form elements take full width of their container */
#checkout-checkout .form-control,
#checkout-checkout .form-select,
#checkout-checkout .input-group,
#checkout-checkout textarea.form-control {
  width: 100%;
}

/* Mobile Responsive */
@media (max-width: 767px) {
  #checkout-checkout .form-control,
  #checkout-checkout .form-select {
    height: 44px;
    font-size: 0.95rem;
    padding: 10px 12px;
  }

  #checkout-checkout .input-group-text {
    height: 44px;
    font-size: 0.95rem;
    padding: 0 12px;
    display: flex;
    align-items: center;
  }

  #checkout-checkout .input-group .btn {
    height: 44px;
    padding: 0 12px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #checkout-checkout .checkout-section {
    padding: 20px;
  }
}

@media (max-width: 767px) {
  .checkout-section {
    padding: 20px 15px;
    border-radius: 8px;
  }
}

/* Section Headings */
.section-heading {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #8c5a4f;
  font-family: 'Avenir', sans-serif;
}

.section-subheading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 20px 0 15px 0;
  font-family: 'Avenir', sans-serif;
}

@media (max-width: 767px) {
  .section-heading {
    font-size: 1.1rem;
    font-weight: 400;
  }

  .section-subheading {
    font-size: 1rem;
    font-weight: 400;
  }
}

/* Phone Input */
.input-group-text {
  background: #f8f8f8;
  border-right: none;
  font-weight: 600;
  font-family: 'Avenir', sans-serif;
}

#input-telephone {
  border-left: none;
}

/* Verified Phone Badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #d4edda;
  color: #155724;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 10px;
}

.verified-badge i {
  color: #28a745;
}

.verified-input {
  background-color: #f8f9fa !important;
  font-weight: 600;
  color: #333;
}

.verified-input:read-only {
  cursor: default;
}

#btn-change-phone {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 8px 12px;
}

#btn-change-phone:hover {
  background: #8c5a4f;
  color: white;
  border-color: #8c5a4f;
}

/* Mobile Phone Input Alignment Fix - HIGH SPECIFICITY to override other rules */
@media (max-width: 767px) {
  /* Reset the input-group to be a proper flex container */
  #checkout-checkout #phone-section .input-group,
  #checkout-checkout #otp-section .input-group,
  #checkout-checkout #phone-verified-container .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
  }

  /* Remove any margins on child elements */
  #checkout-checkout #phone-section .input-group > *,
  #checkout-checkout #otp-section .input-group > *,
  #checkout-checkout #phone-verified-container .input-group > * {
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Phone input-group elements - OVERRIDE the 60px min-height with 48px */
  #checkout-checkout #phone-section .input-group .input-group-text,
  #checkout-checkout #otp-section .input-group .input-group-text,
  #checkout-checkout #phone-verified-container .input-group .input-group-text {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 14px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    border-radius: 8px 0 0 8px !important;
  }

  #checkout-checkout #phone-section .input-group .form-control,
  #checkout-checkout #otp-section .input-group .form-control,
  #checkout-checkout #phone-verified-container .input-group .form-control {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 14px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    flex: 1 !important;
    min-width: 0 !important;
    border-radius: 0 !important;
  }

  #checkout-checkout #phone-section .input-group .btn,
  #checkout-checkout #otp-section .input-group .btn,
  #checkout-checkout #phone-verified-container .input-group .btn {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 14px !important;
    font-size: 0.9rem !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 8px 8px 0 !important;
    white-space: nowrap !important;
  }

  /* Change phone button specific */
  #checkout-checkout #phone-verified-container #btn-change-phone {
    padding: 0 12px !important;
    min-width: 44px !important;
  }
}

/* Form Labels */
.form-label {
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  font-family: 'Avenir', sans-serif;
}

.form-text {
  font-size: 0.875rem;
  color: #666;
  margin-top: 5px;
}

/* Form Inputs and Selects */
.form-control,
.form-select {
  font-size: 1rem;
  padding: 12px 15px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  font-family: 'Avenir', sans-serif;
  width: 100%;
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 12px;
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Mobile Form Improvements */
@media (max-width: 767px) {
  .form-control,
  .form-select {
    font-size: 20px !important; /* Prevent zoom on iOS and improve readability */
    padding: 18px 20px !important;
    min-height: 58px !important; /* Touch-friendly */
    font-weight: 400 !important;
    line-height: 1.4 !important;
  }

  .form-select {
    padding-right: 55px !important;
    background-size: 22px 18px;
    background-position: right 18px center;
  }

  /* Native select for better mobile UX */
  .form-select option {
    font-size: 20px !important;
    padding: 14px !important;
    font-weight: 400;
  }

  .form-label {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    margin-bottom: 10px !important;
  }

  /* Checkout specific forms - even larger */
  #checkout-checkout .form-control,
  #checkout-checkout .form-select,
  #checkout-checkout select {
    font-size: 20px !important;
    min-height: 60px !important;
    font-weight: 400 !important;
    padding: 18px 20px !important;
  }

  #checkout-checkout select option {
    font-size: 20px !important;
    font-weight: 400 !important;
  }

  /* Specific targeting for area, city, and block dropdowns */
  #input-area,
  #input-city,
  #input-block {
    font-size: 20px !important;
    min-height: 60px !important;
    font-weight: 400 !important;
    padding: 18px 20px !important;
  }

  #input-area option,
  #input-city option,
  #input-block option {
    font-size: 20px !important;
    font-weight: 400 !important;
  }
}

/* Shipping & Payment Methods - Card Style */
.shipping-option,
.payment-option {
  background: white;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 15px;
}

.shipping-option:hover,
.payment-option:hover {
  border-color: #8c5a4f;
  background: #f8f8f8;
}

.shipping-option.selected,
.payment-option.selected {
  border-color: #8c5a4f;
  background: #fff5f2;
}

.shipping-option input[type="radio"],
.payment-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #8c5a4f;
}

.shipping-option-label,
.payment-option-label {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shipping-method-name,
.payment-method-name {
  font-size: 1rem;
  font-weight: 600;
  color: #2c2c2c;
  font-family: 'Avenir', sans-serif;
}

.shipping-method-cost {
  font-size: 1.1rem;
  font-weight: 700;
  color: #8c5a4f;
}

@media (max-width: 767px) {
  .shipping-option,
  .payment-option {
    padding: 15px;
  }

  .shipping-method-name,
  .payment-method-name {
    font-size: 0.95rem;
    font-weight: 400;
  }

  .shipping-method-cost {
    font-size: 1rem;
    font-weight: 500;
  }
}

/* Order Summary - Card Style */
.order-summary-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #e8e8e8;
}

.summary-products {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
}

.summary-product-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.summary-product-row:last-child {
  border-bottom: none;
}

.summary-product-name {
  font-size: 0.95rem;
  color: #333;
  flex: 1;
  font-family: 'Avenir', sans-serif;
}

.summary-product-qty {
  font-weight: 600;
  margin-right: 10px;
}

.summary-product-price {
  font-weight: 600;
  color: #8c5a4f;
}

.summary-totals {
  margin-top: 20px;
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 1rem;
  font-family: 'Avenir', sans-serif;
}

.summary-total-row.final {
  border-top: 2px solid #8c5a4f;
  padding-top: 15px;
  margin-top: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #8c5a4f;
}

@media (max-width: 767px) {
  .order-summary-card {
    padding: 20px 15px;
  }

  .summary-product-name {
    font-size: 0.9rem;
  }

  .summary-product-qty {
    font-weight: 400;
  }

  .summary-product-price {
    font-weight: 400;
  }

  .summary-total-row {
    font-size: 0.95rem;
  }

  .summary-total-row.final {
    font-size: 1.1rem;
    font-weight: 500;
  }
}

/* Continue to Shipping & Payment Button (Step 1) */
#btn-continue-checkout {
  width: 100%;
  padding: 18px 30px;
  background: #8c5a4f !important;
  color: white !important;
  border: none !important;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 20px;
  font-family: 'Avenir', sans-serif;
}

#btn-continue-checkout:hover {
  background: #6d4439 !important;
  color: white !important;
}

#btn-continue-checkout i {
  font-size: 1rem;
}

@media (max-width: 767px) {
  #btn-continue-checkout {
    padding: 16px 15px;
    font-size: 0.9rem;
    white-space: nowrap;
  }
}

/* Place Order Button (Step 2) */
.btn-checkout-submit {
  width: 100%;
  padding: 18px 30px;
  background: #8c5a4f;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 20px;
  font-family: 'Avenir', sans-serif;
}

.btn-checkout-submit:hover {
  background: #6d4439;
  color: white;
}

.btn-checkout-submit i {
  font-size: 1rem;
}

@media (max-width: 767px) {
  .btn-checkout-submit {
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 400;
  }
}


/* Saved Address Card Styles */
.address-card {
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  transition: all 0.2s ease;
}

.address-card.selected {
  border-color: #8c5a4f;
  background: #faf7f5;
}

.address-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

/* Location info in header */
.address-location-info {
  flex: 1;
  min-width: 0;
}

.location-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

/* Check icon for selected address */
.address-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #28a745;
  font-size: 1.2rem;
}

/* Select button (unselected state) */
.btn-select-address {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.btn-select-address:hover {
  color: #8c5a4f;
}

.address-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-edit-address,
.btn-delete-address {
  background: none;
  border: 1px solid #ddd;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-edit-address {
  color: #8c5a4f;
  border-color: #8c5a4f;
}

.btn-edit-address:hover {
  background: #8c5a4f;
  color: white;
}

.btn-delete-address {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-delete-address:hover {
  background: #dc3545;
  color: white;
}

.address-card-body {
  padding: 0;
}

/* Row 2: Block and Street */
.address-card-row2 {
  margin-bottom: 8px;
}

.block-street-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

.address-line {
  font-size: 1rem;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 8px;
  line-height: 1.5;
}

.address-line-secondary {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 5px;
}

#btn-add-new-address {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#btn-add-new-address:hover {
  background: #8c5a4f;
  color: white;
  border-color: #8c5a4f;
}

@media (max-width: 767px) {
  .address-card {
    padding: 12px;
  }

  .address-card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
    padding-bottom: 0;
    border-bottom: none;
  }

  .address-location-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .location-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .address-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .address-check-icon {
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
  }

  .btn-select-address {
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
  }

  .btn-edit-address,
  .btn-delete-address {
    padding: 6px 10px;
    font-size: 0.8rem;
    border: none;
  }

  .btn-edit-address {
    color: #8c5a4f;
  }

  .btn-delete-address {
    color: #dc3545;
  }

  .address-card-row2 {
    margin: 0;
    padding: 0;
  }

  .block-street-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
  }

  .address-card-body {
    margin: 0;
    padding: 0;
  }

  .address-line {
    font-size: 0.85rem;
    margin: 0;
    padding: 0;
    line-height: 1.4;
  }
}

/* Address Edit Dropdown Styles */
.address-edit-dropdown {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #ddd;
}

.edit-dropdown-header {
  font-size: 1rem;
  font-weight: 600;
  color: #8c5a4f;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-dropdown-header i {
  font-size: 0.9rem;
}

.edit-dropdown-body {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.edit-dropdown-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.edit-dropdown-footer .btn {
  padding: 10px 20px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#btn-save-address-edit {
  background: #8c5a4f;
  border-color: #8c5a4f;
}

#btn-save-address-edit:hover {
  background: #6d4439;
  border-color: #6d4439;
}

@media (max-width: 767px) {
  .edit-dropdown-body {
    padding: 15px;
  }
  
  .edit-dropdown-footer {
    flex-direction: column;
  }
  
  .edit-dropdown-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Fix Edit Address Dropdown Buttons */
#btn-save-address-edit {
  background: #8c5a4f !important;
  border-color: #8c5a4f !important;
  color: #fff !important;
}

#btn-save-address-edit:hover {
  background: #6d4439 !important;
  border-color: #6d4439 !important;
  color: #fff !important;
}

#btn-cancel-address-edit {
  background: transparent !important;
  border: 1px solid #6c757d !important;
  color: #6c757d !important;
  display: inline-flex !important;
}

#btn-cancel-address-edit:hover {
  background: #6c757d !important;
  color: #fff !important;
}

.edit-dropdown-footer {
  display: flex !important;
  gap: 10px !important;
  justify-content: flex-end !important;
  padding-top: 15px;
  border-top: 1px solid #eee;
  margin-top: 10px;
}

.edit-dropdown-footer .btn {
  padding: 10px 20px !important;
  font-size: 0.95rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* ==========================================
   ADDRESS MANAGEMENT SYSTEM - Multiple Cards
   ========================================== */

/* Address Cards Grid */
.address-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

@media (max-width: 767px) {
  .address-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Address Card in Grid */
.address-cards-grid .address-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

.address-cards-grid .address-card:not(.selected):hover {
  border-color: #8c5a4f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Select Button on Card */
.btn-select-address {
  font-size: 0.8rem !important;
  padding: 5px 12px !important;
  background: transparent !important;
  border: 1px solid #8c5a4f !important;
  color: #8c5a4f !important;
  border-radius: 20px !important;
}

.btn-select-address:hover {
  background: #8c5a4f !important;
  color: white !important;
}

/* Address Pagination */
.address-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 15px 0;
  margin-top: 10px;
}

.btn-page {
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-page:hover:not(:disabled) {
  background: #8c5a4f;
  color: white;
  border-color: #8c5a4f;
}

.btn-page:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

/* Address Dropdown Form (Add/Edit) */
.address-dropdown-form {
  margin-top: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  overflow: hidden;
}

.address-dropdown-form .dropdown-header {
  background: #f8f8f8;
  padding: 15px 20px;
  font-weight: 600;
  color: #2c2c2c;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.address-dropdown-form .dropdown-header i {
  color: #8c5a4f;
}

.address-dropdown-form .dropdown-body {
  padding: 20px;
}

.address-dropdown-form .dropdown-footer {
  padding: 15px 20px;
  background: #f8f8f8;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.address-dropdown-form .dropdown-footer .btn {
  padding: 10px 20px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Save New Address Button */
#btn-save-new-address {
  background: #8c5a4f !important;
  border-color: #8c5a4f !important;
  color: white !important;
}

#btn-save-new-address:hover {
  background: #6d4439 !important;
  border-color: #6d4439 !important;
}

/* Add New Address Button in List Container */
#address-list-container #btn-add-new-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 500;
  border: 2px dashed #8c5a4f;
  color: #8c5a4f;
  background: transparent;
  border-radius: 10px;
  transition: all 0.2s;
}

#address-list-container #btn-add-new-address:hover {
  background: #8c5a4f;
  color: white;
  border-style: solid;
}

/* Edit Address Icon-Only Buttons in Card Grid */
.address-cards-grid .btn-edit-address,
.address-cards-grid .btn-delete-address {
  padding: 6px 10px !important;
  min-width: auto !important;
}

.address-cards-grid .btn-edit-address span,
.address-cards-grid .btn-delete-address span {
  display: none;
}

/* Mobile adjustments for address grid */
@media (max-width: 767px) {
  .address-dropdown-form .dropdown-body {
    padding: 15px;
  }

  .address-dropdown-form .dropdown-footer {
    flex-direction: column;
  }

  .address-dropdown-form .dropdown-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .address-pagination {
    gap: 10px;
  }

  .btn-page {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .page-info {
    font-size: 0.85rem;
  }
}

/* Address Card Compact Styles for Grid */
.address-cards-grid .address-card {
  padding: 15px;
}

.address-cards-grid .address-card-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.address-cards-grid .address-card-body {
  min-height: 60px;
}

.address-cards-grid .address-line {
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.address-cards-grid .address-line-secondary {
  font-size: 0.85rem;
  margin-bottom: 3px;
}

@media (max-width: 767px) {
  .address-cards-grid .address-card-header {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .address-cards-grid .address-card-body {
    min-height: 30px;
  }
}

/* Fix for edit dropdown position when inside grid */
#edit-address-dropdown {
  grid-column: 1 / -1;
  margin-top: 15px;
}

/* Cancel form address button */
#btn-cancel-form-address {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================
   RTL (Right-to-Left) Support for Arabic
   ========================================== */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* RTL - Cairo Font for Arabic (exclude icons) */
html[dir="rtl"] body,
html[dir="rtl"] *:not(i):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad) {
  font-family: 'Cairo', sans-serif !important;
}

/* RTL - General text alignment */
html[dir="rtl"] body,
html[dir="rtl"] p,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .form-label,
html[dir="rtl"] label {
  text-align: right;
  font-family: 'Cairo', sans-serif !important;
}

/* RTL - Heading margins (reverse left/right) */
html[dir="rtl"] h3 {
  margin: 5px 30px 15px 0 !important;
}

/* RTL - Flexbox reversals */
html[dir="rtl"] .d-flex,
html[dir="rtl"] .input-group,
html[dir="rtl"] .mobile-menu-link,
html[dir="rtl"] .address-card-header,
html[dir="rtl"] .address-card-actions,
html[dir="rtl"] .summary-product-row,
html[dir="rtl"] .summary-total-row,
html[dir="rtl"] .shipping-option,
html[dir="rtl"] .payment-option {
  flex-direction: row-reverse;
}

/* RTL - Margin/Padding reversals */
html[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
html[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
html[dir="rtl"] .ms-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
html[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
html[dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }
html[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
html[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !important; }

html[dir="rtl"] .pe-1 { padding-right: 0 !important; padding-left: 0.25rem !important; }
html[dir="rtl"] .pe-2 { padding-right: 0 !important; padding-left: 0.5rem !important; }
html[dir="rtl"] .pe-3 { padding-right: 0 !important; padding-left: 1rem !important; }
html[dir="rtl"] .ps-1 { padding-left: 0 !important; padding-right: 0.25rem !important; }
html[dir="rtl"] .ps-2 { padding-left: 0 !important; padding-right: 0.5rem !important; }
html[dir="rtl"] .ps-3 { padding-left: 0 !important; padding-right: 1rem !important; }

/* RTL - Text alignment reversals */
html[dir="rtl"] .text-start { text-align: right !important; }
html[dir="rtl"] .text-end { text-align: left !important; }

/* RTL - Float reversals */
html[dir="rtl"] .float-start { float: right !important; }
html[dir="rtl"] .float-end { float: left !important; }

/* RTL - Mobile Account Page */
html[dir="rtl"] .mobile-account-header .back-btn {
  left: auto;
  right: 15px;
}

html[dir="rtl"] .mobile-account-header .back-btn i {
  transform: rotate(180deg);
}

html[dir="rtl"] .mobile-menu-icon {
  margin-right: 0;
  margin-left: 15px;
}

html[dir="rtl"] .mobile-menu-arrow {
  transform: rotate(180deg);
}

html[dir="rtl"] .mobile-menu-subitem {
  flex-direction: row-reverse;
  padding: 14px 20px;
  justify-content: flex-end;
  text-align: right;
}

html[dir="rtl"] .mobile-menu-subitem i {
  margin-right: 0;
  margin-left: 12px;
  order: 2;
}

html[dir="rtl"] .mobile-menu-subitem span {
  order: 1;
}

html[dir="rtl"] .language-toggle-wrapper {
  margin-left: 0;
  margin-right: auto;
}

/* RTL - Header */
html[dir="rtl"] .header-icons {
  flex-direction: row-reverse;
}

html[dir="rtl"] .navbar-nav {
  flex-direction: row-reverse;
}

/* RTL - Mobile Bottom Navigation */
html[dir="rtl"] .mobile-bottom-nav {
  direction: rtl;
}

/* RTL - Cart */
html[dir="rtl"] .cart-item-image {
  margin-right: 0;
  margin-left: 15px;
}

html[dir="rtl"] .product-info {
  flex-direction: row-reverse;
}

html[dir="rtl"] .product-image {
  margin-right: 0;
  margin-left: 15px;
}

/* RTL - Checkout */
html[dir="rtl"] .mobile-checkout-header .mobile-checkout-back {
  left: auto;
  right: 0;
}

html[dir="rtl"] .desktop-checkout-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] #checkout-checkout .input-group {
  flex-direction: row-reverse;
}

html[dir="rtl"] #checkout-checkout .input-group-text {
  border-radius: 0 8px 8px 0;
  border-left: 1px solid #e8e8e8;
  border-right: none;
}

html[dir="rtl"] #checkout-checkout .input-group .form-control {
  border-radius: 0;
}

html[dir="rtl"] #checkout-checkout .input-group .btn:last-child {
  border-radius: 8px 0 0 8px;
}

html[dir="rtl"] .address-location-info {
  text-align: right;
}

html[dir="rtl"] .address-card-body {
  text-align: right;
}

/* RTL - Buttons with icons */
html[dir="rtl"] .btn i {
  margin-left: 0;
  margin-right: 8px;
}

html[dir="rtl"] .btn-checkout-submit,
html[dir="rtl"] #btn-continue-checkout {
  flex-direction: row-reverse;
}

html[dir="rtl"] .btn-checkout-submit i,
html[dir="rtl"] #btn-continue-checkout i {
  transform: rotate(180deg);
}

/* RTL - Form elements */
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] textarea {
  text-align: right;
}

html[dir="rtl"] .form-select {
  background-position: left 12px center;
  padding-left: 40px;
  padding-right: 15px;
}

/* RTL - Form Check (Radio/Checkbox) */
html[dir="rtl"] .form-check {
  padding-left: 0;
  padding-right: 1.5em;
  text-align: right;
}

html[dir="rtl"] .form-check .form-check-input {
  float: right;
  margin-left: 0;
  margin-right: -1.5em;
}

html[dir="rtl"] .form-check-label {
  text-align: right;
}

/* RTL - Success page */
html[dir="rtl"] .success-actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .btn-success-primary i,
html[dir="rtl"] .btn-success-secondary i {
  margin-left: 0;
  margin-right: 10px;
}

/* RTL - Product Cards */
html[dir="rtl"] .product-card {
  text-align: right;
}

/* RTL - Order Summary */
html[dir="rtl"] .summary-product-name {
  text-align: right;
}

html[dir="rtl"] .summary-product-price {
  text-align: left;
}

/* RTL - Alerts */
html[dir="rtl"] .alert {
  text-align: right;
}

html[dir="rtl"] .alert i {
  margin-right: 0;
  margin-left: 10px;
}

/* RTL - Breadcrumb */
html[dir="rtl"] .breadcrumb {
  flex-direction: row-reverse;
}

html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  content: "\\";
  float: right;
  padding-left: 0.5rem;
  padding-right: 0;
}

/* RTL - Mobile specific */
@media (max-width: 767px) {
  html[dir="rtl"] .mobile-checkout-back {
    left: auto !important;
    right: 15px !important;
  }

  html[dir="rtl"] .mobile-checkout-title {
    text-align: center;
  }

  html[dir="rtl"] .cart-item-details {
    text-align: right;
  }

  html[dir="rtl"] .cart-item-actions {
    flex-direction: row-reverse;
  }
}

/* ===== Added to Cart Button State ===== */
.btn-added-to-cart {
  background-color: #1a7f37 !important;
  border-color: #1a7f37 !important;
  color: white !important;
}

.btn-added-to-cart:hover,
.btn-added-to-cart:focus,
.btn-added-to-cart:active {
  background-color: #15652c !important;
  border-color: #15652c !important;
  color: white !important;
}

.btn-added-to-cart i {
  margin-right: 8px;
}

/* Mobile sticky cart - Added state */
.sticky-cart-btn.btn-added {
  background-color: #1a7f37 !important;
}

.sticky-cart-btn.btn-added:hover,
.sticky-cart-btn.btn-added:active {
  background-color: #15652c !important;
}

/* RTL - Added to Cart button icon */
html[dir="rtl"] .btn-added-to-cart i {
  margin-right: 0;
  margin-left: 8px;
}

/* RTL - Profile Page */
html[dir="rtl"] .mobile-page-header .mobile-back-btn i {
  transform: rotate(180deg);
}

html[dir="rtl"] .btn-back-link i {
  transform: rotate(180deg);
}

html[dir="rtl"] .profile-card .form-label {
  text-align: right;
}

html[dir="rtl"] .profile-card .form-control {
  text-align: right;
}

html[dir="rtl"] .btn-profile-update i {
  margin-right: 0;
  margin-left: 8px;
}
