/* ==========================================================================
   Single Product Page – Design Tokens
   ========================================================================== */
:root {
  --sp-brown: #6B301A;
  --sp-orange: #E25B2A;
  --sp-red: #D9534F;
  --sp-border: #E0E0E0;
  --sp-text-muted: #888888;
  --sp-bg-page: #FAFAFA;
  --sp-bg-bar: #F5F5F5;
  --sp-bg-thumb: #EEEEEE;
  --sp-trust-bg: #FBF3DA;
  --sp-trust-ring: #C4A77D;
  --sp-trust-icon: #702D15;
  --sp-review-accent: #E25B2A;
  --sp-review-name: #333333;
  --sp-review-body: #444444;
  --sp-review-date: #999999;
  --sp-review-avatar-bg: #EBEBEB;
  --sp-review-avatar-text: #999999;
}

/* ==========================================================================
   Single Product Page Styles
   ========================================================================== */

.sp-page-wrap {
    background-color: var(--sp-bg-page);
    width: 100%;
    padding-bottom: 80px;
}

.sp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

/* Breadcrumb Bar */
.sp-breadcrumb-bar {
    background: var(--sp-bg-bar);
    width: 100%;
    margin-top: var(--header-height);
    border-bottom: 1px solid var(--sp-border);
}

.sp-breadcrumb-bar .sp-container {
    padding-top: 14px;
    padding-bottom: 14px;
}

.sp-breadcrumbs {
    font-size: 13px;
    color: var(--sp-text-muted);
    line-height: 1.4;
}

.sp-breadcrumbs a {
    color: var(--sp-text-muted);
    text-decoration: none;
}

.sp-breadcrumbs a:hover {
    color: var(--sp-brown);
}

.sp-breadcrumb-sep {
    margin: 0 8px;
    color: #BBBBBB;
}

.sp-breadcrumbs .current {
    color: #666666;
}

/* ==========================================================================
   Top Section: Main Info
   ========================================================================== */
.sp-main-info {
    display: flex;
    gap: 48px;
    padding: 40px 0 60px;
    align-items: flex-start;
}

/* Left: Gallery */
.sp-gallery {
    width: 52%;
    max-width: 560px;
    flex-shrink: 0;
}

.sp-main-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--sp-bg-thumb);
    margin-bottom: 12px;
    overflow: hidden;
}

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

.sp-thumbnails {
    display: flex;
    gap: 12px;
}

.sp-thumb {
    flex: 1;
    aspect-ratio: 1 / 1;
    background-color: var(--sp-bg-thumb);
    cursor: pointer;
    border: 1px solid var(--sp-border);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.sp-thumb:hover,
.sp-thumb.active {
    border-color: var(--sp-brown);
}

.sp-thumb--empty {
    cursor: default;
    pointer-events: none;
}

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

.sp-gallery-lightbox-open {
    overflow: hidden;
}

.sp-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.78);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sp-gallery-lightbox.is-active {
    opacity: 1;
    pointer-events: auto;
}

.sp-gallery-lightbox-img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(92vw, 960px);
    max-height: 86vh;
    object-fit: contain;
    background: #FFFFFF;
}

.sp-gallery-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #FFFFFF;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

/* Right: Details */
.sp-details {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.sp-tagline {
    font-size: 13px;
    color: var(--sp-orange);
    margin: 0 0 10px;
    line-height: 1.5;
}

.sp-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--sp-brown);
    margin: 0 0 12px;
    line-height: 1.3;
}

.sp-rating-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.sp-stars {
    color: var(--sp-orange);
    font-size: 15px;
    letter-spacing: 1px;
    line-height: 1;
}

.sp-reviews-count {
    color: var(--sp-text-muted);
    font-size: 13px;
}

.sp-price-wrap {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 28px;
}

.sp-current-price {
    font-size: 30px;
    font-weight: 700;
    color: var(--sp-brown);
    line-height: 1;
}

.sp-price-wrap.is-on-sale .sp-current-price,
.sp-product-price ins,
.sp-product-price ins .amount,
.sp-product-price ins bdi,
.sp-rv-price ins,
.sp-rv-price ins .amount,
.sp-rv-price ins bdi {
    color: var(--sp-red);
    text-decoration: none;
}

.sp-old-price {
    font-size: 14px;
    color: var(--sp-text-muted);
    text-decoration: line-through;
}

.sp-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--sp-red);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    line-height: 1;
}

