/* Main Styles */
.hero-slider {
    transition: transform 0.5s ease-in-out;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.sidebar-transition {
    transition: transform 0.3s ease-in-out;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Product Detail Modal */
.modal-overlay {
    background: rgba(6, 78, 59, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
}

/* Stab.uz Inspired Catalog Styles */
#catalog-dropdown {
    z-index: 120;
    /* Always below sticky header bars (z-130 to z-150) */
}

#catalog-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

#catalog-dropdown:not(.hidden) #catalog-overlay {
    opacity: 1;
}

#catalog-sidebar {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    margin-top: var(--header-height, 144px);
    height: 600px;
    background: white;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease-out;
    border-radius: 0 0 1rem 1rem;
    display: flex !important;
    flex-direction: row !important;
}

#catalog-dropdown:not(.hidden) #catalog-sidebar {
    transform: translateY(0);
    opacity: 1;
}

/* Categories List */
#catalog-categories-parent {
    width: 300px !important;
    background: #f8f9fa !important;
    border-right: 1px solid #eee !important;
    padding: 1rem 0 !important;
}

/* Cart Dropdown Styles */
#cart-dropdown {
    z-index: 120;
}

#cart-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

#cart-dropdown:not(.hidden) #cart-overlay,
#wishlist-dropdown:not(.hidden) #wishlist-overlay {
    opacity: 1;
}

#cart-sidebar,
#wishlist-sidebar {
    position: relative;
    width: 450px;
    margin-top: var(--header-height, 144px);
    height: calc(100vh - var(--header-height, 144px));
    background: white;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

#cart-dropdown:not(.hidden) #cart-sidebar,
#wishlist-dropdown:not(.hidden) #wishlist-sidebar {
    transform: translateY(0);
    opacity: 1;
}

.catalog-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    transition: all 0.2s;
    border-left: 3px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-align: left;
}

.catalog-button.active {
    background: white !important;
    color: #059669 !important;
    /* emerald-600 */
    border-left-color: #059669 !important;
}

.catalog-button i {
    color: #ccc !important;
    transition: color 0.2s;
    opacity: 1 !important;
}

.catalog-button.active i {
    color: #059669 !important;
}

/* Subcategories Area */
#catalog-subcategories-container {
    flex: 1 !important;
    padding: 2.5rem 3.5rem !important;
    background: white !important;
    position: relative;
    display: block !important;
    overflow-y: auto;
}

.orange-divider {
    position: absolute;
    left: 0;
    top: 2rem;
    bottom: 2rem;
    width: 2px;
    background: #059669;
}

.subcategory-group-title {
    font-size: 1rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 1.25rem;
    display: block;
}

.subcategory-item {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.65rem;
    display: block;
    text-decoration: none;
    transition: color 0.1s;
    width: fit-content;
}

.subcategory-item:hover {
    color: #059669;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    body {
        padding-bottom: 4rem;
    }

    #checkout-modal {
        padding-top: calc(var(--header-height, 200px) + 4px) !important;
    }

    #checkout-dialog {
        max-height: calc(100vh - var(--header-height, 200px) - 4.5rem) !important;
    }

    #catalog-sidebar {
        height: calc(100vh - var(--header-height, 0px));
        margin-top: var(--header-height, 0px);
        border-radius: 0;
        flex-direction: column !important;
    }

    #catalog-categories-parent {
        width: 100% !important;
    }

    #cart-sidebar,
    #wishlist-sidebar {
        height: calc(100vh - var(--header-height, 0px) - 4rem);
    }
}