/* 
 * OSSAH Site CSS - Additional styles and overrides
 * This file contains custom styles that extend the theme.css
 */

/* Custom Animations */
@keyframes zoomIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

@keyframes colorSelected {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.zoom-in {
    animation: zoomIn 0.6s ease-in-out;
}

.color-selected {
    animation: colorSelected 0.3s ease-in-out;
}

/* Swiper Customizations */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .swiper-slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform var(--ossah-transition-normal);
    }

/* Product Card Carousel Specific */
.product-carousel {
    height: 250px;
    border-radius: var(--ossah-border-radius-md) var(--ossah-border-radius-md) 0 0;
    overflow: hidden;
}

    .product-carousel .swiper-button-next,
    .product-carousel .swiper-button-prev {
        width: 30px;
        height: 30px;
        margin-top: -15px;
        color: var(--ossah-white);
        background: rgba(35, 45, 54, 0.7);
        border-radius: 50%;
        opacity: 0;
        transition: opacity var(--ossah-transition-normal);
    }

        .product-carousel .swiper-button-next::after,
        .product-carousel .swiper-button-prev::after {
            font-size: 12px;
            font-weight: 900;
        }

.product-card:hover .swiper-button-next,
.product-card:hover .swiper-button-prev {
    opacity: 1;
}

.product-carousel .swiper-pagination {
    bottom: 10px;
}

.product-carousel .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.8);
    opacity: 0.7;
}

.product-carousel .swiper-pagination-bullet-active {
    background: var(--ossah-primary);
    opacity: 1;
}

/* Product Detail Carousel */
.product-detail-carousel {
    height: 500px;
    border-radius: var(--ossah-border-radius-md);
    overflow: hidden;
}

.product-thumbnails-carousel {
    height: 80px;
    box-sizing: border-box;
    padding: 10px 0;
}

    .product-thumbnails-carousel .swiper-slide {
        width: 25%;
        height: 100%;
        opacity: 0.4;
        cursor: pointer;
        border-radius: var(--ossah-border-radius-sm);
        overflow: hidden;
    }

    .product-thumbnails-carousel .swiper-slide-thumb-active {
        opacity: 1;
        border: 2px solid var(--ossah-primary);
    }

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ossah-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--ossah-teal-lighter);
    border-top: 4px solid var(--ossah-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Lazy Loading Images */
.lazy {
    opacity: 0;
    transition: opacity var(--ossah-transition-normal);
}

    .lazy.loaded {
        opacity: 1;
    }

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--ossah-secondary);
    color: var(--ossah-white);
    border: none;
    border-radius: 50%;
    box-shadow: var(--ossah-shadow-md);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1000;
    transition: all var(--ossah-transition-fast);
}

    #back-to-top:hover {
        background-color: var(--ossah-primary);
        transform: translateY(-2px);
    }

/* Pagination Styles */
.pagination {
    justify-content: center;
}

.page-link {
    color: var(--ossah-primary);
    border-color: var(--ossah-teal-lighter);
}

    .page-link:hover {
        color: var(--ossah-teal-darker);
        background-color: var(--ossah-teal-lighter);
        border-color: var(--ossah-primary);
    }

.page-item.active .page-link {
    background-color: var(--ossah-primary);
    border-color: var(--ossah-primary);
}

/* Toast Notifications */
.toast-container {
    z-index: var(--ossah-z-index-tooltip);
}

.toast {
    border-radius: var(--ossah-border-radius-md);
    box-shadow: var(--ossah-shadow-md);
}

/* Form Enhancements */
.form-control:focus {
    border-color: var(--ossah-primary);
    box-shadow: 0 0 0 0.2rem rgba(73, 146, 165, 0.25);
}

.form-select:focus {
    border-color: var(--ossah-primary);
    box-shadow: 0 0 0 0.2rem rgba(73, 146, 165, 0.25);
}

/* Category Filter Sidebar */
.category-filter {
    background-color: var(--ossah-background);
    border-radius: var(--ossah-border-radius-md);
    box-shadow: var(--ossah-shadow-sm);
    padding: var(--ossah-spacing-lg);
}

    .category-filter h5 {
        color: var(--ossah-dark);
        border-bottom: 2px solid var(--ossah-primary);
        padding-bottom: var(--ossah-spacing-sm);
        margin-bottom: var(--ossah-spacing-md);
    }

    .category-filter .list-group-item {
        border: none;
        padding: var(--ossah-spacing-sm) 0;
        background: transparent;
    }

        .category-filter .list-group-item:hover {
            background-color: var(--ossah-teal-lighter);
            color: white;
            border-radius: var(--ossah-border-radius-sm);
        }

        .category-filter .list-group-item.active {
            padding:10px;
            background-color: var(--ossah-primary);
            color: white;
            border-radius: var(--ossah-border-radius-sm);
        }

/* Product Grid Enhancements */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--ossah-spacing-lg);
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--ossah-spacing-md);
    }
}

/* Breadcrumb Styling */
.breadcrumb {
    background-color: transparent;
    margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--ossah-primary);
    content: "›";
}

.breadcrumb-item.active {
    color: var(--ossah-dark);
}

.breadcrumb-item a {
    color: var(--ossah-primary);
    text-decoration: none;
}

    .breadcrumb-item a:hover {
        color: var(--ossah-teal-darker);
        text-decoration: underline;
    }

/* Responsive Design Utilities */
@media (max-width: 768px) {
    .hero-banner {
        padding: 2rem 0;
    }

        .hero-banner h1 {
            font-size: 2.5rem;
        }

    .product-detail-carousel {
        height: 300px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    :root {
        --ossah-spacing-xl: 1.5rem;
    }

    .hero-banner h1 {
        font-size: 2rem;
    }

    .product-detail-carousel {
        height: 250px;
    }

    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        text-decoration:none !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer-ossah,
    .whatsapp-btn,
    #back-to-top,
    .social-icon {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --ossah-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
        --ossah-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
        --ossah-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Visible Support */
.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--ossah-primary);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ossah-white);
}

::-webkit-scrollbar-thumb {
    background: var(--ossah-teal-lighter);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--ossah-primary);
    }
