/* product_detail.css — modern finishing touches */

/* === Variables & base === */
:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --muted: #6b7280;
    --text: #071129;
    --accent: #d64545;
    --accent-2: #0b5ed7;
    --glass: rgba(255, 255, 255, 0.6);
    --radius: 14px;
    --shadow-lg: 0 18px 50px rgba(2, 6, 23, 0.08);
    --shadow-sm: 0 6px 18px rgba(2, 6, 23, 0.06);
    --container: 1200px;
    --transition-fast: 180ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Reset tweaks */
html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}
a {
    color: var(--accent-2);
    text-decoration: none;
}
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Page container */
.container#product-page {
    max-width: var(--container);
    margin: 18px auto;
    padding: 18px;
    box-sizing: border-box;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
}

/* Header */
.product-head {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}
.product-head h1 {
    font-size: 22px;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.2px;
}

/* Layout grid */
.product-main {
    display: flex;
    gap: 22px;
    align-items: start;
    width: 100%;
    overflow-x: hidden;
}
/* Left column */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 60%;
}
@media (max-width: 980px) {
    /* Left column */
    .left-column {
        width: 100%;
    }
    .product-main {
        flex-direction: column-reverse;
    }
    .gallery {
        flex-direction: column;
    }
}

/* Gallery card */
.gallery {
    display: flex;
    gap: 14px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(2, 6, 23, 0.03);
    align-items: flex-start;
}

/* Thumbnails column */
.thumbs {
    width: 92px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.thumbs button {
    display: block;
    border: 0;
    padding: 6px;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: transform var(--transition-fast),
        box-shadow var(--transition-fast), background var(--transition-fast);
    outline: 0;
}
.thumbs button:focus {
    box-shadow: 0 6px 18px rgba(11, 94, 215, 0.12);
    transform: translateY(-3px);
}
.thumbs img {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Active thumbnail visual (animated) */
#thumbs button img.thumb-active {
    outline: none;
    border-radius: 8px;
    transform: scale(1.03);
    box-shadow: 0 12px 30px rgba(11, 94, 215, 0.14);
    transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.28s,
        filter 0.28s;
    animation: thumbPulse 1.8s ease-in-out infinite,
        thumbShine 1.2s ease-in-out 0s 1;
}
@keyframes thumbPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 6px 14px rgba(11, 94, 215, 0.06);
    }
    50% {
        transform: scale(1.045);
        box-shadow: 0 20px 46px rgba(11, 94, 215, 0.12);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 6px 14px rgba(11, 94, 215, 0.06);
    }
}
@keyframes thumbShine {
    0% {
        filter: brightness(1);
    }
    40% {
        filter: brightness(1.12) saturate(1.03);
    }
    100% {
        filter: brightness(1);
    }
}

