.header {
    background: var(--white);
    box-shadow: 0 2px 20px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

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

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2.5rem;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--dark-brown);
    font-weight: 700;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--medium-brown);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-brown);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--light-brown);
    transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--light-brown);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--dark-brown);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.icon-btn:hover {
    background: var(--cream);
    color: var(--light-brown);
    transform: translateY(-2px);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--light-brown);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Cart Page Styles */
.cart-section {
  padding: 60px 0;
  background: #f8f9fa;
  min-height: 60vh;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
}

.cart-main {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f3f5;
}

.cart-header h2 {
  font-size: 1.5rem;
  color: #2d3436;
}

.btn-clear-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.btn-clear-cart:hover {
  background: #e74c3c;
  color: white;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto auto auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  position: relative;
  transition: all 0.3s;
}

.cart-item:hover {
  background: #f1f3f5;
  transform: translateX(-5px);
}

.cart-area-loading {
  opacity: 0.65;
  pointer-events: none;
}

.cart-area-updated .cart-item,
.cart-area-updated .summary-box {
  animation: cartSoftIn 0.32s ease;
}

.cart-form-loading {
  opacity: 0.72;
}

@keyframes cartSoftIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-image {
  width: 120px;
  height: 120px;
    border-radius: 10px;
  overflow: hidden;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-details h3 {
  font-size: 1.1rem;
  color: #2d3436;
  margin: 0;
}

.item-meta {
  font-size: 0.9rem;
  color: #636e72;
}

.item-price {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.item-price .old-price {
  font-size: 0.9rem;
  color: #95a5a6;
  text-decoration: line-through;
}

.item-price .price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ff6b35;
}

.item-price .discount-badge {
  background: #e74c3c;
  color: white;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
}

.item-quantity {
  display: flex;
  align-items: center;
  gap: 5px;
  background: white;
  border-radius: 8px;
  padding: 5px;
  border: 1px solid #dfe6e9;
}

.item-quantity form,
.cart-header form,
.cart-item > form {
  margin: 0;
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  color: #2d3436;
}

.qty-btn:hover {
  background: #ff6b35;
  color: white;
}

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

.qty-input {
  width: 50px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #2d3436;
}

.item-total {
  min-width: 140px;
  text-align: left;
}

.total-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2d3436;
}

.btn-remove {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  color: #e74c3c;
}

.btn-remove:hover {
  background: #e74c3c;
  color: white;
  transform: rotate(90deg);
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding-top: 20px;
  border-top: 2px solid #f1f3f5;
}

.cart-actions .btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Cart Sidebar */
.cart-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-box,
.coupon-box,
.shipping-box,
.benefits-box {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.summary-box h3,
.coupon-box h3,
.shipping-box h3 {
  font-size: 1.2rem;
  color: #2d3436;
  margin-bottom: 20px;
}

.shipping-estimate {
  margin-top: 12px;
  color: #636e72;
  font-size: 0.92rem;
  line-height: 1.8;
}

.shipping-estimate-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #f1d2bd;
  border-radius: 8px;
  background: #fff8f5;
  color: #636e72;
  font-size: 0.92rem;
  line-height: 1.8;
}

.shipping-estimate-card.success {
  background: #eaf7ee;
  border-color: #bfe7ca;
  color: #1e7f43;
  font-weight: 700;
}

.cart-alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 700;
}

.cart-alert.success {
  background: #eaf7ee;
  color: #1e7f43;
}

.cart-alert.error {
  background: #fff0f0;
  color: #b00020;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: #636e72;
}

.summary-row span:last-child {
  font-weight: 600;
  color: #2d3436;
}

.summary-row.discount span:last-child {
  color: #27ae60;
}

.summary-row .shipping-cost {
  color: #27ae60;
  font-weight: 700;
}

.summary-divider {
  height: 1px;
  background: #dfe6e9;
  margin: 20px 0;
}

.summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3436;
  padding-top: 10px;
}

.summary-row.total span:last-child {
  font-size: 1.3rem;
  color: #ff6b35;
}

.btn-checkout {
  width: 100%;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  font-size: 1rem;
}

.secure-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  font-size: 0.85rem;
  color: #636e72;
}

.secure-checkout svg {
  color: #27ae60;
}

