/* Custom Styles for Jahongir's Digital Bazaar */

/* Base styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Language toggle buttons */
.lang-btn {
    color: #6B7280;
}

.lang-btn.active {
    background-color: #722F37;
    color: white;
}

/* Product cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.product-card img {
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Add to cart button animation */
.add-to-cart-btn {
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
}

.add-to-cart-btn.added {
    background-color: #10B981 !important;
}

/* Category cards */
.category-card {
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: scale(1.02);
}

/* Cart badge animation */
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.cart-bounce {
    animation: cartBounce 0.3s ease;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #722F37;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #722F37;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Product placeholder image */
.product-image-placeholder {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* Quantity controls */
.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #f3f4f6;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 4px;
    font-size: 14px;
}

/* Filter buttons */
.filter-btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #722F37;
    color: #722F37;
}

.filter-btn.active {
    background: #722F37;
    color: white;
    border-color: #722F37;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.show {
    max-height: 300px;
}

/* Form inputs */
input:focus, select:focus, textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #D4AF37;
}

/* Checkout steps */
.checkout-step {
    position: relative;
    padding-left: 40px;
}

.checkout-step::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: #722F37;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Price styling */
.price {
    font-weight: 600;
    color: #722F37;
}

.price-original {
    text-decoration: line-through;
    color: #9CA3AF;
    font-size: 0.875rem;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-new {
    background: #D4AF37;
    color: #2D2D2D;
}

.badge-sale {
    background: #EF4444;
    color: white;
}

.badge-bestseller {
    background: #722F37;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2rem;
    }
}

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

/* Smooth page transitions */
.page-transition {
    animation: fadeIn 0.3s ease;
}

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

/* Success message */
.success-message {
    background: #10B981;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Empty cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}