/* Purchase Panel */
.sp-purchase-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.sp-flavor-group,
.sp-wc-variation-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-flavor-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--sp-brown);
}

.sp-flavor-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-flavor-btn {
    min-width: 72px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--sp-border);
    background: #FFFFFF;
    font-family: inherit;
    font-size: 13px;
    color: #333333;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sp-flavor-btn:hover {
    border-color: var(--sp-brown);
}

.sp-flavor-btn.active {
    background-color: var(--sp-brown);
    color: #FFFFFF;
    border-color: var(--sp-brown);
}

/* Info List */
.sp-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: var(--sp-text-muted);
    line-height: 1.8;
}

.sp-info-list li {
    margin-bottom: 6px;
}

/* Desktop: only cart-row wishlist/share; hide duplicate mobile actions block */
.sp-mobile-actions {
    display: none;
}

.sp-mobile-info-row {
    display: block;
}

/* Actions (wishlist / share – cart row built via JS) */
.sp-actions-wrap {
    display: none;
}

.sp-cart-actions-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.sp-wishlist-btn,
.sp-share-btn {
    min-width: 48px;
    min-height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    cursor: pointer;
    padding: 13px 19px;
    border-radius: 0;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.sp-wishlist-btn {
    border: 1px solid var(--sp-orange, #E25B2A);
    color: var(--sp-orange, #E25B2A);
}

.sp-wishlist-btn img {
    display: none;
}

.sp-wishlist-btn::before {
    content: "";
    width: 18px;
    height: 16px;
    display: block;
    background: var(--sp-orange, #E25B2A);
    -webkit-mask: url("../images/heart-icon.svg") center / contain no-repeat;
    mask: url("../images/heart-icon.svg") center / contain no-repeat;
}

.sp-wishlist-btn:hover {
    background-color: rgba(226, 91, 42, 0.08);
}

.sp-share-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    padding: 0;
    border: 0;
    background: transparent;
}

.sp-share-symbol {
    color: #888;
    text-align: center;
    font-family: "Noto Sans TC", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    display: block;
}

.sp-share-btn img {
    width: 56px;
    height: 56px;
    display: block;
    object-fit: contain;
}

.sp-share-btn:hover {
    background-color: transparent;
}

/* Desktop cart row: wishlist/share match add-to-cart height */
@media (min-width: 769px) {
    .sp-cart-actions-row {
        align-items: stretch;
    }

    .sp-cart-actions-row .single_add_to_cart_button {
        height: 48px;
        min-height: 48px;
    }

    .sp-cart-actions-row .sp-wishlist-btn,
    .sp-cart-actions-row .sp-share-btn {
        width: 48px;
        height: auto;
        min-width: 48px;
        min-height: 48px;
        max-width: 48px;
        padding: 0;
        flex: 0 0 48px;
        align-self: stretch;
        box-sizing: border-box;
    }

    .sp-cart-actions-row .sp-share-btn img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

/* Trust Badges (四大保證) */
.sp-trust-badges {
    width: 100%;
    background: rgba(251, 243, 218, 0.40);
    padding: 28px 0;
    margin-bottom: 48px;
}

.sp-trust-badges-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.sp-trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.sp-trust-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--sp-trust-ring);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-trust-icon);
}

.sp-trust-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.sp-trust-icon svg {
    width: 20px;
    height: 20px;
}

.sp-trust-icon svg path {
    stroke: var(--sp-trust-icon);
}

.sp-trust-icon svg path[fill]:not([fill='none']):not([fill='#FFFFFF']) {
    fill: var(--sp-trust-icon);
}

.sp-trust-text h4 {
    font-size: 14px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 4px;
    line-height: 1.3;
}

.sp-trust-text p {
    font-size: 12px;
    color: var(--sp-text-muted);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
}

/* ==========================================================================
   Tabs Section
   ========================================================================== */
.sp-tabs-section {
    margin-bottom: 80px;
}

.sp-tabs-nav {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: none;
}

.sp-tab-item {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #333;
    background: #fff;
    border: 1px solid var(--sp-brown);
    cursor: pointer;
    margin: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sp-tab-item + .sp-tab-item {
    margin-left: -1px;
}

.sp-tab-item:hover:not(.active) {
    background: #faf7f5;
}

.sp-tab-item.active {
    background: var(--sp-brown);
    color: #fff;
    border-color: var(--sp-brown);
    font-weight: 400;
}

.sp-tab-panels {
    text-align: left;
}

.sp-tab-panel[hidden] {
    display: none !important;
}

.sp-tab-content {
    max-width: none;
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: #555;
}

.sp-tab-content p {
    margin: 0 0 12px;
}

.sp-tab-content .sp-desc-heading,
.sp-tab-content h3.sp-desc-heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--sp-orange);
    margin: 28px 0 12px;
}

