﻿/*
 * products.css  (~/Content/products.css)
 * Public product pages: Product Categories, a single Category, and Product Details.
 * Loaded through each view's "styles" section.
 */

/* ---------- shared ---------- */
.pp-intro {
    max-width: 720px;
    margin: 0 auto 2rem;
    text-align: center;
}

    .pp-intro h2 {
        font-size: 1.9rem;
        font-weight: 700;
        margin-bottom: .5rem;
    }

    .pp-intro p {
        margin: 0;
        color: color-mix(in srgb, var(--bs-body-color), transparent 30%);
    }

.pp-grid-wrap {
    background: var(--bs-primary-bg-subtle, #e7f0ff);
    border-radius: 8px;
    padding: 16px;
}

@media (min-width: 992px) {
    .pp-grid-wrap {
        padding: 24px;
    }
}

.pp-empty {
    text-align: center;
    padding: 48px 16px;
    color: color-mix(in srgb, var(--bs-body-color), transparent 35%);
}

    .pp-empty .bi {
        font-size: 2.5rem;
        color: var(--bs-primary);
        display: block;
        margin-bottom: .75rem;
    }

/* Product card extras (the card itself keeps the theme's .product-card styling) */
.product-card .product-image img {
    background: #fff;
}

.product-card .product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .btn {
    border-radius: 4px;
}

.product-card .product-tags .badge {
    border-radius: 4px;
}

/* ---------- Product Categories ---------- */
.cat-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 16px 12px 14px;
    text-align: center;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
    color: var(--bs-body-color);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

    .cat-tile:hover,
    .cat-tile:focus-visible {
        transform: translateY(-4px);
        border-color: color-mix(in srgb, var(--bs-primary), transparent 60%);
        box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
        color: var(--bs-body-color);
    }

    .cat-tile .cat-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 12px;
        border-radius: 6px;
        background: color-mix(in srgb, var(--bs-primary), transparent 94%);
        overflow: hidden;
    }

        .cat-tile .cat-image img {
            max-width: 82%;
            max-height: 82%;
            object-fit: contain;
            transition: transform .3s ease;
        }

    .cat-tile:hover .cat-image img {
        transform: scale(1.06);
    }

    .cat-tile .cat-name {
        font-size: 1rem;
        font-weight: 700;
        margin: 0 0 4px;
        line-height: 1.25;
    }

    .cat-tile .cat-link {
        font-size: .85rem;
        font-weight: 600;
        color: var(--bs-primary);
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

        .cat-tile .cat-link .bi {
            transition: transform .2s ease;
        }

    .cat-tile:hover .cat-link .bi {
        transform: translateX(3px);
    }

@media (max-width: 575.98px) {
    .cat-tile {
        padding: 12px 10px;
    }

        .cat-tile .cat-name {
            font-size: .92rem;
        }
}

/* ---------- Category: chips + toolbar + pagination ---------- */
.cat-chips {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 2px 2px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

    .cat-chips li {
        flex: 0 0 auto;
        margin: 0 !important;
    }

        .cat-chips li a {
            display: inline-block;
            padding: 7px 14px;
            border-radius: 4px;
            border: 1px solid rgba(0, 0, 0, .12);
            background: #fff;
            color: var(--bs-body-color);
            font-size: .875rem;
            font-weight: 500;
            text-decoration: none;
            white-space: nowrap;
            transition: background-color .2s ease, color .2s ease, border-color .2s ease;
        }

            .cat-chips li a:hover {
                border-color: var(--bs-primary);
                color: var(--bs-primary);
            }

            .cat-chips li a.active {
                background: var(--bs-primary);
                border-color: var(--bs-primary);
                color: #fff;
            }

        .cat-chips li.menu-all {
            order: -1;
        }

.cat-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 1rem;
}

    .cat-toolbar .count {
        font-size: .9rem;
        color: color-mix(in srgb, var(--bs-body-color), transparent 35%);
    }

.category-pagination {
    margin-top: 1.75rem;
}

    .category-pagination .pagination-container,
    .category-pagination .pagination {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

        .category-pagination .pagination li > a,
        .category-pagination .pagination li > span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 40px;
            height: 40px;
            padding: 0 10px;
            border-radius: 4px;
            border: 1px solid rgba(0, 0, 0, .12);
            background: #fff;
            color: var(--bs-body-color);
            text-decoration: none;
            font-weight: 500;
        }

            .category-pagination .pagination li > a:hover {
                border-color: var(--bs-primary);
                color: var(--bs-primary);
            }

        .category-pagination .pagination li.active > a,
        .category-pagination .pagination li.active > span {
            background: var(--bs-primary);
            border-color: var(--bs-primary);
            color: #fff;
        }

        .category-pagination .pagination li.disabled > a,
        .category-pagination .pagination li.disabled > span {
            opacity: .45;
            pointer-events: none;
        }

/* ---------- Product Details ---------- */
.pd-gallery .pd-main {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

    .pd-gallery .pd-main .swiper-slide {
        aspect-ratio: 1 / 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
    }

        .pd-gallery .pd-main .swiper-slide > a,
        .pd-gallery .pd-main .swiper-slide > .pd-video {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            cursor: zoom-in;
        }

        .pd-gallery .pd-main .swiper-slide img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

    .pd-gallery .pd-main .pd-zoom-hint {
        position: absolute;
        right: 10px;
        bottom: 10px;
        width: 34px;
        height: 34px;
        border-radius: 4px;
        background: rgba(255, 255, 255, .9);
        color: var(--bs-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
        pointer-events: none;
    }

    .pd-gallery .pd-main .swiper-button-next,
    .pd-gallery .pd-main .swiper-button-prev {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .92);
        color: var(--bs-primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    }

        .pd-gallery .pd-main .swiper-button-next::after,
        .pd-gallery .pd-main .swiper-button-prev::after {
            font-size: 14px;
            font-weight: 700;
        }

.pd-gallery .pd-thumbs {
    margin-top: 10px;
}

    .pd-gallery .pd-thumbs .swiper-slide {
        width: 72px;
        height: 72px;
        border-radius: 6px;
        border: 2px solid transparent;
        background: #fff;
        overflow: hidden;
        cursor: pointer;
        opacity: .65;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity .2s ease, border-color .2s ease;
    }

        .pd-gallery .pd-thumbs .swiper-slide img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .pd-gallery .pd-thumbs .swiper-slide:hover {
            opacity: .9;
        }

    .pd-gallery .pd-thumbs .swiper-slide-thumb-active {
        opacity: 1;
        border-color: var(--bs-primary);
    }

    .pd-gallery .pd-thumbs .pd-thumb-video {
        position: relative;
    }

        .pd-gallery .pd-thumbs .pd-thumb-video > .bi {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            color: #fff;
            background: rgba(0, 0, 0, .3);
        }

.pd-info .pd-category {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--bs-primary);
    text-decoration: none;
    margin-bottom: .5rem;
}

.pd-info .pd-title {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: .75rem;
}

.pd-info .pd-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}

    .pd-info .pd-facts .fact {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 4px;
        font-size: .875rem;
        font-weight: 500;
        background: color-mix(in srgb, var(--bs-primary), transparent 92%);
        color: var(--bs-body-color);
    }

        .pd-info .pd-facts .fact .bi {
            color: var(--bs-primary);
        }

.pd-info .pd-lead {
    font-size: 1.05rem;
    line-height: 1.7;
    color: color-mix(in srgb, var(--bs-body-color), transparent 20%);
    margin-bottom: 1.5rem;
}

.pd-cta {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    margin-bottom: 1.25rem;
}

    .pd-cta p {
        font-size: .9rem;
        margin-bottom: 12px;
        color: color-mix(in srgb, var(--bs-body-color), transparent 25%);
    }

    .pd-cta .pd-cta-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 11px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.pd-btn-primary {
    background: var(--bs-primary);
    color: #fff;
}

    .pd-btn-primary:hover {
        background: color-mix(in srgb, var(--bs-primary), #000 12%);
        color: #fff;
    }

.pd-btn-outline {
    border-color: color-mix(in srgb, var(--bs-primary), transparent 55%);
    color: var(--bs-primary);
    background: #fff;
}

    .pd-btn-outline:hover {
        background: color-mix(in srgb, var(--bs-primary), transparent 92%);
        color: var(--bs-primary);
    }

.pd-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    color: color-mix(in srgb, var(--bs-body-color), transparent 35%);
}

    .pd-share a,
    .pd-share button {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 4px;
        border: 1px solid rgba(0, 0, 0, .12);
        background: #fff;
        color: var(--bs-body-color);
        font-size: .85rem;
        text-decoration: none;
    }

        .pd-share a:hover,
        .pd-share button:hover {
            border-color: var(--bs-primary);
            color: var(--bs-primary);
        }

    .pd-share .bi-whatsapp {
        color: #25d366;
    }

/* Description / Directions */
.pd-tabs {
    margin-top: 3rem;
}

    .pd-tabs .nav-tabs {
        border-bottom: 1px solid rgba(0, 0, 0, .1);
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

        .pd-tabs .nav-tabs .nav-link {
            border: 0;
            border-bottom: 2px solid transparent;
            border-radius: 0;
            padding: .75rem 1.25rem;
            font-weight: 600;
            color: color-mix(in srgb, var(--bs-body-color), transparent 35%);
            white-space: nowrap;
        }

            .pd-tabs .nav-tabs .nav-link:hover {
                color: var(--bs-primary);
            }

            .pd-tabs .nav-tabs .nav-link.active {
                color: var(--bs-primary);
                background: transparent;
                border-bottom-color: var(--bs-primary);
            }

    .pd-tabs .tab-content {
        padding: 1.5rem 0 0;
        max-width: 860px;
        line-height: 1.7;
    }

        .pd-tabs .tab-content h4,
        .pd-tabs .tab-content h5 {
            font-weight: 700;
            margin-top: .5rem;
        }

        .pd-tabs .tab-content ul {
            padding-left: 1.25rem;
        }

        .pd-tabs .tab-content li {
            margin-bottom: .35rem;
        }

        .pd-tabs .tab-content img {
            max-width: 100%;
            height: auto;
        }

@media (max-width: 991.98px) {
    .pd-info {
        margin-top: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .pd-info .pd-title {
        font-size: 1.5rem;
    }

    .pd-cta .pd-cta-actions .pd-btn {
        width: 100%;
    }

    .pd-tabs {
        margin-top: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cat-tile,
    .cat-tile .cat-image img,
    .cat-tile .cat-link .bi {
        transition: none;
        transform: none !important;
    }
}