/* Product page (product.php). Linked in <head> so the page lays out once
   instead of reflowing when the styles arrive after the content. */


/* Bundle bonus note */
.bundle-bonus { margin: 1rem 0; padding: 0.85rem 1rem; border: 2px dashed #d4a853; border-radius: 10px; background: #fff8e6; line-height: 1.5; }
.bundle-bonus strong { display: block; color: #1a3a2a; }
.bundle-bonus span { display: block; font-size: 0.92rem; color: #4a4a4a; margin-top: 0.2rem; }

/* Reviews */
.product-reviews-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-cream-dark);
}
.product-reviews-section h2 {
    margin-bottom: 1.5rem;
}
.reviews-summary {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-cream);
    border-radius: var(--radius-md);
}
.reviews-average {
    text-align: center;
    min-width: 120px;
}
.average-rating {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-forest);
    display: block;
}
.average-stars .star {
    color: #ddd;
    font-size: 1.25rem;
}
.average-stars .star.filled {
    color: #f5a623;
}
.review-count {
    font-size: 0.875rem;
    color: var(--color-gray);
}
.reviews-breakdown {
    flex: 1;
    max-width: 300px;
}
.breakdown-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.breakdown-label {
    width: 50px;
    font-size: 0.875rem;
    color: var(--color-gray);
}
.breakdown-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}
.breakdown-fill {
    height: 100%;
    background: #f5a623;
}
.breakdown-count {
    width: 20px;
    font-size: 0.875rem;
    color: var(--color-gray);
    text-align: right;
}
.write-review-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--color-cream-dark);
    border-radius: var(--radius-md);
}
.write-review-section h3 {
    margin-bottom: 1rem;
}
.review-form .form-group {
    margin-bottom: 1rem;
}
.review-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.review-form input[type="text"],
.review-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-cream-dark);
    border-radius: var(--radius-sm);
}
.star-rating-input {
    position: relative;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.star-rating-input input {
    /* Hidden visually but still reachable with the keyboard */
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.star-rating-input input:focus-visible + label {
    outline: 2px solid var(--color-forest);
    outline-offset: 2px;
    border-radius: 4px;
}
.star-rating-input label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    margin-bottom: 0;
}
.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #f5a623;
}
.photo-previews {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.photo-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.review-notice {
    padding: 1rem;
    background: var(--color-cream);
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
}
.review-notice a {
    color: var(--color-forest);
    font-weight: 500;
}
.notice-pending {
    color: #e67e22;
    font-style: italic;
}
.no-reviews {
    padding: 2rem;
    text-align: center;
    color: var(--color-gray);
}
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.review-card {
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--color-cream-dark);
    border-radius: var(--radius-md);
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.author-name {
    font-weight: 600;
    display: block;
}
.review-date {
    font-size: 0.875rem;
    color: var(--color-gray);
}
.review-rating .star {
    color: #ddd;
}
.review-rating .star.filled {
    color: #f5a623;
}
.review-card .review-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}
.review-content {
    line-height: 1.6;
}
.review-photos {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.review-photo img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.review-photo img:hover {
    opacity: 0.9;
}
@media (max-width: 600px) {
    .reviews-summary {
        flex-direction: column;
        gap: 1.5rem;
    }
    .reviews-breakdown {
        max-width: 100%;
    }
}

/* Page */
.draft-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.draft-notice a {
    color: #856404;
    font-weight: 600;
}

.variation-status {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.page-product {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.product-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    width: 100%;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xl);
    color: var(--color-gray);
}

.breadcrumb a {
    color: var(--color-gray);
}

.breadcrumb a:hover {
    color: var(--color-forest);
}

.breadcrumb .current {
    color: var(--color-charcoal);
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-gallery {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.main-image {
    position: relative;
    background: var(--color-cream);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-light);
}

.sale-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-terracotta, #a3361f);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.thumbnail-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: none;
    padding: 0;
}

.thumbnail.active {
    border-color: var(--color-forest);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    padding-top: 1rem;
}

.product-category-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--color-forest);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-charcoal);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-price-block {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-forest);
}

