/* ============================================================
   Physical Product Gallery — Client Store Styles (twenty-one theme)
   File: modules/addons/physical_gallery/assets/css/client_store.css
   ============================================================ */

/* ── Category Image (Store Index) ─────────────────────────── */
.pg-category-img-wrap {
    margin: 12px auto 18px;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    transition: transform .3s ease;
}


.pg-category-img {
    width: 100%;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: opacity .5s ease;
    animation: pgClientFadeIn .5s ease forwards;
}

@keyframes pgClientFadeIn {
    from {
        opacity: 0;
        transform: scale(1.04);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Product Listing Layout ────────────────────────────────── */

/* Featured image di atas nama produk */
.pg-product-featured {
    width: 100%;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    margin-bottom: 12px;
}

.pg-product-featured img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: opacity .4s ease;
    display: block;
}

/* Deskripsi + mini gallery dalam grid 2 kolom */
.pg-desc-with-gallery {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 12px;
    align-items: start;
}

/* Mini gallery strip */
.pg-mini-gallery {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pg-mini-thumb {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: border-color .2s, transform .2s;
    display: block;
}

.pg-mini-thumb:hover {
    border-color: #4f46e5;
    transform: scale(1.05);
}

/* Responsive: stack pada layar kecil */
@media (max-width: 480px) {
    .pg-desc-with-gallery {
        grid-template-columns: 1fr;
    }

    .pg-mini-gallery {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pg-mini-thumb {
        width: 70px;
        aspect-ratio: 1;
    }
}

/* ── Long Description Panel ────────────────────────────────── */
.pg-long-desc-panel {
    margin: 28px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .07);
}

.pg-long-desc-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 1rem;
}

.pg-long-desc-header i {
    margin-right: 8px;
}

.pg-long-desc-body {
    padding: 20px 24px;
    line-height: 1.75;
    color: #334155;
    font-size: .95rem;
}

.pg-long-desc-body h1,
.pg-long-desc-body h2,
.pg-long-desc-body h3 {
    color: #1e293b;
    margin-top: 16px;
    margin-bottom: 8px;
}

.pg-long-desc-body ul,
.pg-long-desc-body ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.pg-long-desc-body li {
    margin-bottom: 4px;
}

.pg-long-desc-body strong {
    color: #0f172a;
}

.pg-long-desc-body a {
    color: #4f46e5;
}

.pg-long-desc-body a:hover {
    text-decoration: underline;
}

/* ── Lightbox ──────────────────────────────────────────────── */
.pg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s, opacity .3s, visibility .3s;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.pg-lightbox.visible {
    background: rgb(255 255 255 / 0%);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pg-lightbox-inner {
    position: relative;
    max-width: min(90vw, 900px);
    transform: scale(.92);
    transition: transform .3s;
    cursor: default;
}

.pg-lightbox.visible .pg-lightbox-inner {
    transform: scale(1);
}

.pg-lightbox-img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
}

.pg-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    transition: background .2s;
}

.pg-lightbox-close:hover {
    background: #fee2e2;
}

.pg-lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 12px;
    font-size: .9rem;
    opacity: .85;
}
/* ── Uniform Category Cards (Override Bootstrap 4 Masonry) ─── */
.card-columns.home {
    -webkit-column-count: auto;
    -moz-column-count: auto;
    column-count: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card-columns.home .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0 !important;
}

.card-columns.home .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-columns.home .card-body .btn {
    margin-top: auto;
}