/* Paste this patch after your existing theme.css content. */

/* Public Product Detail UI Polish */
.public-product-page {
    background: #f4f5f1;
    padding: 2.25rem 0 3.5rem;
}

.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    font-size: .86rem;
    color: #647242;
    margin-bottom: 1.1rem;
}

.product-breadcrumb a {
    color: #4f592a;
    font-weight: 700;
    text-decoration: none;
}

.product-breadcrumb a:hover {
    text-decoration: underline;
}

.product-detail-hero {
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
}

.product-gallery-card,
.product-info-card,
.product-variants-panel,
.product-inquiry-strip {
    background: #ffffff;
    border: 1px solid rgba(79, 89, 42, .14);
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(31, 41, 20, .08);
}

.product-gallery-card {
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

.product-main-image-wrap {
    min-height: 470px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7f8f3, #eef1e4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-main-image-wrap img {
    width: 100%;
    height: 100%;
    max-height: 510px;
    object-fit: contain;
    display: block;
}

.product-image-placeholder {
    color: #9aa282;
    display: grid;
    gap: .5rem;
    place-items: center;
    text-align: center;
}

.product-image-placeholder i {
    font-size: 3rem;
}

.product-thumb-strip {
    display: flex;
    gap: .65rem;
    overflow-x: auto;
    padding-top: .9rem;
}

.product-thumb {
    width: 82px;
    height: 70px;
    flex: 0 0 auto;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #f8f9f4;
    overflow: hidden;
    padding: .15rem;
    cursor: pointer;
    transition: all .18s ease;
}

.product-thumb:hover,
.product-thumb.active {
    border-color: #6f7d3a;
    box-shadow: 0 8px 18px rgba(79, 89, 42, .16);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-info-card {
    padding: 1.25rem 1.35rem;
}

.product-category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #7a8138;
    color: #ffffff;
    border-radius: 999px;
    padding: .35rem .8rem;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    margin-bottom: .9rem;
}

.product-info-card h1 {
    font-size: clamp(1.7rem, 2vw, 2.45rem);
    line-height: 1.08;
    color: #16220f;
    font-weight: 900;
    margin: 0 0 .65rem;
}

.product-code-row {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    font-size: .98rem;
    color: #4b5563;
    margin-bottom: .55rem;
}

.product-code-row strong {
    color: #243016;
}

.product-mini-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin: .75rem 0 1rem;
}

.product-mini-meta span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 1px solid rgba(79, 89, 42, .15);
    background: #fafbf5;
    border-radius: 999px;
    padding: .45rem .7rem;
    color: #47512b;
    font-size: .86rem;
}

.public-price-note {
    display: flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid #d8dec5;
    background: #f3f5ec;
    color: #4f592a;
    border-radius: 999px;
    padding: .7rem .9rem;
    font-weight: 800;
    margin: 1rem 0;
}

.product-description-box {
    color: #374151;
    line-height: 1.65;
    border-left: 4px solid #7a8138;
    background: #fbfcf7;
    border-radius: 14px;
    padding: .95rem 1rem;
    margin-bottom: 1rem;
}

.product-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.product-spec-grid div {
    background: #fbfcf7;
    border: 1px solid rgba(79, 89, 42, .14);
    border-radius: 16px;
    padding: .85rem .95rem;
}

.product-spec-grid span {
    display: block;
    color: #65704a;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    margin-bottom: .2rem;
}

.product-spec-grid strong {
    color: #16220f;
    font-size: .95rem;
}

.product-cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 1.1rem;
}

.btn-product-inquiry,
.btn-product-outline {
    border-radius: 14px;
    font-weight: 800;
    padding: .82rem 1rem;
}

.btn-product-inquiry {
    background: #4f592a;
    color: #fff;
    border: 1px solid #4f592a;
}

.btn-product-inquiry:hover {
    background: #6f7d3a;
    border-color: #6f7d3a;
    color: #fff;
}

.btn-product-outline {
    background: #fff;
    color: #4f592a;
    border: 1px solid #6f7d3a;
}

.btn-product-outline:hover {
    background: #f3f5ec;
    color: #4f592a;
}

.product-variants-panel {
    margin-top: 1.4rem;
    padding: 1.2rem;
    margin-left: calc(520px + 1.4rem);
}

.variant-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.variant-panel-head h2 {
    font-size: 1.25rem;
    font-weight: 900;
    color: #16220f;
    margin-bottom: .2rem;
}

.variant-panel-head p {
    margin: 0;
    color: #6b7280;
    font-size: .92rem;
}

.variant-count-badge {
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid #d8dec5;
    background: #f3f5ec;
    color: #4f592a;
    padding: .45rem .8rem;
    font-weight: 800;
    font-size: .85rem;
}

.variant-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.variant-option-card {
    border: 1px solid rgba(79, 89, 42, .15);
    border-radius: 18px;
    padding: .75rem;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: .85rem;
    align-items: center;
    background: #fff;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.variant-option-card:hover {
    transform: translateY(-2px);
    border-color: #7a8138;
    box-shadow: 0 12px 24px rgba(31, 41, 20, .10);
}

.variant-option-image {
    width: 96px;
    height: 86px;
    border-radius: 14px;
    background: #f7f8f3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #9aa282;
}

.variant-option-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.variant-option-copy h3 {
    margin: 0 0 .3rem;
    font-size: .98rem;
    color: #16220f;
    font-weight: 900;
}

.variant-option-copy p {
    margin: .1rem 0;
    color: #4b5563;
    font-size: .84rem;
}

.product-inquiry-strip {
    margin-top: 1.4rem;
    padding: 1.2rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.product-inquiry-strip h2 {
    margin: 0 0 .25rem;
    color: #16220f;
    font-weight: 900;
    font-size: 1.25rem;
}

.product-inquiry-strip p {
    margin: 0;
    color: #6b7280;
}

@media (max-width: 1199px) {
    .product-detail-hero {
        grid-template-columns: 1fr;
    }

    .product-gallery-card {
        position: static;
    }

    .product-variants-panel {
        margin-left: 0;
    }

    .product-main-image-wrap {
        min-height: 360px;
    }
}

@media (max-width: 767px) {
    .public-product-page {
        padding-top: 1.2rem;
    }

    .product-info-card,
    .product-gallery-card,
    .product-variants-panel,
    .product-inquiry-strip {
        border-radius: 18px;
    }

    .product-spec-grid,
    .variant-card-grid,
    .product-cta-row {
        grid-template-columns: 1fr;
    }

    .variant-panel-head,
    .product-inquiry-strip {
        display: block;
    }

    .variant-count-badge {
        display: inline-flex;
        margin-top: .75rem;
    }

    .product-inquiry-strip .btn {
        width: 100%;
        margin-top: 1rem;
    }
}
