/* =====================================================================
   PRODUCT PAGE STYLES — Avi Ansh Textile Limited
   Loaded after custom.css. Scope: .avi-product-page
   ===================================================================== */

.avi-product-page {
    --pr-navy: var(--color-primary, rgba(11, 37, 69, 1));
    --pr-gold: rgba(242, 194, 48, 1);
    --pr-gold-soft: rgba(242, 194, 48, 0.12);
    --pr-line: rgba(11, 37, 69, 0.10);
    --pr-tint: rgba(11, 37, 69, 0.035);
    --pr-radius: 16px;
}

.avi-product-page .avi-heading-rule {
    width: 64px;
    height: 3px;
    background: var(--pr-gold);
    border-radius: 3px;
    margin: 16px 0 26px;
}

.avi-product-page .avi-centered-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.avi-product-page .avi-centered-heading .subheading { justify-content: center; }

.avi-product-page .avi-centered-heading p {
    margin-top: 16px;
    color: var(--color-foreground-subheading);
}


/* ---------------------------------------------------------------
   PRODUCT ROWS
---------------------------------------------------------------- */

.avi-product-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
    border-bottom: 1px solid var(--pr-line);
    margin-bottom: 30px;
    padding-bottom: 30px;
}

.avi-product-row:last-of-type { border-bottom: none; }

.avi-product-row[hidden] { display: none; }

/* alternate side */
.avi-product-row--reverse .avi-product-media { order: 2; }
.avi-product-row--reverse .avi-product-content { order: 1; }


/* ---------- media ---------- */
.avi-product-image {
    position: relative;
    border-radius: var(--pr-radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--pr-tint);
}
.avi-product-block{
    padding-top: 20px;
}

.avi-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.avi-product-row:hover .avi-product-image img { transform: scale(1.04); }

/* label written over the photo (like the Slub card) */
.avi-product-image-label {
    position: absolute;
    left: 34px;
    bottom: 30px;
    font-family: var(--font-heading--family);
    font-style: italic;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1;
    color: var(--pr-gold);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.avi-product-image-label::before {
    content: "";
    position: absolute;
    inset: -60px -40px -40px -50px;
    background: linear-gradient(to top, rgba(11, 37, 69, 0.55), transparent 70%);
    z-index: -1;
}

/* fabric swatches look better square and edge-to-edge */
.avi-product-image--swatch { aspect-ratio: 1 / 1; }


/* ---------- content ---------- */
.avi-product-page .avi-product-name {
    margin: 0;
    color: var(--pr-navy);
    line-height: 1.2;
}

.avi-product-page .avi-product-content .text {
    color: var(--color-foreground-subheading);
    line-height: 1.75;
    margin: 0;
}


/* meta pairs — Application / Count Range */
.avi-product-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 22px;
    padding: 22px 26px;
    background: var(--pr-tint);
    border-left: 3px solid var(--pr-gold);
    border-radius: 0 10px 10px 0;
    margin-bottom: 30px;
}

.avi-product-meta-label {
    display: block;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(11, 37, 69, 0.55);
    margin-bottom: 6px;
}

.avi-product-meta-value {
    display: block;
    font-family: var(--font-heading--family);
    font-size: 17px;
    color: var(--pr-navy);
    line-height: 1.4;
}


/* generic labelled block */
.avi-product-block + .avi-product-block { margin-top: 28px; }

.avi-product-block-title {
    font-family: var(--font-heading--family);
    font-size: 13px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--pr-navy);
    margin: 0 0 10px;
}

.avi-product-block-title--gold { color: var(--pr-gold); }


/* count-range spec list */
.avi-product-specs {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--pr-line);
}

.avi-product-specs li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--pr-line);
}

.avi-product-specs span {
    font-size: 14.5px;
    color: var(--color-foreground-subheading);
}

.avi-product-specs em {
    font-style: normal;
    font-family: var(--font-heading--family);
    font-size: 15px;
    color: var(--pr-navy);
    white-space: nowrap;
}


/* blend badges */
.avi-product-blends {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.avi-product-blend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    padding: 0 18px;
    border: 1px solid var(--pr-line);
    border-radius: 10px;
    background: #fff;
}

.avi-product-blend img {
    max-height: 32px;
    width: auto;
    display: block;
}

.avi-product-blend--text {
    font-family: var(--font-heading--family);
    font-size: 14px;
    color: var(--pr-navy);
}


/* ---------------------------------------------------------------
   CTA
---------------------------------------------------------------- */
.avi-product-cta {
    background: var(--pr-navy);
    padding: 55px 0;
}

.avi-product-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.avi-product-page .avi-product-cta h2 { color: #fff; margin-bottom: 8px; }

.avi-product-page .avi-product-cta p {
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    max-width: 56ch;
}

.avi-product-cta-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: var(--style-button-height, 56px);
    padding: 0 34px;
    border-radius: var(--style-border-radius-buttons-primary, 40px);
    background: var(--pr-gold);
    color: var(--pr-navy);
    font-family: var(--font-button--family);
    font-weight: 600;
    font-size: var(--font-button-size, 16px);
    transition: background .25s ease, color .25s ease;
    text-decoration: none;
}

.avi-product-cta-btn:hover { background: #fff; }


/* ---------------------------------------------------------------
   ACCESSIBILITY + RESPONSIVE
---------------------------------------------------------------- */
.avi-product-page a:focus-visible,
.avi-product-page button:focus-visible {
    outline: var(--focus-outline-width, 1px) solid var(--pr-gold);
    outline-offset: var(--focus-outline-offset, 3px);
}

@media (prefers-reduced-motion: reduce) {
    .avi-product-page * { transition: none !important; }
}

@media (max-width: 991px) {
    .avi-product-row {
        grid-template-columns: 1fr;
        gap: 34px;
    }
    /* image always first on mobile, regardless of row direction */
    .avi-product-row--reverse .avi-product-media { order: 0; }
    .avi-product-row--reverse .avi-product-content { order: 0; }

    .avi-product-image--swatch { aspect-ratio: 16 / 10; }
    .avi-product-image-label { left: 24px; bottom: 20px; }
}

@media (max-width: 575px) {
    .avi-product-meta { padding: 18px 20px; }
    .avi-product-specs li { flex-direction: column; gap: 4px; }
    .avi-product-cta-inner { flex-direction: column; align-items: flex-start; }
    .avi-product-cta-btn { width: 100%; justify-content: center; }
}