.current-price.price-range {
    font-size: 1.75rem;
}

.club-topup-note {
    background: #fff7e8;
    border: 1px solid #e8c9a0;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}
.club-topup-note span {
    display: block;
    margin-top: 0.35rem;
}
.club-topup-note a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.original-price {
    font-size: 1.25rem;
    color: #6b6b6b;
    text-decoration: line-through;
}

.discount-badge {
    background: var(--color-terracotta);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.valued-at-block {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-right: 0.5rem;
    padding-right: 1rem;
    border-right: 2px solid var(--color-cream-dark);
}

.valued-at-label {
    font-size: 0.85rem;
    color: var(--color-gray);
    font-weight: 500;
}

.valued-at-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray);
    text-decoration: line-through;
    font-family: var(--font-display);
}

.valued-at-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.15rem;
}

.valued-at-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    font: inherit;
}

.valued-at-btn:focus-visible {
    outline: 2px solid var(--color-forest);
    outline-offset: 1px;
}

.valued-at-icon {
    color: var(--color-gray);
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}

.valued-at-info:hover .valued-at-icon,
.valued-at-btn:focus-visible .valued-at-icon,
.valued-at-btn[aria-expanded="true"] .valued-at-icon {
    opacity: 1;
    color: var(--color-forest);
}

/* Opens leftwards from the icon (it ends a line in the right-hand column);
   display: none while closed so it never widens the page */
.valued-at-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: -4px;
    background: var(--color-charcoal);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
    white-space: normal;
    min-width: 280px;
    max-width: min(400px, calc(100vw - 2rem));
    text-align: left;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.valued-at-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 10px;
    border: 6px solid transparent;
    border-bottom-color: var(--color-charcoal);
}

.valued-at-info:hover .valued-at-tooltip,
.valued-at-info:focus-within .valued-at-tooltip,
.valued-at-info.is-open .valued-at-tooltip {
    display: block;
}

.bundle-value-stack {
    margin: -0.25rem 0 1.25rem;
    padding: 1rem 1.1rem;
    border: 2px solid var(--color-forest);
    border-radius: var(--radius-md, 10px);
    background: #fff;
}

.bvs-title {
    margin: 0 0 0.4rem;
    font-weight: 700;
    color: var(--color-forest);
}

.bvs-items {
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.bvs-items li {
    position: relative;
    padding-left: 1.4rem;
    line-height: 1.45;
    margin-bottom: 0.2rem;
}

.bvs-items li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-forest);
    font-weight: 700;
}

.bvs-math {
    margin: 0;
    border-top: 1px solid var(--color-cream-dark);
    padding-top: 0.5rem;
}

.bvs-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.15rem 0;
}

.bvs-row dt {
    color: #4a4a4a;
}

.bvs-row dd {
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
}

.bvs-row:first-child dd {
    text-decoration: line-through;
    color: #5c5c5c;
}

.bvs-save dt,
.bvs-save dd {
    color: var(--color-terracotta, #a3361f);
    font-weight: 700;
}

.bvs-note {
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
    color: #4a4a4a;
}

.current-price.sale {
    color: var(--color-terracotta);
}

.subscription-info {
    font-size: 1rem;
    color: var(--color-gray);
}

.product-short-desc {
    color: var(--color-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.add-to-cart-form {
    margin-bottom: 1.5rem;
}

.add-to-cart-form .form-group {
    margin-bottom: 1rem;
}

.add-to-cart-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.add-to-cart-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-cream-dark);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.quantity-row {
    margin-bottom: 1.5rem;
}

.quantity-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quantity-input {
    display: flex;
    width: fit-content;
}

.quantity-input button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-cream-dark);
    background: var(--color-cream);
    font-size: 1.25rem;
    cursor: pointer;
}

