/* ==========================================================================
   product.css - product detail page
   ========================================================================== */

.product-top {
    padding: 26px 0 36px;
}

/* --- Gallery ------------------------------------------------------------- */

.gallery-main {
    position: relative;
    border: 1px solid #e3e8e5;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
}

.gallery-thumbs {
    display: flex;
    gap: 9px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 72px;
    height: 72px;
    border: 1px solid #e3e8e5;
    border-radius: 6px;
    background: #ffffff;
    padding: 4px;
    overflow: hidden;
    transition: border-color .15s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumb:hover {
    border-color: #0f7a3c;
}

.gallery-thumb.active {
    border-color: #0f7a3c;
    box-shadow: 0 0 0 2px rgba(15, 122, 60, .15);
}

/* --- Info ---------------------------------------------------------------- */

.product-name {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.product-price .price-now {
    font-size: 32px;
    color: #d92d20;
}

.product-price .price-was {
    font-size: 17px;
}

.product-price .price-off {
    padding: 4px 10px;
    font-size: 13px;
}

.product-tax {
    font-size: 12px;
    color: #6b7b72;
    margin-bottom: 14px;
}

.product-stock {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
}

.stock-in    { color: #0b5e2e; }
.stock-low   { color: #8a6100; }
.stock-out   { color: #b42318; }

.product-short {
    color: #33503f;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* --- Buy row ------------------------------------------------------------- */

.product-buy {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
    margin-bottom: 22px;
}

.qty-wrap {
    display: flex;
    border: 1px solid #e3e8e5;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
}

.qty-wrap button {
    width: 38px;
    border: none;
    background: #f6f8f7;
    color: #1c2620;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.qty-wrap button:hover {
    background: #0f7a3c;
    color: #ffffff;
}

.qty-wrap input {
    width: 52px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-wrap input::-webkit-outer-spin-button,
.qty-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-wrap input:focus {
    outline: none;
}

.product-add,
.product-buynow {
    flex: 1 1 160px;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 18px;
    border-radius: 6px;
    border: 1px solid transparent;
    color: #ffffff;
    transition: background .15s ease, border-color .15s ease;
}

.product-add {
    background: #0f7a3c;
    border-color: #0f7a3c;
}

.product-add:hover,
.product-add:focus {
    background: #0a5c2d;
    border-color: #0a5c2d;
}

.product-add:disabled {
    background: #8dc4a5;
    border-color: #8dc4a5;
    cursor: not-allowed;
}

.product-buynow {
    background: #d92d20;
    border-color: #d92d20;
}

.product-buynow:hover,
.product-buynow:focus {
    background: #b42318;
    border-color: #b42318;
}

/* --- Description text (HTML from the admin) ------------------------------ */

.product-desc-body {
    color: #33503f;
    line-height: 1.8;
    max-width: 860px;
}

.product-desc-body h2,
.product-desc-body h3,
.product-desc-body h4 {
    font-size: 17px;
    margin: 22px 0 10px;
    color: #1c2620;
}

.product-desc-body p {
    margin-bottom: 14px;
}

.product-desc-body ul,
.product-desc-body ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.product-desc-body li {
    margin-bottom: 7px;
}

.product-desc-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
    font-size: 14px;
}

.product-desc-body th,
.product-desc-body td {
    border: 1px solid #e3e8e5;
    padding: 9px 12px;
    text-align: left;
}

.product-desc-body th {
    background: #f6f8f7;
    font-weight: 600;
}

.product-desc-body a {
    color: #0f7a3c;
    text-decoration: underline;
}

/* --- Gallery zoom -------------------------------------------------------- */

.gallery-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid #e3e8e5;
    border-radius: 50%;
    background: #ffffff;
    color: #1c2620;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
}

.gallery-zoom:hover {
    background: #0f7a3c;
    border-color: #0f7a3c;
    color: #ffffff;
}

.gallery-zoom.is-open {
    background: #0f7a3c;
    border-color: #0f7a3c;
    color: #ffffff;
}

/* Full screen image */
.zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(12, 20, 15, .88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.zoom-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
}

.zoom-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #1c2620;
    font-size: 22px;
    line-height: 1;
}

/* --- Tagline + rating below the name ------------------------------------- */

.product-tagline {
    color: #6b7b72;
    font-size: 15px;
    margin-bottom: 10px;
}

.product-rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6b7b72;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e3e8e5;
}

.product-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #f5a623;
}

.product-rating b {
    color: #1c2620;
    margin-left: 5px;
}

.product-rating span {
    color: #6b7b72;
    margin-left: 3px;
}

.product-review-link {
    color: #0f7a3c;
    text-decoration: underline;
    padding-left: 12px;
    border-left: 1px solid #e3e8e5;
}

.product-sku {
    margin-left: auto;
}

.product-sku b {
    color: #1c2620;
}

/* --- Trust row (delivery / return / support / payment) ------------------- */

.product-trust {
    list-style: none;
    margin: 20px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid #e3e8e5;
    display: flex;
    flex-wrap: wrap;
}

.product-trust li {
    flex: 1 1 25%;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    font-size: 12px;
    color: #6b7b72;
    padding: 0 8px;
    border-right: 1px solid #e3e8e5;
}

.product-trust li:last-child {
    border-right: none;
}

.product-trust svg {
    color: #0f7a3c;
}

.product-trust span {
    display: flex;
    flex-direction: column;
    line-height: 1.45;
}

.product-trust b {
    color: #1c2620;
    font-weight: 600;
}

/* --- Green note ---------------------------------------------------------- */

.product-green {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 13px 15px;
    background: #e9f6ed;
    border: 1px solid #cfe8d9;
    border-radius: 8px;
}

.product-green svg {
    color: #0f7a3c;
    flex-shrink: 0;
}

.product-green b {
    display: block;
    color: #0b5e2e;
    font-size: 15px;
}

.product-green span {
    font-size: 13px;
    color: #33503f;
}

/* --- Feature strip ------------------------------------------------------- */

.product-features {
    list-style: none;
    margin: 0 0 28px;
    padding: 18px 0;
    border-top: 1px solid #e3e8e5;
    border-bottom: 1px solid #e3e8e5;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.product-features li {
    flex: 1 1 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1c2620;
    text-align: left;
}

.product-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e9f6ed;
    color: #0f7a3c;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Tabs ---------------------------------------------------------------- */

.product-tabs {
    margin-bottom: 36px;
}

.product-tabnav {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    border-bottom: 1px solid #e3e8e5;
}

.product-tabnav .nav-link {
    border: none;
    background: none;
    padding: 11px 16px;
    margin-bottom: -1px;
    font-size: 15px;
    font-weight: 600;
    color: #6b7b72;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}

.product-tabnav .nav-link:hover {
    color: #0f7a3c;
}

.product-tabnav .nav-link.active {
    color: #0b5e2e;
    border-bottom-color: #0f7a3c;
}

.tab-empty {
    color: #6b7b72;
    margin-bottom: 16px;
}

/* --- Highlights (the list with green ticks) ------------------------------ */

.product-highlights {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.product-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: #33503f;
}

.product-highlights svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 3px;
    border-radius: 50%;
    background: #0f7a3c;
    color: #ffffff;
    margin-top: 2px;
}

/* --- Key specifications -------------------------------------------------- */

.spec-card {
    border: 1px solid #e3e8e5;
    border-radius: 8px;
    overflow: hidden;
}

.spec-card h3 {
    font-size: 16px;
    margin: 0;
    padding: 13px 16px;
    background: #f6f8f7;
    border-bottom: 1px solid #e3e8e5;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.spec-table th,
.spec-table td {
    padding: 10px 16px;
    text-align: left;
    vertical-align: top;
}

.spec-table th {
    width: 42%;
    font-weight: 500;
    color: #6b7b72;
}

.spec-table td {
    color: #1c2620;
    font-weight: 600;
}

.spec-table tr:nth-child(odd) {
    background: #f6f8f7;
}

.spec-table-full {
    border: 1px solid #e3e8e5;
    border-radius: 8px;
    overflow: hidden;
    max-width: 760px;
}

/* --- Reviews tab --------------------------------------------------------- */

.review-summary {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e3e8e5;
}

.review-score {
    text-align: center;
    padding: 16px 24px;
    background: #f6f8f7;
    border: 1px solid #e3e8e5;
    border-radius: 10px;
    min-width: 170px;
}

.review-score b {
    display: block;
    font-size: 34px;
    line-height: 1.1;
    color: #1c2620;
}

.review-stars {
    display: inline-flex;
    gap: 2px;
    color: #f5a623;
    margin: 4px 0 6px;
}

.review-score small {
    display: block;
    font-size: 12px;
    color: #6b7b72;
}

/* The bars from 5 stars down to 1 star */
.review-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 240px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-bars li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6b7b72;
}

.review-bar-star {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: 34px;
    color: #f5a623;
    flex-shrink: 0;
}

.review-bar {
    flex: 1;
    height: 7px;
    border-radius: 4px;
    background: #eef2ef;
    overflow: hidden;
}

.review-bar > span {
    display: block;
    height: 100%;
    background: #f5a623;
}

.review-bar-n {
    width: 26px;
    text-align: right;
    flex-shrink: 0;
}

/* --- Review list --------------------------------------------------------- */

.review-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.review-item {
    padding: 18px 0;
    border-bottom: 1px solid #eef2ef;
}

.review-item:first-child {
    padding-top: 0;
}

.review-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 9px;
}

.review-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e9f6ed;
    color: #0b5e2e;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.review-who {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7b72;
}