/* Coupon Box */
.coupon-box p {
  font-size: 0.9rem;
  color: #636e72;
  margin-bottom: 15px;
}

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

.coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #fff7f2;
  color: #ff6b35;
  font-weight: 700;
}

.coupon-applied button {
  border: none;
  background: transparent;
  color: #b00020;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.coupon-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s;
}

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

.coupon-input-group .btn {
  padding: 12px 20px;
  white-space: nowrap;
}

/* Shipping Box */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #2d3436;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s;
  background: white;
}

.manual-city-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #f1d2bd;
  border-radius: 8px;
  background: #fff8f5;
  color: #636e72;
  font-size: 0.9rem;
  cursor: pointer;
}

.manual-city-fields {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #f1d2bd;
  border-radius: 8px;
  background: #fff8f5;
}

.manual-city-fields[hidden] {
  display: none;
}

.form-control:focus {
  outline: none;
  border-color: #ff6b35;
}

.btn-block {
  width: 100%;
  margin-top: 10px;
}

/* Benefits Box */
.benefits-box {
  padding: 20px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #f1f3f5;
}

.benefit-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.benefit-item svg {
  color: #ff6b35;
  flex-shrink: 0;
}

.benefit-item h4 {
  font-size: 0.95rem;
  color: #2d3436;
  margin: 0 0 5px 0;
}

.benefit-item p {
  font-size: 0.85rem;
  color: #636e72;
  margin: 0;
}

/* Empty Cart */
.empty-cart {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 15px;
}

.empty-cart-icon {
  margin-bottom: 30px;
  opacity: 0.3;
}

.empty-cart-icon svg {
  color: #95a5a6;
}

.empty-cart h2 {
  font-size: 1.8rem;
  color: #2d3436;
  margin-bottom: 15px;
}

.empty-cart p {
  font-size: 1rem;
  color: #636e72;
  margin-bottom: 30px;
}

/* Related Products */
.related-products {
  padding: 60px 0;
  background: white;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2rem;
  color: #2d3436;
  margin-bottom: 10px;
}

.section-header p {
  font-size: 1rem;
  color: #636e72;
}

.products-slider {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .cart-layout {
    grid-template-columns: 1fr 350px;
  }
  
  .products-slider {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  
  .cart-sidebar {
    order: -1;
  }
  
  .cart-item {
    grid-template-columns: 100px 1fr auto;
    gap: 15px;
  }
  
  .item-quantity {
    grid-column: 2 / 3;
  }
  
  .item-total {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }
  
  .btn-remove {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
  }
  
  .products-slider {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cart-section {
    padding: 40px 0;
  }
  
  .cart-main {
    padding: 20px;
  }
  
  .cart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .cart-item {
    grid-template-columns: 80px 1fr;
    padding: 15px;
  }
  
  .item-image {
    width: 80px;
    height: 80px;
  }
  
  .item-details h3 {
    font-size: 1rem;
  }
  
  .item-quantity {
    grid-column: 1 / 3;
    justify-self: start;
    margin-top: 10px;
  }
  
  .item-total {
    grid-column: 1 / 3;
    grid-row: auto;
    text-align: right;
    margin-top: 10px;
  }
  
  .cart-actions {
    flex-direction: column;
  }
  
  .cart-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .summary-box,
  .coupon-box,
  .shipping-box,
  .benefits-box {
    padding: 20px;
  }
  
  .coupon-input-group {
    flex-direction: column;
  }
  
  .coupon-input-group .btn {
    width: 100%;
  }
  
  .products-slider {
    grid-template-columns: 1fr;
  }
  
  .related-products {
    padding: 40px 0;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .cart-header h2 {
    font-size: 1.2rem;
  }
  
  .btn-clear-cart {
    font-size: 0.85rem;
    padding: 8px 15px;
  }
  
  .item-details h3 {
    font-size: 0.95rem;
  }
  
  .item-meta {
    font-size: 0.85rem;
  }
  
  .item-price .price {
    font-size: 1rem;
  }
  
  .total-price {
    font-size: 1.1rem;
  }
  
  .summary-row {
    font-size: 0.9rem;
  }
  
  .summary-row.total {
    font-size: 1rem;
  }
  
  .summary-row.total span:last-child {
    font-size: 1.2rem;
  }
}

.btn-checkout:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