.sp-tab-content .sp-desc-heading:first-child,
.sp-tab-content h3.sp-desc-heading:first-child {
    margin-top: 0;
}

.sp-precautions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sp-precautions-list li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 8px;
}

.sp-precautions-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #555;
}

/* ==========================================================================
   Reviews Section
   ========================================================================== */
.sp-reviews-section {
    width: 100%;
    background: var(--sp-trust-bg, #FBF3DA);
    padding: 60px 0 70px;
    margin-bottom: 80px;
}

.sp-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.sp-section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #b7a983;
    margin: 15px auto 0;
}

.sp-section-title--reviews {
    text-align: center;
    margin-bottom: 36px;
    color: #111111;
}

.sp-section-title--reviews::after {
    display: block;
    width: 112px;
    height: 3px;
    background-color: var(--sp-orange);
    margin: 14px auto 0;
}

.sp-section-title--related {
    font-size: 20px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 40px;
}

.sp-section-title--related::after {
    width: 200px;
    height: 3px;
    background-color: var(--sp-orange);
    margin: 12px auto 0;
}

.sp-reviews-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    justify-content: flex-start;
}

.sp-reviews-summary {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-shrink: 0;
    width: auto;
}

.sp-rs-overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    width: 168px;
}

.sp-rs-score-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 10px;
}

.sp-rs-score {
    font-size: 56px;
    font-weight: 700;
    color: var(--sp-orange);
    line-height: 1;
}

.sp-rs-total {
    font-size: 22px;
    font-weight: 400;
    color: var(--sp-orange);
    line-height: 1;
}

.sp-rs-text {
    font-size: 14px;
    color: #888888;
    margin: 0 0 20px;
    white-space: nowrap;
}

.sp-rs-bars {
    flex: 1;
    min-width: 220px;
    max-width: 280px;
    margin: 0;
}

.sp-rs-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #333333;
}

.sp-rs-bar-row:last-child {
    margin-bottom: 0;
}

.sp-rs-star {
    width: 26px;
    flex-shrink: 0;
    color: var(--sp-orange);
    font-size: 13px;
    line-height: 1;
}

.sp-rs-bar-bg {
    flex-grow: 1;
    height: 8px;
    background-color: transparent;
    border: 1px solid #D8D0C0;
    border-radius: 999px;
    overflow: hidden;
}

.sp-rs-bar-fill {
    height: 100%;
    background-color: #333333;
    border-radius: 999px;
}

.sp-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 168px;
    padding: 10px 16px;
    border: 1px solid #111111;
    background: transparent;
    color: #111111;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;
    border-radius: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sp-btn-outline:hover {
    background-color: #111111;
    color: #ffffff;
}

.sp-reviews-list {
    flex: 1;
    max-width: 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-reviews-list--all {
    max-width: 520px;
    margin: 0 0 32px;
}

.sp-review-card {
    padding: 20px 22px;
    background: #ffffff;
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0;
    font-family: "Noto Sans TC", sans-serif;
}

.sp-review-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.sp-review-main {
    flex: 1;
    min-width: 0;
}

.sp-review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--sp-review-avatar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
    color: var(--sp-review-avatar-text);
    flex-shrink: 0;
    margin-top: 0;
}

.sp-review-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--sp-review-name);
    margin-bottom: 6px;
    line-height: 1.4;
}

.sp-review-rating-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
}

.sp-review-stars {
    font-size: 14px;
    letter-spacing: 1px;
    line-height: 1;
    flex-shrink: 0;
}

.sp-review-stars-filled {
    color: var(--sp-review-accent);
}

.sp-review-stars-empty {
    color: #D5D5D5;
}

.sp-review-date {
    font-size: 12px;
    color: var(--sp-review-date);
    flex-shrink: 0;
    white-space: nowrap;
}

