/* ========================================================================
   TBH INDIA — PRODUCT DETAIL THEME V3
   Scope: customer product detail page only.
   Backend / payment / cart processing is not defined here.
======================================================================== */

.tbh-product-page {
    background: var(--tbh-paper, #fffdf8);
}

.product-page-shell {
    padding: 18px 0 80px;
}

.product-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 22px;
    color: #8a8377;
    font-size: 13px;
    line-height: 1.4;
}

.product-breadcrumb a {
    color: #6f675c;
    text-decoration: none;
    font-weight: 700;
}

.product-breadcrumb a:hover {
    color: #9a7612;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 30px;
    align-items: start;
}

.product-detail-image {
    min-width: 0;
}

.product-detail-image-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 590px;
    padding: 28px;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #e7dfcf;
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 18%, rgba(212,175,55,.10), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
    box-shadow: 0 22px 60px rgba(17,17,17,.08);
}

.product-detail-image-box img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 530px;
    object-fit: contain;
    object-position: center;
    transition: transform .25s ease, opacity .18s ease;
}

.product-detail-image-box:hover img {
    transform: scale(1.02);
}

.product-discount-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #111;
    color: #ead48a;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
}

.product-image-thumbnails {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 11px;
    margin-top: 14px;
}

.product-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 6px;
    border: 1px solid #e7dfcf;
    border-radius: 15px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(17,17,17,.04);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.product-thumbnail:hover {
    transform: translateY(-2px);
    border-color: rgba(212,175,55,.68);
    box-shadow: 0 12px 28px rgba(17,17,17,.07);
}

.product-thumbnail.active {
    border-color: #c7a02b;
    box-shadow: 0 0 0 2px rgba(199,160,43,.16), 0 12px 28px rgba(17,17,17,.07);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
}

.product-gallery-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    color: #969085;
    font-size: 12px;
}

.product-detail-info {
    min-width: 0;
    padding: 34px;
    border: 1px solid #e7dfcf;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
    box-shadow: 0 22px 60px rgba(17,17,17,.08);
}

.product-detail-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin-bottom: 13px;
    padding: 8px 12px;
    border: 1px solid rgba(212,175,55,.34);
    border-radius: 999px;
    background: #fbf6e6;
    color: #8f6c08;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.brand-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 0 4px rgba(212,175,55,.12);
}

.product-detail-info h1 {
    margin: 0;
    color: #141414;
    font-size: clamp(32px, 3vw, 48px);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.product-category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: #9a7612;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.product-category-link:hover {
    text-decoration: underline;
}

.product-detail-description {
    margin: 18px 0 0;
    color: #625f57;
    font-size: 15px;
    line-height: 1.75;
}

.product-detail-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 14px;
}

.product-detail-price strong {
    color: #111;
    font-size: clamp(31px, 3vw, 40px);
    line-height: 1;
    letter-spacing: -.03em;
}

.product-detail-price del {
    color: #999188;
    font-size: 16px;
}

.product-price-saving {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f4f0e6;
    color: #8c6d17;
    font-size: 11px;
    font-weight: 900;
}

.product-availability {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
}

.product-availability strong {
    font-size: 12px;
}

.product-availability span:last-child {
    color: #7d776d;
}

.product-availability.is-available {
    background: #eef8f1;
    border-color: #dcefe2;
    color: #23683d;
}

.product-availability.is-low {
    background: #fff7df;
    border-color: #f1e2aa;
    color: #846500;
}

.product-availability.is-unavailable {
    background: #fff0f0;
    border-color: #f0dada;
    color: #8a2929;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.product-seller-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    border-top: 1px solid #ece5d8;
    border-bottom: 1px solid #ece5d8;
}

.product-seller-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: #f6efdc;
    color: #9a7612;
    font-weight: 900;
}

.product-seller-card span,
.product-seller-card strong {
    display: block;
}

.product-seller-card span {
    margin-bottom: 2px;
    color: #817a70;
    font-size: 12px;
}

.product-seller-card strong {
    color: #181818;
    font-size: 16px;
}

.product-seller-card small {
    color: #817a70;
    font-size: 11px;
    text-align: right;
}

.product-buy-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.quantity-control {
    display: grid;
    grid-template-columns: 40px 58px 40px;
    align-items: center;
    min-height: 56px;
    overflow: hidden;
    border: 1px solid #d9cfbd;
    border-radius: 15px;
    background: #fff;
}

