.store-single-product {
    width: 100%;
}

.store-single-product__inner {
    display: flex;
    flex-direction: column;
    gap: clamp(40px, 6vw, 72px);
    width: var(--store-content-max-width);
    max-width: var(--store-content-max-width);
    margin-left: auto;
    margin-right: auto;
    padding: clamp(20px, 4vw, 40px) var(--store-space-8) clamp(28px, 5vw, 56px);
    box-sizing: border-box;
}

.store-product-detail > .store-product-detail__breadcrumbs {
    grid-column: 1 / -1;
    margin: 0 0 clamp(12px, 2vw, 20px);
}

.store-product-detail > .store-product-detail__breadcrumbs .store-breadcrumb {
    margin-bottom: 0;
}

.store-product-detail {
    --store-product-detail-gap: clamp(24px, 4vw, 48px);
    --store-product-detail-gallery-width: min(52vw, 760px);
    --store-product-detail-summary-width: min(36vw, 560px);
    display: grid;
    grid-template-columns: minmax(0, var(--store-product-detail-gallery-width)) minmax(320px, var(--store-product-detail-summary-width));
    gap: var(--store-product-detail-gap);
    justify-content: space-between;
    align-items: start;
}

.store-product-detail__gallery-shell,
.store-product-detail__summary {
    background: var(--store-color-white, #ffffff);
    border: 1px solid var(--store-color-border, rgba(29, 78, 216, 0.12));
    border-radius: 28px;
    box-shadow: var(--store-shadow-card, 0 18px 40px rgba(15, 23, 42, 0.08));
}

.store-product-detail__gallery-shell {
    width: 100%;
    max-width: var(--store-product-detail-gallery-width);
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.store-product-detail__gallery {
    display: grid;
    gap: 16px;
}

.store-product-detail__stage {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0;
    border: 0;
    background: transparent;
}

.store-product-detail__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.store-product-detail__slide {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 36px);
    margin: 0;
}

.store-product-detail__slide.is-active {
    display: flex;
}

.store-product-detail__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: scale-down;
    object-position: center;
}

.store-product-detail__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--store-color-primary);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.store-product-detail__nav:hover,
.store-product-detail__nav:focus-visible {
    transform: translateY(-50%) scale(1.04);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
}

.store-product-detail__nav--prev {
    left: 14px;
}

.store-product-detail__nav--next {
    right: 14px;
}

.store-product-detail__nav span {
    font-size: 1.75rem;
    line-height: 1;
}

