/* ============================================================
   Tilla to Talim — PRODUCT DETAILS PAGE
   All colors driven by design tokens (css/base.css :root).
   ============================================================ */

/* ── PAGE HERO (Product Details — banner-4) ──
   Banner: config/config.php → pages.product_details.hero_img, rendered inline by pro_details.php. */

/* GALLERY — main shot on top, the four extra shots as an equal-width strip
   underneath. Both sit in .product-gallery, so the strip is exactly as wide as
   the image (500px) instead of the wider Bootstrap column. */
.product-gallery {
    --gallery-width: 500px; /* the product shots' natural size — the strip follows it */
    max-width: var(--gallery-width);
}

.gallery-main {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--surface-card);
}

.gallery-main img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    /* transform carries the hover zoom. The thumbnail swap replaces the image
       outright (js/custom.js) — nothing here fades or hides the frame, so the
       big shot can never end up invisible. */
    transition: transform var(--transition-slow);
}

.gallery-main:hover img {
    transform: scale(1.03);
}

.gallery-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--gradient-gold);
    color: var(--color-primary-deep);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
}

/* One equal column per VISIBLE shot — four per row, since the shot currently
   in the frame above is hidden (.thumb.active) — so the strip is exactly as
   wide as the image on every screen size (5 shots = 1 frame + 4 thumbs). */
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.thumb {
    display: block; /* the thumb is an <a> — block keeps the frame exact */
    width: 100%;
    aspect-ratio: 1 / 1; /* square, like the product shots (500 × 500) */
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--surface-card);
    cursor: pointer;
    transition: border-color var(--transition-fast), transform var(--transition-fast),
                box-shadow var(--transition-fast);
}

.thumb:hover {
    border-color: var(--color-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xs);
}

/* The shot currently shown in the big frame above leaves the strip — the row
   always holds the images you are NOT viewing (see js/custom.js). */
.thumb.active {
    display: none;
}

.thumb:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.thumb:hover img {
    transform: scale(1.06);
}

/* PRODUCT INFO */
.product-category-label,
a.product-category-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-gold-text);
    /* 4px of padding over a 17px line gives a 25px tap target on phones;
       the smaller margin below keeps the gap above the title exactly as it was. */
    padding: 4px 0;
    margin-bottom: 2px;
    display: block;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a.product-category-label:hover,
a.product-category-label:focus-visible {
    color: var(--color-gold-deep);
}

/* Slug label above the product title (template: .product-slug) */
.product-slug {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-gold-text);
    margin-bottom: 2px;
}

.product-title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rating-score {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-gold-deep);
}

.rating-count {
    font-size: 13px;
    color: var(--text-soft);
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--color-gold-soft);
    color: var(--color-gold-text);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

/* Short description — shown once under the title (live from DB) */
.product-desc {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-body);
    margin-bottom: 0;
}

/* At a Glance — 4 key highlights (2x2 grid) after the description */
.glance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.glance-item {
    background: var(--surface-ivory);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    min-width: 0;
}

.glance-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.glance-val {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.4;
    word-break: break-word;
}

/* Specs table (tab) */
.spec-table {
    font-size: 14px;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.spec-table th {
    width: 38%;
    background: var(--surface-cream);
    color: var(--text-body);
    font-weight: 600;
    border-color: var(--border-color);
    vertical-align: top;
}

.spec-table td {
    color: var(--text-strong);
    border-color: var(--border-color);
}

/* QTY */
.qty-box {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    background: var(--surface-card);
    border: none;
    width: 40px;
    height: 42px;
    font-size: 18px;
    color: var(--color-gold-deep);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--gold-tint-200);
}

.qty-input {
    width: 52px;
    height: 42px;
    border: none;
    border-left: 1.5px solid var(--border-color);
    border-right: 1.5px solid var(--border-color);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
    outline: none;
}

/* ACTION BUTTONS */
.btn-enquire-big {
    background: var(--color-primary);
    color: var(--text-on-dark);
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-enquire-big:hover {
    background: var(--color-primary-deep);
    color: var(--text-on-dark);
}

.btn-whatsapp {
    background: var(--color-whatsapp);
    color: var(--text-on-dark);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp:hover {
    background: var(--color-whatsapp-dark);
    color: var(--text-on-dark);
}

/* TRUST */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-second);
    background: var(--surface-ivory);
    border: 1px solid var(--border-color);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
}

.trust-item i {
    color: var(--color-icon);
    font-size: 16px;
}

/* ENQUIRY MODAL */
.modal-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-gold-deep);
}

/* RELATED PRODUCTS */
/* Template class names for the 4-up related cards: .cat-hit is the card link
   and .cat-text the info strip (same roles as .cat-card-link / .cat-info). */
.cat-hit {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.cat-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
    background: var(--surface-card);
    transition: background var(--transition-base);
}

.cat-card:hover .cat-text {
    background: var(--accent-tint-040);
}

/* Template button names for the 4-up related cards (same look as the shared
   .cat-btn--view / .cat-btn--enq pair in base.css). */
.cat-btn-ghost {
    border: 1.5px solid var(--border-color);
    background: var(--surface-card);
    color: var(--text-body);
}

.cat-btn-solid {
    border: 1.5px solid var(--color-primary);
    background: var(--color-primary);
    color: var(--text-on-dark);
}

.cat-btn-ghost:hover,
.cat-btn-ghost:focus-visible {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-on-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.cat-btn-solid:hover,
.cat-btn-solid:focus-visible {
    background: var(--surface-card);
    border-color: var(--border-color);
    color: var(--text-body);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.current-cat-card {
    border: 2px solid var(--color-gold) !important;
}

.current-cat-badge {
    background: var(--gradient-gold);
    color: var(--color-primary-deep);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
}