.quantity-input button:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.quantity-input button:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.quantity-input input {
    width: 60px;
    height: 44px;
    border: 1px solid var(--color-cream-dark);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 1rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.stock-warning {
    color: var(--color-terracotta);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Combo Builder Styles */
.combo-builder {
    margin-bottom: 1.5rem;
}
.combo-builder .form-group {
    margin-bottom: 1rem;
}
.combo-builder .combo-subgroup {
    padding-left: 1rem;
    border-left: 2px solid var(--color-forest-light);
    margin-left: 0.5rem;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.combo-builder label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
}
.combo-builder label .required {
    color: var(--color-terracotta);
}
.combo-builder .combo-hint {
    display: block;
    color: var(--color-gray);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.combo-builder select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-cream-dark);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: white;
}
.combo-price-breakdown {
    background: var(--color-cream);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}
.combo-price-breakdown .price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.combo-price-breakdown .price-line:last-child {
    margin-bottom: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-cream-dark);
}
.combo-price-breakdown .total-price {
    font-size: 1.1rem;
    color: var(--color-forest);
}
.combo-price-breakdown .subscription-price {
    color: var(--color-primary);
    font-weight: 500;
}
.subscription-addon {
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 500;
    display: block;
    margin-top: 0.25rem;
}
.combo-renewal-note {
    font-size: 0.8rem;
    color: var(--color-gray);
    padding: 0.5rem;
    background: var(--color-cream);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-sm);
    margin: 0.5rem 0;
}

.product-sku {
    color: #6b6b6b;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.product-attributes {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-cream-dark);
}

.attribute-item {
    margin-bottom: 0.5rem;
}

.product-ships-in {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin: 0.75rem 0 0;
}

.product-guarantee {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--color-cream);
    border: 2px solid var(--color-forest);
    border-radius: var(--radius-md);
}

.product-guarantee svg {
    flex-shrink: 0;
    color: var(--color-forest);
}

.product-guarantee-content {
    flex: 1;
}

.product-guarantee-content strong {
    display: block;
    color: var(--color-forest);
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.product-guarantee-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-charcoal);
    line-height: 1.5;
}

.product-description-section {
    margin-bottom: 3rem;
}

.product-description-section h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-forest);
}

.product-description {
    line-height: 1.8;
    color: var(--color-charcoal);
}

.related-products {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-cream-dark);
}

.related-products h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-forest);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-card .product-image {
    height: 180px;
    background: var(--color-cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .product-info {
    padding: 1rem;
}

.product-card .product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-forest);
    margin-bottom: 0.5rem;
}

