:root {
    --dorsa-yellow: #F6C900;
    --dorsa-black: #181818;
}

.main-header {
    z-index: 1089;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 35px;
}

.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    height: 100%;
    align-items: center;
}

.header-actions {
    z-index: 1;
    display: flex;
    align-items: center;
}

.logo {
    height: 24px;
    display: block;
}

.menu-button img {
    transition: transform 0.3s ease;
}

.menu-button img.rotate-icon {
    transform: rotate(180deg);
}  

.header-menu-list {
    display: none;
}

.main-header .cart-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    background: var(--bs-danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}
  
.main-header .cart-badge.show {
    display: flex;
    animation: pulse 0.5s ease;
}

/* Mobile Cart Modal Styles */
.mobile-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
  
.mobile-cart-modal.active {
    display: block;
    opacity: 1;
}
  
.mobile-cart-content {
    position: fixed;
    background: var(--bs-body-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 320px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Mobile styles (bottom-up animation) */
@media (max-width: 768px) {
    .mobile-cart-modal {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
    }
    .mobile-cart-content {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 80vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        opacity: 1 !important;
    }
    .mobile-cart-modal.active .mobile-cart-content {
        transform: translateY(0);
    }
    .base-logo.logo-container {
        left: 0;
        transform: unset;
    }
}

@media (min-width: 769px) {
    .mobile-cart-content {
      top: 0;
      right: 0;
      border-radius: 20px 0 0 20px;
      transform: translateX(100%);
      animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
  
    .mobile-cart-modal.active .mobile-cart-content {
      transform: translateX(0);
    }
}

@keyframes slideIn {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
}
  
@keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
}

.mobile-cart-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bs-border-color);
}
  
.mobile-cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}
  
.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--bs-body-color);
    cursor: pointer;
    padding: 5px;
}

.mobile-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}
  
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    position: relative;
    transition: all 0.2s ease;
}
  
.cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(1);
}
  
.mobile-cart-footer {
    padding: 16px;
    border-top: 1px solid #eee;
    background: #fff;
}
  
.cart-actions {
    margin-bottom: 12px;
}
  
.clear-cart-btn {
    width: 100%;
    padding: 10px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    /* border-radius: 6px; */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
  
.clear-cart-btn:hover {
    background: #f8f9fa;
    border-color: #ddd;
    color: #666;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 12px;
}

.total-price {
  font-weight: 600;
  color: var(--dorsa-yellow);
  font-size: 1rem;
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background: #181818;
  color: #fff;
  border: none;
  /* border-radius: 6px; */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.checkout-btn:hover {
  background: #292929;
}

.empty-cart {
  text-align: center;
  padding: 32px 16px;
  color: #666;
}

.empty-cart i {
  font-size: 2.5rem;
  color: #ddd;
  margin-bottom: 12px;
}

.empty-cart p {
  font-size: 0.9rem;
  margin: 0;
  color: #666;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.9rem;
  color: var(--dorsa-black);
  font-weight: 600;
  margin: 0 0 8px 0;
}

.cart-item-price.discount {
  color: #dc3545;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #181818;
  background: inherit;
  /* border-radius: 4px; */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #181818;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.quantity-btn:hover {
  border-color: var(--dorsa-yellow);
  color: var(--dorsa-yellow);
}

.quantity-value {
  min-width: 24px;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  color: #333;
}

.remove-item {
  position: absolute;
  top: 8px;
  left: 8px;
  background: none;
  border: none;
  color: #777777;
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.remove-item:hover {
  color: #dc3545;
}

@media (max-width: 410px) {
    .base-logo.logo-container img {
        max-width: 170px;
    }
}