.quantity-btn {
    height: 100%;
    border: 0;
    background: transparent;
    color: #333;
    font-size: 22px;
    cursor: pointer;
}

.quantity-btn:hover {
    background: #faf7ef;
}

.quantity-control input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
}

.product-add-cart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 56px;
    padding: 0 18px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #e1c145 0%, #c9a12b 100%);
    color: #111;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 15px 34px rgba(166,124,0,.18);
    transition: transform .18s ease, box-shadow .18s ease;
}

.product-add-cart:hover {
    transform: translateY(-1px);
    box-shadow: 0 19px 40px rgba(166,124,0,.22);
}

.product-disabled {
    width: 100%;
    min-height: 56px;
    border: 1px solid #e1d9cb;
    border-radius: 15px;
    background: #f1eee8;
    color: #8c867d;
    font: inherit;
    font-weight: 800;
    cursor: not-allowed;
}

.product-confidence-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.product-confidence-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 10px 12px;
    border: 1px solid #ebe4d8;
    border-radius: 15px;
    background: #fcfaf4;
}

.product-confidence-item > span {
    flex: 0 0 auto;
    font-size: 18px;
}

.product-confidence-item strong,
.product-confidence-item small {
    display: block;
}

.product-confidence-item strong {
    color: #292621;
    font-size: 12px;
}

.product-confidence-item small {
    margin-top: 2px;
    color: #8b8479;
    font-size: 10px;
}

.product-back {
    display: inline-flex;
    align-items: center;
    margin-top: 18px;
    color: #8f711d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.product-back:hover {
    text-decoration: underline;
}

.product-detail-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.product-detail-section {
    min-width: 0;
    padding: 28px;
    border: 1px solid #e7dfcf;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(17,17,17,.05);
}

.product-detail-section.full-width {
    grid-column: 1 / -1;
}

.section-label {
    display: inline-block;
    margin-bottom: 7px;
    color: #9a7612;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.product-detail-section h2,
.related-products-heading h2 {
    margin: 0 0 18px;
    color: #171717;
    font-size: 25px;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.product-spec-table-wrap {
    overflow-x: auto;
}

.product-spec-table {
    width: 100%;
    border-collapse: collapse;
}

.product-spec-table tr {
    border-bottom: 1px solid #eee7da;
}

.product-spec-table tr:last-child {
    border-bottom: 0;
}

.product-spec-table th,
.product-spec-table td {
    padding: 13px 10px;
    text-align: left;
    vertical-align: top;
}

.product-spec-table th {
    width: 38%;
    color: #7a746a;
    font-size: 13px;
    font-weight: 600;
}

.product-spec-table td {
    color: #181818;
    font-size: 14px;
    font-weight: 800;
}

.product-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.product-info-item {
    min-width: 0;
    padding: 15px;
    border: 1px solid #ebe3d5;
    border-radius: 14px;
    background: #fcfaf4;
}

.product-info-item span,
.product-info-item strong {
    display: block;
}

.product-info-item span {
    margin-bottom: 5px;
    color: #8a8378;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.product-info-item strong {
    color: #22201d;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.product-about-copy p {
    margin: 0;
    color: #5f5a51;
    font-size: 15px;
    line-height: 1.8;
}

.related-products-section {
    padding-top: 48px;
}

.related-products-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.related-products-heading h2 {
    margin-bottom: 0;
}

.related-products-heading > a {
    color: #8f711d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.related-products-heading > a:hover {
    text-decoration: underline;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.related-product-card {
    overflow: hidden;
    border: 1px solid #e7dfcf;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(17,17,17,.05);
}

.related-product-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 14px;
    background: #fbf8f0;
    overflow: hidden;
}

.related-product-image > span {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 999px;
    background: #111;
    color: #ead48a;
    font-size: 10px;
    font-weight: 900;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .2s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.025);
}

.related-product-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #111;
    color: #d4af37;
    font-weight: 900;
    letter-spacing: .12em;
}

.related-product-body {
    padding: 14px;
}

.related-product-brand {
    display: block;
    margin-bottom: 5px;
    color: #9a7612;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.related-product-body h3 {
    margin: 0;
    min-height: 40px;
    font-size: 14px;
    line-height: 1.35;
}