.sp-review-content {
    font-size: 14px;
    font-weight: 400;
    color: var(--sp-review-body);
    margin-top: 10px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.sp-review-attrs {
    font-size: 13px;
    font-weight: 400;
    color: var(--sp-review-accent);
    line-height: 1.5;
    margin-top: 0;
}

.sp-all-reviews-panel {
    padding-top: 36px;
}

.sp-all-reviews-panel[hidden] {
    display: none !important;
}

/* ==========================================================================
   Recommended Section
   ========================================================================== */
.sp-recommended {
    margin-bottom: 80px;
}

.sp-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

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

.sp-product-img {
    width: 100%;
    aspect-ratio: 230 / 280;
    background-color: #f5f5f5;
    margin-bottom: 15px;
    position: relative;
}

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

.sp-product-name {
    font-size: 13px;
    color: #333;
    margin-bottom: 5px;
}

.sp-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #000;
}

/* ==========================================================================
   Recently Viewed
   ========================================================================== */
.sp-recently-viewed-wrap {
    background-color: rgba(183, 169, 131, 0.1);
    padding: 40px 0;
}

.sp-recently-viewed {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.sp-rv-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
    width: 100%;
    max-width: 510px;
    text-align: left;
}

.sp-rv-list {
    display: flex;
    gap: 30px;
    justify-content: center;
    width: 100%;
    max-width: 510px;
}

.sp-rv-item {
    width: 150px;
    text-decoration: none;
    color: inherit;
}

.sp-rv-img {
    width: 150px;
    height: 180px;
    background-color: #fff;
    margin-bottom: 10px;
}

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

.sp-rv-name {
    font-size: 12px;
    color: #333;
    margin-bottom: 5px;
}