.product-card .product-price {
    font-family: var(--font-display);
    font-weight: 700;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.product-savings-line {
    margin: -0.75rem 0 1.25rem;
    color: var(--color-terracotta);
    font-weight: 700;
    font-size: 0.95rem;
}

.product-savings-line .valued-at-info {
    margin-left: 0.3rem;
    vertical-align: middle;
}

.product-savings-line .valued-at-tooltip {
    font-weight: 400;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Combo choices: design swatches and size cards (radios driving the hidden select) */
.combo-choices {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.combo-choices-swatch {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}

.combo-choices-upgrade {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.combo-choices .combo-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem;
    border: 2px solid var(--color-cream-dark, #e8e0d0);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.3;
}

.combo-choices-upgrade .combo-choice {
    padding: 0.6rem 0.75rem;
}

.combo-choices-pick {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.combo-choices-pick .combo-choice {
    padding: 0.6rem 0.75rem;
    justify-content: center;
    text-align: center;
}

.combo-choices-pick .combo-choice-input {
    top: 0;
    left: 0;
}

.combo-choices-pick .combo-choice-name {
    font-weight: 600;
    font-size: 0.92rem;
}

.combo-choice-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.combo-choice img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.combo-choice-name,
.combo-choice-detail,
.combo-choice-price {
    display: block;
}

.combo-choice-name {
    font-size: 0.85rem;
    color: var(--color-text, #2c2c2c);
}

.combo-choices-upgrade .combo-choice-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.combo-choice-detail {
    font-size: 0.82rem;
    color: #595959;
}

.combo-choice-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-forest, #2d5a47);
}

.combo-choice:has(.combo-choice-input:checked) {
    border-color: var(--color-forest, #2d5a47);
    box-shadow: 0 0 0 1px var(--color-forest, #2d5a47);
    background: #f3f8f4;
}

.combo-choice:has(.combo-choice-input:focus-visible) {
    outline: 3px solid var(--color-gold, #d4a853);
    outline-offset: 2px;
}

.combo-choose-hint {
    margin: 0.5rem 0 0;
    padding: 0.75rem 1rem;
    background: var(--color-cream);
    border-radius: var(--radius-md);
    color: var(--color-gray);
    font-size: 0.9rem;
}

.combo-builder .combo-group-title {
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.combo-included {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    background: var(--color-cream);
    border: 1px solid var(--color-cream-dark);
    border-radius: var(--radius-md);
}

.combo-included-check {
    color: var(--color-forest);
    font-weight: 700;
}

.add-to-cart-error {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.85rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.gift-year-steps { margin: 1rem 0 0; padding: 0.9rem 1rem 0.9rem 2.2rem; background: #f4f9f5; border-radius: 10px; font-size: 0.95rem; line-height: 1.5; }
.gift-year-steps li + li { margin-top: 0.35rem; }
.checkout-account-note {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    color: var(--color-gray);
}

.product-guarantee-link {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--color-forest);
    font-weight: 600;
}

/* Cross-sell cards */
.xsell {
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.xsell-heading {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-forest);
    margin: 0 0 0.15rem;
}

.xsell-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--color-cream-dark);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.xsell-card:hover,
.xsell-card:focus-visible {
    border-color: var(--color-forest);
    box-shadow: var(--shadow-sm);
}

.xsell-card-highlight {
    background: var(--color-cream);
    border-color: var(--color-forest);
}

.xsell-card-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.xsell-card-compact .xsell-card-img {
    width: 48px;
    height: 48px;
}

.xsell-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.xsell-card-title {
    color: var(--color-charcoal);
    font-size: 0.95rem;
}

.xsell-card-text {
    font-size: 0.85rem;
    color: var(--color-gray);
}

.xsell-card-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-forest);
}

/* Mini-cart */
.mini-cart {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 380px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
    z-index: 1001;
    animation: miniCartIn 0.3s ease;
}

.mini-cart[hidden] {
    display: none;
}

.mini-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.mini-cart-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--color-forest);
}

.mini-cart-title:focus {
    outline: none;
}

.mini-cart-close {
    background: none;
    border: none;
    padding: 0.35rem;
    cursor: pointer;
    color: var(--color-gray);
    border-radius: var(--radius-sm);
}

.mini-cart-close:hover,
.mini-cart-close:focus-visible {
    color: var(--color-charcoal);
    background: var(--color-cream);
}

.mini-cart-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mini-cart-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.mini-cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.mini-cart-options {
    font-size: 0.85rem;
    color: var(--color-gray);
}

.mini-cart-subtotal {
    margin: 0 0 0.85rem;
    font-weight: 700;
}

.mini-cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.mini-cart-actions .btn {
    justify-content: center;
    text-align: center;
}

.mini-cart-view-cart {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--color-forest);
}

.mini-cart-note {
    margin: 0.6rem 0 0;
    font-size: 0.8rem;
    color: var(--color-gray);
}

.mini-cart-xsell {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-cream-dark);
}

.mini-cart-xsell-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray);
}

/* Mobile sticky Add to Cart (shown by script on phones only) */
.sticky-atc {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: white;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
}

.sticky-atc-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sticky-atc-name {
    font-size: 0.8rem;
    color: var(--color-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-atc-price {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-forest);
}

.sticky-atc .btn {
    flex-shrink: 0;
}

body.mini-cart-open .sticky-atc {
    display: none !important;
}

.reviews-empty {
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-cream);
    border-radius: var(--radius-md);
    line-height: 1.6;
}

.reviews-empty p {
    margin: 0 0 0.5rem;
}

.reviews-empty p:last-child {
    margin-bottom: 0;
}

.reviews-empty a {
    color: var(--color-forest);
    font-weight: 600;
}

.product-description p {
    margin: 0 0 1rem;
}

.product-description h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--color-forest);
    margin: 1.5rem 0 0.5rem;
}