.review-stars-sm {
    display: inline-flex;
    gap: 1px;
    color: #f5a623;
}

.review-verified {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #0b5e2e;
    background: #e9f6ed;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.review-title {
    font-size: 15px;
    margin-bottom: 5px;
}

.review-body {
    color: #33503f;
    line-height: 1.7;
    margin: 0;
}

/* The store's reply */
.review-reply {
    margin-top: 11px;
    padding: 11px 14px;
    background: #f6f8f7;
    border-left: 3px solid #0f7a3c;
    border-radius: 0 8px 8px 0;
}

.review-reply strong {
    display: block;
    font-size: 13px;
    color: #0b5e2e;
    margin-bottom: 3px;
}

.review-reply p {
    margin: 0;
    font-size: 14px;
    color: #33503f;
}

/* --- The write-a-review form --------------------------------------------- */

.review-form {
    padding: 20px;
    background: #f6f8f7;
    border: 1px solid #e3e8e5;
    border-radius: 10px;
    max-width: 620px;
}

.review-form h3 {
    font-size: 17px;
    margin-bottom: 14px;
}

.review-login-note {
    margin: 0;
    color: #6b7b72;
}

.review-login-note a {
    font-weight: 600;
    text-decoration: underline;
}

/* The star picker - in the HTML they run from 5 down to 1, so the ~ selector
   fills every star to the left. */