.sp-rv-price {
    font-size: 12px;
    font-weight: 700;
    color: #000;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 991px) {
    .sp-main-info {
        flex-direction: column;
        gap: 30px;
    }
    .sp-gallery {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    .sp-main-img-wrap {
        width: 100%;
    }
    .sp-trust-badges-inner {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 24px 32px;
    }

    .sp-trust-item {
        flex: 0 1 calc(50% - 16px);
    }

    .sp-trust-text p {
        white-space: normal;
    }
    .sp-reviews-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 40px;
    }

    .sp-reviews-summary {
        flex-direction: column;
        align-items: center;
        gap: 28px;
        width: 100%;
    }

    .sp-rs-overview {
        width: 100%;
        max-width: 220px;
    }

    .sp-rs-bars {
        width: 100%;
        max-width: 320px;
        min-width: 0;
    }

    .sp-reviews-list,
    .sp-reviews-list--all {
        max-width: none;
        width: 100%;
    }
    .sp-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile: main product block match screenshot */
    .sp-container {
        padding: 0 20px;
    }

    .sp-main-section {
        padding-top: 14px;
    }

    .sp-main-info {
        gap: 18px;
    }

    .sp-gallery {
        max-width: none;
        margin: 0;
    }

    .sp-main-img-wrap {
        border-radius: 0;
    }

    .sp-main-img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        display: block;
    }

    .sp-thumbnails {
        display: flex;
        justify-content: flex-start;
        gap: 10px;
        margin-top: 10px;
        width: auto;
    }

    .sp-thumb {
        flex: 0 0 auto;
        width: 48px;
        height: 48px;
        background-color: #F2F2F2;
    }

    .sp-gallery-lightbox {
        padding: 18px;
    }

    .sp-gallery-lightbox-img {
        max-width: 94vw;
        max-height: 82vh;
    }

    .sp-gallery-lightbox-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    .sp-details {
        padding-top: 0;
        width: 100%;
    }

    .sp-tagline {
        font-size: 13px;
        margin: 10px 0 6px;
        color: var(--sp-orange);
    }

    .sp-title {
        font-size: 16px;
        line-height: 1.4;
        margin: 0 0 10px;
        color: #111111;
        font-weight: 700;
    }

    .sp-rating-wrap {
        margin-bottom: 8px;
        gap: 10px;
    }

    .sp-stars {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .sp-reviews-count {
        font-size: 13px;
        color: #888888;
    }

    .sp-price-wrap {
        margin-bottom: 14px;
        gap: 8px;
    }

    .sp-current-price {
        font-size: 16px;
    }

    .sp-old-price {
        font-size: 12px;
    }

    .sp-discount-badge {
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 0;
    }

    .sp-flavor-label {
        font-size: 14px;
        font-weight: 700;
        color: #111111;
        margin-bottom: 10px;
    }

    .sp-flavor-options {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .sp-flavor-btn {
        width: 100%;
        height: 34px;
        font-size: 13px;
        padding: 0;
    }

    /* Quantity row: [-][ input ][+] — match mobile design spec */
    .sp-custom-qty {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }

    .sp-qty-label {
        margin: 0;
        text-align: left;
    }

    .sp-qty-controls {
        width: 100%;
        display: grid;
        grid-template-columns: 72fr 305fr 72fr;
        gap: 12px;
        align-items: stretch;
    }

    .sp-qty-minus,
    .sp-qty-plus {
        width: auto;
        min-width: 0;
        height: 41px;
        border: 1px solid #CCCCCC;
        border-radius: 0;
        color: #333333;
        background: #FFFFFF;
        font-size: 16px;
    }

    .sp-qty-val {
        width: auto;
        max-width: none;
        height: 41px;
        border: 1px solid #CCCCCC;
        border-radius: 0;
        font-size: 14px;
        color: #333333;
        background: #FFFFFF;
    }

    /* Add to cart button full width */
    .sp-wc-add-to-cart-wrapper .sp-cart-actions-row {
        flex-direction: column;
        gap: 12px;
    }

    .sp-wc-add-to-cart-wrapper .sp-cart-actions-row button.single_add_to_cart_button.button {
        width: 100% !important;
        height: 38px;
        font-size: 15px;
    }

    /* Hide desktop actions row; use mobile actions under info list */
    .sp-actions-wrap {
        display: none !important;
    }

    .sp-mobile-actions {
        margin-top: 0;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        width: auto;
    }

    .sp-mobile-actions .sp-wishlist-btn,
    .sp-mobile-actions .sp-share-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        padding: 0;
    }

    .sp-mobile-actions .sp-share-btn img {
        width: 36px;
        height: 36px;
    }

    .sp-mobile-actions .sp-wishlist-btn {
        border-color: var(--sp-orange);
    }

    .sp-mobile-actions .sp-wishlist-btn img {
        display: none;
    }

    .sp-mobile-actions .sp-wishlist-btn::before {
        width: 16px;
        height: 14px;
    }

    .sp-mobile-actions .sp-share-symbol {
        font-size: 14px;
    }

    .sp-mobile-info-row {
        margin-top: 12px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
    }

    .sp-mobile-info-row .sp-info-list {
        margin: 0;
        flex: 1;
        min-width: 0;
    }

    .sp-recently-viewed {
        align-items: center;
        padding: 0 20px;
        gap: 24px;
    }

    .sp-rv-title {
        writing-mode: horizontal-tb;
        transform: none;
        text-align: center;
        margin-bottom: 0;
        max-width: 100%;
        width: 100%;
    }

    .sp-rv-list {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 24px;
        max-width: 400px;
        width: 100%;
    }

    .sp-rv-item {
        display: grid;
        grid-template-columns: 90px 1fr;
        grid-template-rows: auto auto;
        column-gap: 16px;
        row-gap: 4px;
        align-items: center;
        width: 100%;
        max-width: 400px;
    }

    .sp-rv-img {
        grid-row: 1 / span 2;
        grid-column: 1;
        width: 90px;
        height: 90px;
        margin-bottom: 0;
        align-self: center;
    }

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

    .sp-rv-name {
        grid-column: 2;
        grid-row: 1;
        font-size: 14px;
        line-height: 1.4;
        color: #333333;
        margin-bottom: 0;
        align-self: end;
    }

    .sp-rv-price {
        grid-column: 2;
        grid-row: 2;
        font-size: 14px;
        font-weight: 700;
        color: #000000;
        align-self: start;
    }

    .sp-rv-price .amount,
    .sp-rv-price bdi,
    .sp-rv-price ins {
        font-weight: 700;
        text-decoration: none;
    }

    .sp-rv-price ins,
    .sp-rv-price ins .amount,
    .sp-rv-price ins bdi {
        color: var(--sp-red);
    }
}

/* ==========================================================================
   WooCommerce Overrides
   ========================================================================== */
.sp-wc-add-to-cart-wrapper form.cart {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin: 0;
    width: 100%;
}

.sp-wc-add-to-cart-wrapper .variations {
    margin: 0;
    width: 100%;
    border: none;
}

.sp-wc-add-to-cart-wrapper .variations tr {
    display: block;
}

.sp-wc-add-to-cart-wrapper .variations td {
    display: block;
    padding: 0;
}