.related-product-body h3 a {
    color: #1a1918;
    text-decoration: none;
}

.related-product-body h3 a:hover {
    text-decoration: underline;
}

.related-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.related-product-price strong {
    color: #111;
    font-size: 16px;
}

.related-product-price del {
    color: #999188;
    font-size: 12px;
}

.related-product-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    margin-top: 12px;
    padding: 0 12px;
    border-radius: 11px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

.related-product-cta:hover {
    background: #242424;
}

.product-error-page {
    min-height: 55vh;
    display: grid;
    place-items: center;
    padding: 50px 16px;
}

.product-error-card {
    width: min(520px, 100%);
    padding: 36px;
    border: 1px solid #e7dfcf;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(17,17,17,.08);
    text-align: center;
}

.product-error-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: #f8f0d9;
    color: #9a7612;
    font-size: 24px;
    font-weight: 900;
}

.product-error-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.product-error-card p {
    margin: 0 0 20px;
    color: #716b61;
    line-height: 1.6;
}

.product-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
}

@media (max-width: 1100px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-detail-image-box {
        min-height: 520px;
    }

    .product-detail-info {
        padding: 30px;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .product-page-shell {
        padding-bottom: 60px;
    }

    .product-detail-image-box {
        min-height: 430px;
        padding: 20px;
        border-radius: 22px;
    }

    .product-detail-info {
        padding: 22px;
        border-radius: 22px;
    }

    .product-detail-info h1 {
        font-size: 31px;
    }

    .product-confidence-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-sections {
        grid-template-columns: 1fr;
    }

    .product-detail-section.full-width {
        grid-column: auto;
    }

    .product-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .product-page-shell {
        padding-top: 12px;
    }

    .product-breadcrumb {
        margin-bottom: 16px;
        font-size: 11px;
    }

    .product-detail-image-box {
        min-height: 330px;
        padding: 12px;
        border-radius: 18px;
    }

    .product-discount-badge {
        top: 12px;
        left: 12px;
    }

    .product-image-thumbnails {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
    }

    .product-thumbnail {
        flex: 0 0 60px;
        width: 60px;
        aspect-ratio: 1 / 1;
    }

    .product-detail-info {
        padding: 18px;
        border-radius: 18px;
    }

    .product-detail-info h1 {
        font-size: 28px;
    }

    .product-detail-description {
        font-size: 14px;
    }

    .product-detail-price strong {
        font-size: 29px;
    }

    .product-seller-card {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .product-seller-card small {
        grid-column: 2;
        text-align: left;
    }

    .product-buy-row {
        grid-template-columns: 1fr;
    }

    .quantity-control {
        width: 100%;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .product-add-cart {
        width: 100%;
    }

    .product-detail-section {
        padding: 20px;
        border-radius: 18px;
    }

    .related-products-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .related-product-body {
        padding: 11px;
    }

    .related-product-body h3 {
        font-size: 13px;
    }

    .related-product-cta {
        min-height: 40px;
        font-size: 11px;
        padding-inline: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-detail-image-box img,
    .product-thumbnail,
    .product-add-cart,
    .related-product-image img {
        transition: none;
    }
}

/* ========================================================================
   NO-LOSS V4 COMPATIBILITY LAYER
   Applies the premium theme to the existing production product.php markup.
   The original PHP / cart / specification markup remains intact.
======================================================================== */

.product-seller {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 20px 0;
    padding: 18px 0 20px;
    border-top: 1px solid #ece5d8;
    border-bottom: 1px solid #ece5d8;
}

.product-seller span {
    color: #817a70;
    font-size: 12px;
    font-weight: 700;
}

.product-seller strong {
    color: #181818;
    font-size: 17px;
    line-height: 1.35;
}

.quantity-row {
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.quantity-row label {
    color: #45413a;
    font-weight: 800;
}

.quantity-control {
    flex: 0 0 auto;
}

.quantity-btn {
    display: grid;
    place-items: center;
    padding: 0;
    font: inherit;
    font-weight: 900;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.quantity-control input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.product-add-cart {
    width: 100%;
}

@media (max-width: 520px) {
    .quantity-row {
        align-items: stretch;
        flex-direction: column;
    }

    .quantity-control {
        width: 100%;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }
}