.star-pick {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 3px;
}

.star-pick input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.star-pick label {
    color: #d7ded9;
    cursor: pointer;
    line-height: 0;
    transition: color .12s ease;
}

.star-pick label:hover,
.star-pick label:hover ~ label,
.star-pick input:checked ~ label {
    color: #f5a623;
}

.star-pick input:focus-visible + label {
    outline: 2px solid #0f7a3c;
    outline-offset: 2px;
    border-radius: 3px;
}

/* --- FAQ tab ------------------------------------------------------------- */

.faq-list {
    max-width: 780px;
}

.faq-item {
    border: 1px solid #e3e8e5;
    border-radius: 9px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #ffffff;
}

.faq-q {
    margin: 0;
    font-size: 15px;
}

.faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #1c2620;
    transition: background .15s ease, color .15s ease;
}

.faq-btn:hover {
    background: #f6f8f7;
    color: #0b5e2e;
}

.faq-btn[aria-expanded="true"] {
    background: #e9f6ed;
    color: #0b5e2e;
}

.faq-chev {
    color: #0f7a3c;
    flex-shrink: 0;
    line-height: 0;
    transform: rotate(90deg);
    transition: transform .15s ease;
}

.faq-btn.collapsed .faq-chev {
    transform: rotate(0deg);
}

.faq-a {
    padding: 4px 16px 16px;
    color: #33503f;
    line-height: 1.75;
}

.faq-more {
    margin-top: 16px;
    font-size: 14px;
    color: #6b7b72;
}

.faq-more a {
    font-weight: 600;
    text-decoration: underline;
}

/* --- Shipping tab -------------------------------------------------------- */

.ship-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 860px;
}

.ship-list li {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e3e8e5;
    border-radius: 8px;
}

.ship-list svg {
    color: #0f7a3c;
    flex-shrink: 0;
    margin-top: 2px;
}

.ship-list b {
    display: block;
    color: #1c2620;
    margin-bottom: 3px;
}

.ship-list span {
    font-size: 14px;
    color: #6b7b72;
    line-height: 1.6;
}

.ship-links {
    font-size: 14px;
    color: #6b7b72;
}

.ship-links a {
    color: #0f7a3c;
    text-decoration: underline;
}

.ship-links span {
    padding: 0 6px;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 991.98px) {
    .product-features li {
        flex: 1 1 calc(33.333% - 14px);
    }
}

@media (max-width: 575.98px) {
    .product-name {
        font-size: 21px;
    }

    .product-price .price-now {
        font-size: 25px;
    }

    .product-buy {
        gap: 8px;
    }

    .product-add,
    .product-buynow {
        flex-basis: 100%;
    }

    .qty-wrap {
        width: 100%;
    }

    .qty-wrap input {
        flex: 1;
        width: auto;
    }

    .product-sku {
        margin-left: 0;
        width: 100%;
    }

    .product-trust li {
        flex: 0 0 50%;
        min-width: 0;
        padding: 10px 6px;
    }

    .product-trust li:nth-child(2) {
        border-right: none;
    }

    .product-features li {
        flex: 0 0 100%;
        justify-content: flex-start;
    }

    .ship-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-tabnav .nav-link {
        padding: 10px 12px;
        font-size: 14px;
    }
}