.store-product-detail__thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.store-product-detail__thumb {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: transparent;
    padding: 4px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.store-product-detail__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.store-product-detail__thumb:hover,
.store-product-detail__thumb:focus-visible,
.store-product-detail__thumb.is-active {
    background: rgba(29, 78, 216, 0.08);
    transform: translateY(-1px);
}

.store-product-detail__thumb:hover::after,
.store-product-detail__thumb:focus-visible::after,
.store-product-detail__thumb.is-active::after {
    opacity: 0;
}

.store-product-detail__thumb-image {
    display: block;
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: scale-down;
    object-position: center;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.store-product-detail__thumb:hover .store-product-detail__thumb-image,
.store-product-detail__thumb:focus-visible .store-product-detail__thumb-image,
.store-product-detail__thumb.is-active .store-product-detail__thumb-image {
    opacity: 1;
}

.store-product-detail__summary {
    display: grid;
    width: 100%;
    max-width: var(--store-product-detail-summary-width);
    justify-self: end;
    gap: 4px;
    overflow: hidden;
}

.store-product-detail__row {
    padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 30px);
}

.store-product-detail__title {
    margin: 0;
    color: var(--store-color-title);
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 600;
}

.store-product-detail__attributes {
    display: grid;
    gap: 10px;
    margin: 0;
}

.store-product-detail__attribute {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.store-product-detail__attribute-label {
    margin: 0;
    color: var(--store-color-text-muted, #64748b);
    font-size: 0.95rem;
    font-weight: 700;
}

.store-product-detail__attribute-value {
    margin: 0;
    color: var(--store-color-text, #0f172a);
    font-size: 1rem;
    font-weight: 500;
}

.store-product-detail__description {
    color: var(--store-color-text-soft, #6b7280);
    font-size: 1rem;
    line-height: 1.7;
}

.store-product-detail__description :where(p, li, span, div, td, th) {
    color: inherit;
}

.store-product-detail__description > *:first-child {
    margin-top: 0;
}

.store-product-detail__description > *:last-child {
    margin-bottom: 0;
}

.store-product-detail__price,
.store-product-detail__price .price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0;
    color: var(--store-color-price);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 600;
}

.store-product-detail__price del,
.store-product-detail__price del .woocommerce-Price-amount {
    color: var(--store-color-text-muted);
    font-weight: 500;
    font-size: 0.72em;
}

.store-product-detail__price ins,
.store-product-detail__price ins .woocommerce-Price-amount,
.store-product-detail__price .woocommerce-Price-amount {
    color: var(--store-color-price);
    text-decoration: none;
}

.store-product-detail__row--stock {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.store-product-detail__meta-label {
    color: var(--store-color-text-muted, #64748b);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.store-product-detail__stock-value {
    color: var(--store-color-text, #0f172a);
    font-size: 1.05rem;
    font-weight: 600;
}

.store-product-detail__stock-value.is-healthy {
    color: #15803d;
}

.store-product-detail__stock-value.is-low {
    color: #dc2626;
}

.store-product-detail__purchase {
    display: flex;
    align-items: stretch;
    gap: 16px;
    flex-wrap: wrap;
}

.store-product-detail__purchase .product-card-quantity {
    flex: 0 0 auto;
    margin: 0;
}

.store-product-detail__add-to-cart {
    flex: 1 1 240px;
    min-height: 54px;
}

.store-product-detail__purchase .product-card-button,
.store-product-detail__purchase .added_to_cart {
    justify-content: center;
}

.store-product-detail__purchase .store-stock-notify {
    flex: 1 1 100%;
    width: 100%;
}

.store-product-detail__purchase .store-stock-notify--detail .product-card-out-of-stock-row {
    width: 100%;
}

.store-product-detail__purchase .store-stock-notify--detail .product-card-button-disabled.store-product-detail__add-to-cart {
    flex: 1 1 auto;
    min-height: 54px;
}

.store-product-detail__purchase .store-stock-notify--detail .store-stock-notify-bell {
    flex: 0 0 54px;
    width: 54px;
    min-height: 54px;
}

.store-stock-notify {
    display: grid;
    gap: 12px;
}

.store-stock-notify__status {
    margin: 0;
    color: #dc2626;
    font-size: 1rem;
    font-weight: 600;
}

.store-stock-notify__intro {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

.store-stock-notify__form {
    display: grid;
    gap: 12px;
}

.store-stock-notify__action {
    display: grid;
    gap: 12px;
}

.store-stock-notify__account-email {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.store-stock-notify__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.store-stock-notify__field {
    display: grid;
    gap: 6px;
}

.store-stock-notify__field-label {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.store-stock-notify__field input[type="email"] {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--store-color-border);
    border-radius: 12px;
    background: var(--store-color-white);
    color: var(--store-color-text);
    font: inherit;
}

.store-stock-notify__field input[type="email"]:focus {
    outline: none;
    border-color: var(--store-color-primary-strong);
    box-shadow: var(--store-input-focus-ring);
}

.store-stock-notify__submit {
    width: 100%;
    min-height: 54px;
}

.store-stock-notify__message {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.store-stock-notify__message.is-success {
    background: #ecfdf5;
    color: #166534;
}

.store-stock-notify__message.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

.store-stock-notify__submit.is-active {
    background: #dc2626;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.24);
}

.store-stock-notify__submit.is-active:hover {
    background: #b91c1c;
    color: #ffffff;
}

@media (max-width: 1080px) {
    .store-product-detail {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .store-product-detail__gallery-shell,
    .store-product-detail__summary {
        max-width: none;
        border-radius: 24px;
    }

    .store-product-detail__thumbs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .store-single-product__inner {
        gap: clamp(28px, 8vw, 48px);
    }

    .store-product-detail__row {
        padding: 18px;
    }

    .store-product-detail__thumbs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .store-product-detail__thumb {
        border-radius: 10px;
    }

    .store-product-detail__thumb-image {
        height: 36px;
    }

    .store-product-detail__purchase {
        flex-direction: column;
    }

    .store-product-detail__purchase .product-card-quantity {
        width: 100%;
    }

    .store-product-detail__purchase .product-card-quantity-input {
        max-width: none;
    }

    .store-product-detail__add-to-cart {
        width: 100%;
        flex-basis: auto;
    }
}

html[data-store-theme="dark"] .store-product-detail__price,
html[data-store-theme="dark"] .store-product-detail__price .price,
html[data-store-theme="dark"] .store-product-detail__price ins,
html[data-store-theme="dark"] .store-product-detail__price ins .woocommerce-Price-amount,
html[data-store-theme="dark"] .store-product-detail__price .woocommerce-Price-amount,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__price,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__price ins,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__price .woocommerce-Price-amount,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__price .woocommerce-Price-amount {
    color: var(--store-color-price) !important;
}

html[data-store-theme="dark"] .store-product-detail__price del,
html[data-store-theme="dark"] .store-product-detail__price del .woocommerce-Price-amount,
html[data-store-theme="dark"] .store-product-detail__price del .woocommerce-Price-amount {
    color: var(--store-color-text-muted) !important;
}

html[data-store-theme="dark"] .store-product-detail__nav,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__nav,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__nav {
    background-color: #2563eb;
    background-image: linear-gradient(
        135deg,
        var(--store-action-button-bg-start, #60a5fa) 0%,
        var(--store-action-button-bg-end, #3b82f6) 100%
    );
    color: #ffffff;
    box-shadow: var(--store-shadow-button, 0 10px 24px rgba(37, 99, 235, 0.34));
}

html[data-store-theme="dark"] .store-product-detail__nav:hover,
html[data-store-theme="dark"] .store-product-detail__nav:focus-visible,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__nav:hover,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__nav:focus-visible,
html[data-store-theme="dark"] .wp-dark-mode-ignore .store-product-detail__nav:focus-visible {
    background-color: #1d4ed8;
    background-image: linear-gradient(
        135deg,
        var(--store-color-primary-strong, #3b82f6) 0%,
        #1d4ed8 100%
    );
    color: #ffffff;
    box-shadow: var(--store-shadow-button-hover, 0 14px 28px rgba(37, 99, 235, 0.42));
}

/* Product Detail Tabs & Reviews */
.store-product-detail__row--rating {
    padding-top: var(--store-space-1, 4px);
    padding-bottom: 0;
    margin-top: -12px; /* Pull rating closer to title */
}

.store-product-detail__row--tabs {
    padding-top: var(--store-space-4, 16px);
    padding-bottom: var(--store-space-4, 16px);
}

.store-product-detail__tabs {
    display: grid;
    gap: var(--store-space-4, 16px);
}

.store-product-detail__tabs-nav {
    display: flex;
    gap: var(--store-space-2, 8px);
    border-bottom: 2px solid var(--store-color-border, #e2e8f0);
    padding-bottom: 2px;
}

.store-product-detail__tab-btn {
    background: none;
    border: none;
    padding: var(--store-space-2, 8px) var(--store-space-4, 16px);
    font-size: 1rem;
    color: var(--store-color-text-soft, #6b7280);
    cursor: pointer;
    position: relative;
    transition: color var(--store-transition-fast, 0.2s);
}

.store-product-detail__tab-btn::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--store-color-primary, #1d4ed8);
    border-radius: 99px;
    opacity: 0;
    transform: scaleX(0.8);
    transition: opacity var(--store-transition-fast, 0.2s), transform var(--store-transition-fast, 0.2s);
}

.store-product-detail__tab-btn:hover {
    color: var(--store-color-text, #0f172a);
}

.store-product-detail__tab-btn.is-active {
    color: var(--store-color-primary, #1d4ed8);
}

.store-product-detail__tab-btn.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.store-product-detail__tab-pane {
    animation: store-fade-in 0.2s ease;
}

@keyframes store-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reviews List styling */
.store-product-reviews__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--store-space-5, 20px);
}

.store-product-reviews__item {
    border-bottom: 1px solid var(--store-color-border, #e2e8f0);
    padding-bottom: var(--store-space-5, 20px);
}

.store-product-reviews__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.store-product-reviews__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--store-space-2, 8px);
    margin-bottom: var(--store-space-2, 8px);
}

.store-product-reviews__author-date {
    display: flex;
    align-items: center;
    gap: var(--store-space-3, 12px);
}

.store-product-reviews__author {
    font-weight: 600;
    color: var(--store-color-text, #0f172a);
    font-size: 0.95rem;
}

.store-product-reviews__date {
    color: var(--store-color-text-muted, #94a3b8);
    font-size: 0.85rem;
}

.store-product-reviews__content {
    color: var(--store-color-text-soft, #4b5563);
    font-size: 0.95rem;
    line-height: 1.6;
}

.store-product-reviews__content p {
    margin: 0;
}

/* Dark mode overrides */
html[data-store-theme="dark"] .store-product-detail__tabs-nav,
html[data-store-theme="dark"] .store-product-detail__tabs-nav {
    border-color: #334155;
}

html[data-store-theme="dark"] .store-product-reviews__item,
html[data-store-theme="dark"] .store-product-reviews__item {
    border-color: #334155;
}

html[data-store-theme="dark"] .store-product-reviews__author,
html[data-store-theme="dark"] .store-product-reviews__author {
    color: #f8fafc !important;
}

html[data-store-theme="dark"] .store-product-detail__tab-btn:hover,
html[data-store-theme="dark"] .store-product-detail__tab-btn:hover {
    color: #f8fafc !important;
}

/* Reviews Form styling */
.store-product-reviews__form-container {
    margin-top: var(--store-space-8, 32px);
    padding-top: var(--store-space-6, 24px);
    border-top: 1px dashed var(--store-color-border, #e2e8f0);
}

.store-product-reviews__form-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--store-color-text, #0f172a);
    margin-top: 0;
    margin-bottom: var(--store-space-4, 16px);
}

#commentform {
    display: flex;
    flex-direction: column;
    gap: var(--store-space-4, 16px);
}

#commentform p {
    margin: 0;
}

#commentform label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--store-color-text, #0f172a);
}

#commentform label .required {
    color: #ef4444;
    margin-left: 2px;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform select,
#commentform textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--store-color-border, #dbe4ee);
    border-radius: 12px;
    background: var(--store-color-white, #ffffff);
    color: var(--store-color-text, #0f172a);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
    box-shadow: var(--store-shadow-control, 0 1px 2px rgba(15, 23, 42, 0.05));
    transition: border-color var(--store-transition-fast, 0.2s), box-shadow var(--store-transition-fast, 0.2s);
}

#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus,
#commentform select:focus,
#commentform textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#commentform select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 18px;
    padding-right: 40px;
}

#commentform textarea {
    min-height: 120px;
    resize: vertical;
}

.store-product-reviews__submit-btn {
    align-self: flex-start;
    min-height: 44px;
    padding: 0 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    cursor: pointer;
}

/* Dark mode overrides for review form */
html[data-store-theme="dark"] .store-product-reviews__form-container,
html[data-store-theme="dark"] .store-product-reviews__form-container {
    border-color: #334155;
}

html[data-store-theme="dark"] .store-product-reviews__form-title,
html[data-store-theme="dark"] .store-product-reviews__form-title {
    color: #f8fafc !important;
}

html[data-store-theme="dark"] #commentform label,
html[data-store-theme="dark"] #commentform label {
    color: #e2e8f0 !important;
}

html[data-store-theme="dark"] #commentform input[type="text"],
html[data-store-theme="dark"] #commentform input[type="email"],
html[data-store-theme="dark"] #commentform select,
html[data-store-theme="dark"] #commentform textarea,
html[data-store-theme="dark"] #commentform input[type="text"],
html[data-store-theme="dark"] #commentform input[type="email"],
html[data-store-theme="dark"] #commentform select,
html[data-store-theme="dark"] #commentform textarea,
html[data-store-theme="dark"] #commentform input[type="text"],
html[data-store-theme="dark"] #commentform input[type="email"],
html[data-store-theme="dark"] #commentform select,
html[data-store-theme="dark"] #commentform textarea {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