/* Main image */
.main-image {
    position: relative;
    flex: 1;
    min-height: 360px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #eef6ff, #fff);
}
.main-image .imgwrap {
    padding: 18px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.main-image img {
    max-height: 460px;
    width: auto;
    transition: transform 0.45s var(--transition-fast), filter 0.45s;
    border-radius: 8px;
    will-change: transform;
}
.main-image:hover img {
    transform: scale(1.03);
}

/* Badge */
.badge {
    position: absolute;
    left: 14px;
    top: 14px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(11, 23, 36, 0.08);
}

/* Tabs block */
.tabs {
    background: var(--card);
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(2, 6, 23, 0.03);
}
.tab-list {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.tab-list button {
    background: transparent;
    border: 0;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.tab-list button.active {
    color: var(--text);
    background: linear-gradient(
        90deg,
        rgba(11, 94, 215, 0.06),
        rgba(214, 69, 69, 0.03)
    );
    box-shadow: inset 0 -2px 0 rgba(11, 94, 215, 0.06);
}
.tab-panel {
    line-height: 1.56;
}

/* Specs tables */
.specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 900px) {
    .specs {
        grid-template-columns: 1fr;
    }
}
.specs table {
    width: 100%;
    border-collapse: collapse;
}
.specs th {
    font-weight: 700;
    color: var(--muted);
    text-align: left;
    padding: 8px 6px;
    width: 40%;
}
.specs td {
    padding: 8px 6px;
    color: var(--text);
}

/* Related carousel */
.related h3 {
    margin: 8px 0;
    font-size: 16px;
}
.carousel {
    position: relative;
    border-radius: 12px;
    overflow: visible;
}
.carousel-track {
    display: flex;
    gap: 12px;
    overflow: auto;
    padding: 12px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}
.card-item {
    min-width: 220px;
    background: var(--card);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(2, 6, 23, 0.03);
    box-shadow: var(--shadow-sm);
    scroll-snap-align: center;
}
.card-item .img {
    height: 120px;
    border-radius: 8px;
    background: #f5f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(2, 6, 23, 0.06);
    backdrop-filter: blur(4px);
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s;
}
.carousel-arrow:hover {
    transform: translateY(-50%) scale(1.06);
}
.carousel-arrow.left {
    left: 0;
}
.carousel-arrow.right {
    right: 0;
}

/* Card hover pop */
.card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s;
}

/* Right purchase card */
.purchase-card {
    position: sticky;
    top: 0;
    background: transparent;
    padding: 0px;
    border-radius: 14px;
}
.purchase-card .card {
    background: var(--card);
    padding: 18px;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(2, 6, 23, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.purchase-card .price {
    font-size: 20px;
    color: var(--accent-2);
    font-weight: 800;
    margin-top: 4px;
}
.variant-select {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.variant-select button {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(2, 6, 23, 0.06);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.variant-select button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
}

/* brochure card */
.brochure-card {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-direction: row;
    position: relative;
}

.brochure-card__content {
    flex: 1;
}

.brochure-card__title {
    margin: 0 0 10px !important;
    font-size: 24px !important;
    font-weight: 400;
    color: #071129;
}

.brochure-card__desc {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    width: 80%;
}

.brochure-card__cta {
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: center;
    border-radius: 10px;
    font-weight: 700;
    color: var(--accent);
    background: transparent;
    border: 2px solid rgba(214, 69, 69, 0.12);
    cursor: pointer;
    text-decoration: none;
}

.brochure-card__cta:hover {
    background: rgba(214, 69, 69, 0.04);
    border-color: var(--accent);
    color: var(--accent);
}

.brochure-card__icon {
    width: 84px;
    min-width: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrap {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 74px;
    height: 74px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(11, 23, 36, 0.03);
}

.pdf-dot {
    width: 100%;
    height: 100%;
    display: inline-grid;
    place-items: center;
    background: #fff;
    box-shadow: 0 6px 16px rgba(11, 23, 36, 0.06);
}

.pdf-dot svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    display: block;
}

@media (max-width: 420px) {
    .brochure-card {
        gap: 10px;
    }

    .brochure-card__title {
        font-size: 18px !important;
    }

    .brochure-card__icon {
        width: 72px;
        min-width: 72px;
    }
}
/* CTAs */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(2, 6, 23, 0.06);
    color: var(--text);
}

/* EMI panel */
.calc {
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #fff, #fcfeff);
    border-radius: 10px;
    border: 1px solid rgba(2, 6, 23, 0.02);
}
.calc .row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.calc label {
    width: 110px;
    color: var(--muted);
    font-weight: 700;
}
.calc input,
.calc select {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(2, 6, 23, 0.06);
}

/* amort table */
.amort {
    margin-top: 12px;
    background: var(--card);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(2, 6, 23, 0.03);
    max-height: 320px;
    overflow: auto;
}
.amort table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.amort th {
    position: sticky;
    top: 0;
    background: var(--card);
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #f3f5f8;
    color: var(--muted);
}
.amort td {
    padding: 8px;
    border-bottom: 1px solid #f3f5f8;
    text-align: right;
}
.amort td.muted-left {
    text-align: left;
    color: var(--muted);
}

/* small responsive tweaks */
@media (max-width: 520px) {
    .thumbs {
        display: flex;
        flex-direction: row;
        width: auto;
        overflow: auto;
        padding-bottom: 6px;
    }
    .thumbs img {
        width: 64px;
        height: 48px;
    }
    .main-image img {
        max-height: 320px;
    }
    .carousel-arrow.left {
        left: 6px;
    }
    .carousel-arrow.right {
        right: 6px;
    }
    .purchase-card {
        position: relative;
        top: auto;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