.sp-wc-add-to-cart-wrapper .variations td.label {
    display: none;
}

.sp-wc-add-to-cart-wrapper .variations select {
    display: none;
}

.sp-wc-add-to-cart-wrapper .reset_variations {
    display: none !important;
}

.sp-wc-add-to-cart-wrapper .woocommerce-variation-add-to-cart,
.sp-wc-add-to-cart-wrapper .cart .quantity {
    width: 100%;
}

.sp-wc-add-to-cart-wrapper .quantity {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.sp-custom-qty {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-qty-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--sp-brown);
}

.sp-qty-controls {
    display: flex;
    align-items: center;
}

.sp-qty-minus,
.sp-qty-plus {
    width: 42px;
    height: 42px;
    background: #FFFFFF;
    border: 1px solid var(--sp-border);
    font-family: inherit;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333333;
    padding: 0;
    line-height: 1;
}

.sp-qty-val {
    width: 60px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--sp-border);
    border-bottom: 1px solid var(--sp-border);
    font-size: 14px;
    color: #333333;
    background: #FFFFFF;
}

.sp-wc-add-to-cart-wrapper .quantity input.qty {
    display: none;
}

.sp-wc-add-to-cart-wrapper button.single_add_to_cart_button,
.sp-wc-add-to-cart-wrapper .sp-cart-actions-row button.single_add_to_cart_button.button,
.woocommerce .sp-wc-add-to-cart-wrapper form.cart button.single_add_to_cart_button.button.alt {
    flex: 1;
    min-width: 0;
    height: 48px;
    background-color: var(--sp-brown) !important;
    color: #FFFFFF !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0 24px;
    box-shadow: none !important;
}

.sp-wc-add-to-cart-wrapper button.single_add_to_cart_button:hover,
.sp-wc-add-to-cart-wrapper .sp-cart-actions-row button.single_add_to_cart_button.button:hover,
.woocommerce .sp-wc-add-to-cart-wrapper form.cart button.single_add_to_cart_button.button.alt:hover {
    background-color: #552616 !important;
    color: #FFFFFF !important;
}

