/* ============================================================
   1. DESKTOP STYLES (Your Original Code - No Changes)
   ============================================================ */
.btn-cart-hover {
  padding: 5px 15px;
  border-radius: 50px; 
  background-color: #ffd814; 
  color: #161615;             
  transition: all 0.3s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap; 
  flex-shrink: 0;         
}
.product-actions {
  gap: 14px;
}

.product-actions .product-qty {
  flex-shrink: 0;
}

.product-actions .btn-cart-hover {
  flex: 1;
  justify-content: center;
}

.product-qty {
  max-width: 120px;
  flex-shrink: 0;
}

#quantity, .input-number {
  font-weight: 600;
  color: #161615;
  border: none;
  background: transparent;
  box-shadow: none;
}

.btn-cart-hover:hover {
  background-color: #ecbe27;
  color: #533f03;            
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-buy-now {
  background-color: #161615;
  color: #ffffff;            
  padding: 5px 25px;
  border-radius: 50px;       
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid #161615; 
  height: 40px;              
  white-space: nowrap;
}

.btn-buy-now:hover {
  background-color: #333333;
  color: #ffffff;
}

.cart-badge {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif; 
  font-size: 11px !important;
  font-weight: 800 !important;   
  line-height: 1 !important;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  padding: 0 !important;         
  background-color: #ff0000 !important; 
  color: #ffffff !important;           
  border: 1.5px solid #ffffff !important; 
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  border-radius: 50% !important;
}

.cart, .d-lg-none a {
  position: relative;
  display: inline-flex;
}

.btn-checkout-page {
  background-color: #ffd814; 
  color: #161615;
  border: none;
  transition: all 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 1px;
}

.btn-checkout-page:hover {
  background-color: #ecbe27;
  color: #533f03;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-continue-shopping {
  background-color: #161615;
  color: #ffffff;
  border: 2px solid #161615;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
}

.btn-continue-shopping:hover {
  background-color: #333333;
  color: #ffffff;
  border-color: #333333;
}

.checkout-step { padding: 10px 0; }
.step-summary { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 6px 0; }
.edit-btn { font-size: 12px; padding: 4px 14px; border-radius: 0; }
.payment-box { border: 1px solid #ddd; padding: 18px; display: flex; align-items: center; gap: 12px; background: #f9f9f9; }
.checkout-block h6 { font-size: 14px; letter-spacing: 0.5px; }
.checkout-block { padding: 8px 0; }
button.btn-sm { padding: 4px 16px; border-radius: 0; }

.form-check-input {
  border: 2px solid #212529 !important;
  background-color: #ffffff;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: #212529 !important;
  border-color: #212529 !important;
}

#checkout .text-dark, 
#checkout .form-check-label, 
#checkout p {
  color: #000000 !important;
  opacity: 1 !important;
}

#checkout a.text-dark:hover { color: #333 !important; }

/* ============================================================
   2. MOBILE & TABLET RESPONSIVE FIXES (Only below 992px)
   ============================================================ */

@media (max-width: 991.98px) {
  /* Table to Card Transformation */
  #cart .table thead { display: none; }
  #cart .table, #cart .table tbody, #cart .table tr, #cart .table td {
    display: block;
    width: 100%;
  }
  #cart .table tr {
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6 !important;
    border-radius: 12px;
    padding: 15px;
    background: #fff;
  }
  #cart .table td {
    text-align: left !important;
    padding: 10px 5px !important;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  #cart .table td:first-child {
    display: block;
    border-bottom: 1px solid #f1f1f1;
    margin-bottom: 10px;
    padding-bottom: 15px !important;
  }
  #cart .table td:nth-child(2):before { content: "Price:"; font-weight: bold; color: #6c757d; }
  #cart .table td:nth-child(3):before { content: "Quantity:"; font-weight: bold; color: #6c757d; }
  #cart .table td:nth-child(4):before { content: "Subtotal:"; font-weight: bold; color: #6c757d; }

  /* --- NEW: MOBILE CART TOTALS FIX --- */
  .total-price {
    padding: 20px !important; /* Slightly less padding to fit screen */
    margin-top: 20px;
  }

  .total-price h4 {
    font-size: 1.25rem;
    text-align: center;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
  }

  /* Make buttons full width and larger for touch */
  .btn-checkout-page, .btn-continue-shopping {
    width: 100%;
    padding: 15px !important;
    font-size: 14px;
  }

  /* Center Order Info text */
  .shopify-cart .p-4.rounded.border {
    padding: 20px !important;
    text-align: center;
  }
  /* Fix quantity group width */
#cart .input-group {
  width: 100% !important;
  max-width: 140px;
}

/* Prevent overflow */
#cart .table td {
  flex-wrap: wrap;
  gap: 8px;
}

/* Better price alignment */
#cart .table td:nth-child(2),
#cart .table td:nth-child(4) {
  font-weight: 600;
}

/* Remove overlapping issues */
#cart .table td span,
#cart .table td div {
  max-width: 100%;
  word-break: break-word;
}

/* Make remove button centered nicely */
#cart .table td:last-child {
  justify-content: center;
}
}


@media (max-width: 768px) {

  /* CHECKOUT */
  #checkout table thead { display: none; }
  #checkout table,
  #checkout table tbody,
  #checkout table tr,
  #checkout table td {
    display: block;
    width: 100%;
  }

  #checkout table tr {
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
  }

  #checkout table td {
    text-align: center;
    padding: 8px 0;
    border: none;
  }

  #checkout table td:first-child {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
  }

  #checkout button {
    width: 100%;
  }

  /* ORDERS */
  #orders table thead { display: none; }
  #orders table,
  #orders table tbody,
  #orders table tr,
  #orders table td {
    display: block;
    width: 100%;
  }

  #orders table tr {
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
  }

  #orders table td {
    padding: 6px 0;
    text-align: left;
    border: none;
  }

  #orders table td:nth-child(1)::before { content: "Order:"; font-weight: bold; display: block; }
  #orders table td:nth-child(2)::before { content: "Date:"; font-weight: bold; display: block; }
  #orders table td:nth-child(3)::before { content: "Status:"; font-weight: bold; display: block; }
  #orders table td:nth-child(4)::before { content: "Total:"; font-weight: bold; display: block; }

}

header {
    position: relative;
    z-index: 1050;
}

.sticky-top {
    z-index: 100 !important;
}

.dropdown-menu {
    z-index: 1051 !important;
}

.banner-ad .banner-content {
    background: linear-gradient(to right, rgba(255,255,255,0.75) 60%, transparent 80%);
    border-radius: 12px;
    padding: 24px;
}