.product-description ul,
.product-description ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.product-description li {
    margin-bottom: 0.35rem;
}

.main-image img {
    height: auto;
}

@keyframes miniCartIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
    }

    .product-title {
        font-size: 1.75rem;
    }

    .current-price {
        font-size: 1.5rem;
    }

    .product-price-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .sticky-atc:not([hidden]) {
        display: flex;
    }

    body.has-sticky-atc .site-footer-main {
        padding-bottom: 5rem;
    }

    .mini-cart {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-width: none;
        max-height: 85vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .valued-at-block {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-right: 0;
        padding-right: 0;
        border-right: none;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid var(--color-cream-dark);
    }

    .valued-at-info {
        position: static;
    }

    .valued-at-tooltip {
        position: fixed;
        top: auto;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        min-width: unset;
        max-width: unset;
        width: auto;
        max-height: 40vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Sit above the sticky Add to Cart bar, which would otherwise cover it */
    body.has-sticky-atc .valued-at-tooltip {
        bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
    }

    .valued-at-tooltip::after {
        display: none;
    }

    .thumbnail-row {
        grid-template-columns: repeat(4, 1fr);
        overflow-x: auto;
    }
}

/* Lightbox cursor hint */
.main-image-link {
    cursor: zoom-in;
    display: block;
}
.main-image-link img {
    display: block;
    width: 100%;
}

/* Lightbox: the inset that switches between the map in its room and the full flat map. It sits at the
   right end of the caption bar under the image, so it never covers the map (or its legend). */
.gslide-description { position: relative; }
.gslide-media { position: relative; }
.lb-view-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 14px 4px 4px;
    border: 1px solid #d9d2c4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.gslide-media > .lb-view-toggle { top: auto; bottom: 12px; right: 12px; transform: none; }
.lb-view-toggle:hover { border-color: #1f3a29; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22); }
.lb-view-toggle:focus-visible { outline: 3px solid #e6c88d; outline-offset: 2px; }
.lb-view-toggle img {
    display: block;
    width: 72px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 5px;
}
.lb-view-toggle span {
    font: 600 13px/1.2 system-ui, sans-serif;
    color: #1f3a29;
    white-space: nowrap;
}

/* Club Gift Year: where the recipient lives (sets the package's shipping) */
.gift-ship-options {
    border: 0;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: 0.5rem;
}
.gift-ship-options legend {
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.gift-ship-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--color-cream-dark, #e2dccd);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: #fff;
}
.gift-ship-option:has(input:checked) {
    border-color: var(--color-forest, #1a3a2a);
    box-shadow: 0 0 0 1px var(--color-forest, #1a3a2a);
}
.gift-ship-option small {
    display: block;
    color: #5d675f;
}

/* Extra product copy (content/products/{slug}.php) */
.product-extra .product-description h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--color-forest);
    margin: 2rem 0 0.75rem;
}
.product-extra .product-description h2:first-child {
    margin-top: 0;
}
.product-extra-lead {
    font-size: 1.15rem;
    line-height: 1.7;
}
.product-extra-table-wrap {
    overflow-x: auto;
    margin: 0 0 1rem;
    -webkit-overflow-scrolling: touch;
}
.product-extra-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.45;
}
.product-extra-table th,
.product-extra-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--color-cream-dark);
    text-align: left;
    vertical-align: top;
}
.product-extra-table thead th {
    color: var(--color-forest);
    font-weight: 700;
}
.product-extra-table th[scope="row"] {
    font-weight: 600;
    color: var(--color-charcoal);
}
.product-extra-table td:nth-child(2),
.product-extra-table thead th:nth-child(2) {
    background: rgba(212, 165, 116, 0.12);
}