.sp-wc-add-to-cart-wrapper button.single_add_to_cart_button:disabled,
.sp-wc-add-to-cart-wrapper .sp-cart-actions-row button.single_add_to_cart_button.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    /* Mobile: cart row should be CTA only (icons move below info list) */
    .sp-wc-add-to-cart-wrapper .sp-cart-actions-row {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .sp-wc-add-to-cart-wrapper .sp-cart-actions-row .sp-wishlist-btn,
    .sp-wc-add-to-cart-wrapper .sp-cart-actions-row .sp-share-btn {
        display: none !important;
    }

    .sp-wc-add-to-cart-wrapper .sp-cart-actions-row button.single_add_to_cart_button.button,
    .sp-wc-add-to-cart-wrapper .sp-cart-actions-row button.single_add_to_cart_button.button.alt {
        width: 100% !important;
        flex: 0 0 auto !important;
        height: 38px !important;
    }

    /* Prevent WP emoji replacement affecting share glyph */
    .sp-share-symbol img.emoji {
        display: none !important;
    }

    .sp-share-symbol::before {
        content: "⤴";
    }

    /* Quantity selector — must come after base .sp-qty-* rules */
    .sp-wc-add-to-cart-wrapper .sp-custom-qty {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }

    .sp-wc-add-to-cart-wrapper .sp-qty-label {
        font-size: 14px;
        font-weight: 700;
        color: #333333;
        margin: 0;
        text-align: left;
    }

    .sp-wc-add-to-cart-wrapper .sp-qty-controls {
        width: 100%;
        display: grid;
        grid-template-columns: 72fr 305fr 72fr;
        gap: 12px;
        align-items: stretch;
    }

    .sp-wc-add-to-cart-wrapper .sp-qty-minus,
    .sp-wc-add-to-cart-wrapper .sp-qty-plus {
        width: auto;
        min-width: 0;
        height: 41px;
        border: 1px solid #CCCCCC;
        border-radius: 0;
        color: #333333;
        background: #FFFFFF;
        font-size: 16px;
        padding: 0;
    }

    .sp-wc-add-to-cart-wrapper .sp-qty-val {
        width: auto;
        max-width: none;
        height: 41px;
        border: 1px solid #CCCCCC;
        border-top: 1px solid #CCCCCC;
        border-bottom: 1px solid #CCCCCC;
        border-radius: 0;
        font-size: 14px;
        color: #333333;
        background: #FFFFFF;
    }

    /* Product tabs — flat centered mobile style */
    .sp-tabs-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 48px;
    }

    .sp-tabs-nav {
        width: 85%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        border: 1px solid #702D15;
        box-sizing: border-box;
        margin-bottom: 20px;
        justify-content: center;
    }

    .sp-tab-panels {
        width: 100%;
        align-self: stretch;
    }

    .sp-tab-item {
        flex: 1 1 50%;
        width: 50%;
        min-width: 0;
        height: 38px;
        padding: 0 8px;
        font-size: 14px;
        font-weight: 400;
        line-height: 1;
        color: #333333;
        background: #FFFFFF;
        border: none;
        border-right: 1px solid #702D15;
        border-radius: 0;
    }

    .sp-tab-item:last-child {
        border-right: none;
    }

    .sp-tab-item + .sp-tab-item {
        margin-left: 0;
    }

    .sp-tab-item.active {
        background: #702D15;
        color: #FFFFFF;
    }

    .sp-tab-item:hover:not(.active) {
        background: #FFFFFF;
    }

    /* Recently viewed — centered title, vertical list rows */
    .sp-recently-viewed-wrap {
        padding: 32px 0;
    }

    .sp-recently-viewed {
        align-items: center;
        padding: 0 20px;
        gap: 24px;
        max-width: 100%;
    }

    .sp-rv-title {
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: #111111;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .sp-rv-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        width: 100%;
        max-width: 400px;
    }

    .sp-rv-item {
        display: grid;
        grid-template-columns: 90px 1fr;
        grid-template-rows: auto auto;
        column-gap: 16px;
        row-gap: 4px;
        align-items: center;
        width: 100%;
        max-width: 400px;
    }

    .sp-rv-img {
        grid-row: 1 / span 2;
        grid-column: 1;
        width: 90px;
        height: 90px;
        margin-bottom: 0;
        align-self: center;
    }

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

    .sp-rv-name {
        grid-column: 2;
        grid-row: 1;
        font-size: 14px;
        line-height: 1.4;
        color: #333333;
        margin-bottom: 0;
        align-self: end;
    }

    .sp-rv-price {
        grid-column: 2;
        grid-row: 2;
        font-size: 14px;
        font-weight: 700;
        color: #000000;
        align-self: start;
    }

    .sp-rv-price .amount,
    .sp-rv-price bdi,
    .sp-rv-price ins {
        font-weight: 700;
        text-decoration: none;
    }

    .sp-rv-price ins,
    .sp-rv-price ins .amount,
    .sp-rv-price ins bdi {
        color: var(--sp-red);
    }
}

/* Reviews */
.sp-wc-reviews-wrap {
    max-width: 520px;
    margin: 0;
    background: #ffffff;
    padding: 28px;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.sp-wc-reviews-wrap .woocommerce-Reviews-title,
.sp-wc-reviews-wrap .commentlist,
.sp-wc-reviews-wrap #reviews > .woocommerce-Reviews > ol.commentlist,
.sp-wc-reviews-wrap .woocommerce-noreviews {
    display: none;
}

.sp-wc-reviews-wrap #review_form_wrapper {
    margin-top: 0;
}

.sp-wc-reviews-wrap #respond .comment-reply-title {
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 16px;
}

.woocommerce-Reviews-title {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Recently Viewed shortcode styles */
.sp-rv-list ul.products {
    display: flex;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-rv-list ul.products li.product {
    width: 150px;
}

.sp-rv-list ul.products li.product img {
    width: 150px;
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
}

.sp-rv-list ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 12px;
    color: #333;
    margin-bottom: 5px;
    padding: 0;
}

.sp-rv-list ul.products li.product .price {
    font-size: 12px;
    font-weight: 700;
    color: #000;
}

/* Desktop min-width guard for hero layout */
@media (min-width: 992px) {
    .sp-main-info {
        flex-wrap: nowrap;
    }
}

@media (max-width: 991px) {
    .sp-main-info {
        flex-direction: column;
        gap: 30px;
        padding-top: 24px;
    }

    .sp-gallery {
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
    }

    .sp-cart-actions-row {
        flex-wrap: wrap;
    }

    .sp-wc-add-to-cart-wrapper button.single_add_to_cart_button {
        width: 100%;
        flex: 1 1 100%;
    }
}
