/**
 * Single Product — Polish Layer (v1.4.4)
 *
 * Fixes:
 *   - Spec pill font unification (both value + label = sans-serif)
 *   - 14 UI polish improvements identified in audit
 *   - Hover states, animations, gradients, better depth
 *
 * Loads AFTER single-product-tanishq.css.
 */

/* =====================================================================
 * 0. HEADER ALIGNMENT — constrain Ecomus's overflowing top bar
 * =================================================================== */

body.jw-single-product .site-header .container,
body.jw-single-product .site-header .header-inner,
body.jw-single-product .site-header > .row,
body.jw-single-product .site-header .flex-header {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

/* =====================================================================
 * 1. SPEC PILL FONT FIX
 *    Value AND label both sans-serif for visual consistency.
 * =================================================================== */

body.jw-single-product .jw-summary__spec-pills {
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--jw-ivory) 0%, #fff 100%);
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(26,26,26,0.02);
    transition: box-shadow 300ms var(--jw-ease);
}
body.jw-single-product .jw-summary__spec-pills:hover {
    box-shadow: inset 0 1px 2px rgba(26,26,26,0.03), 0 4px 16px rgba(184,147,90,0.08);
}

body.jw-single-product .jw-spec-pill__value {
    font-family: var(--jw-font-sans) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    color: var(--jw-charcoal) !important;
}
body.jw-single-product .jw-spec-pill__label {
    font-family: var(--jw-font-sans) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.06em !important;
    color: var(--jw-charcoal-50) !important;
    text-transform: lowercase !important;
}
body.jw-single-product .jw-spec-pill__icon {
    width: 12px;
    height: 12px;
    transition: transform 300ms var(--jw-ease);
}
body.jw-single-product .jw-summary__spec-pills:hover .jw-spec-pill__icon {
    transform: scale(1.15);
}

/* =====================================================================
 * 2. PRODUCT CARDS — premium hover (Related + Recently Viewed + Wishlist)
 * =================================================================== */

.jw-pcard {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 350ms var(--jw-ease);
}
.jw-pcard__media {
    position: relative;
    aspect-ratio: 4/5;
    background: var(--jw-ivory);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(26,26,26,0.04);
    transition: box-shadow 400ms var(--jw-ease), transform 400ms var(--jw-ease);
}
.jw-pcard__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26,26,26,0) 60%, rgba(26,26,26,0.08) 100%);
    opacity: 0;
    transition: opacity 400ms var(--jw-ease);
    pointer-events: none;
}
.jw-pcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 800ms var(--jw-ease);
}
.jw-pcard:hover .jw-pcard__media {
    box-shadow: 0 20px 40px rgba(26,26,26,0.10), 0 4px 12px rgba(184,147,90,0.08);
    transform: translateY(-3px);
}
.jw-pcard:hover .jw-pcard__media::after { opacity: 1; }
.jw-pcard:hover .jw-pcard__media img { transform: scale(1.06); }

.jw-pcard__title {
    font-family: var(--jw-font-serif);
    font-size: 16px;
    font-weight: 500;
    color: var(--jw-charcoal);
    margin: 0 0 4px;
    line-height: 1.35;
    letter-spacing: -0.005em;
    transition: color 250ms var(--jw-ease);
}
.jw-pcard:hover .jw-pcard__title { color: var(--jw-champagne-d); }
.jw-pcard__price {
    font-size: 13px;
    color: var(--jw-charcoal-70);
    font-family: var(--jw-font-mono);
}
.jw-pcard__price .amount,
.jw-pcard__price .woocommerce-Price-amount {
    color: var(--jw-charcoal);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.jw-pcard__price del { color: var(--jw-charcoal-30); margin-right: 8px; font-size: 11px; }
.jw-pcard__price ins {
    background: transparent;
    color: var(--jw-charcoal);
    text-decoration: none;
    font-weight: 700;
}

/* Handle out-of-stock badge more elegantly */
.jw-pcard__media .outofstock-badge,
.jw-pcard__media .onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    background: rgba(26,26,26,0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 4px;
    z-index: 2;
    font-family: var(--jw-font-sans);
}
.jw-pcard__media .onsale {
    background: var(--jw-champagne);
    left: auto;
    right: 12px;
}

/* =====================================================================
 * 3. SIZE PILLS — champagne glow on hover, animated selection
 * =================================================================== */

body.jw-single-product .jw-size-pill { transition: transform 200ms var(--jw-ease); }
body.jw-single-product .jw-size-pill:hover { transform: translateY(-2px); }
body.jw-single-product .jw-size-pill__value {
    transition: all 200ms var(--jw-ease);
    box-shadow: 0 0 0 0 rgba(184,147,90,0);
}
body.jw-single-product .jw-size-pill:hover .jw-size-pill__value {
    border-color: var(--jw-champagne) !important;
    color: var(--jw-champagne-d) !important;
    background: rgba(184,147,90,0.05) !important;
    box-shadow: 0 4px 12px rgba(184,147,90,0.12);
}
body.jw-single-product .jw-size-pill__input:checked + .jw-size-pill__value {
    background: linear-gradient(135deg, var(--jw-charcoal) 0%, #2a2a2a 100%) !important;
    color: var(--jw-ivory) !important;
    border-color: var(--jw-charcoal) !important;
    box-shadow: 0 6px 16px rgba(26,26,26,0.20), inset 0 1px 0 rgba(255,255,255,0.08) !important;
    transform: translateY(-1px);
}
body.jw-single-product .jw-size-pill__input:focus-visible + .jw-size-pill__value {
    outline: 2px solid var(--jw-champagne);
    outline-offset: 2px;
}

/* =====================================================================
 * 4. GALLERY THUMBS — better active state
 * =================================================================== */

body.jw-single-product .jw-gallery__thumb {
    transition: all 300ms var(--jw-ease);
    box-shadow: 0 0 0 0 rgba(184,147,90,0);
}
body.jw-single-product .jw-gallery__thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26,26,26,0.10);
    opacity: 1;
}
body.jw-single-product .jw-gallery__thumb.is-active {
    border-color: var(--jw-champagne) !important;
    box-shadow: 0 4px 12px rgba(184,147,90,0.20), 0 0 0 3px rgba(184,147,90,0.10);
}

/* =====================================================================
 * 5. DELIVERY CARD — animated focus + colored icon states
 * =================================================================== */

.jw-delivery-card {
    transition: border-color 300ms var(--jw-ease), box-shadow 300ms var(--jw-ease);
}
.jw-delivery-card:focus-within {
    border-color: rgba(184,147,90,0.3);
    box-shadow: 0 8px 24px rgba(184,147,90,0.08);
}
.jw-delivery-card__pincode-wrap {
    transition: border-color 250ms var(--jw-ease), background 250ms var(--jw-ease);
}
.jw-delivery-card__pincode-wrap:focus-within {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(184,147,90,0.15);
}
.jw-delivery-card__pin-icon {
    transition: color 250ms var(--jw-ease), transform 250ms var(--jw-ease);
}
.jw-delivery-card__pincode-wrap:focus-within .jw-delivery-card__pin-icon {
    color: var(--jw-champagne-d);
    transform: scale(1.1);
}
.jw-delivery-card__check {
    padding: 10px 6px !important;
    border-radius: 6px;
    transition: all 250ms var(--jw-ease);
}
.jw-delivery-card__check:hover {
    background: rgba(184,147,90,0.06);
    padding-left: 12px !important;
    padding-right: 12px !important;
}
.jw-delivery-card__result {
    animation: jwFadeSlideUp 300ms var(--jw-ease);
    border-left: 3px solid var(--jw-champagne);
}
.jw-delivery-card__result.is-error { border-left-color: var(--jw-danger); }

@keyframes jwFadeSlideUp {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
 * 6. OFFER CARD — subtle animated shimmer + interactive copy button
 * =================================================================== */

.jw-offer-card {
    position: relative;
    overflow: hidden;
    transition: border-color 300ms var(--jw-ease), box-shadow 300ms var(--jw-ease);
}
.jw-offer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(184,147,90,0.06) 50%,
        transparent 100%);
    animation: jwShimmer 4s ease-in-out infinite;
    pointer-events: none;
}
.jw-offer-card:hover {
    border-color: var(--jw-champagne-d);
    box-shadow: 0 6px 20px rgba(184,147,90,0.10);
}
@keyframes jwShimmer {
    0%   { left: -100%; }
    50%  { left: 100%; }
    100% { left: 100%; }
}
.jw-offer-card__icon {
    transition: transform 350ms var(--jw-ease);
}
.jw-offer-card:hover .jw-offer-card__icon { transform: rotate(-8deg) scale(1.08); }

.jw-offer-card__code {
    transition: all 250ms var(--jw-ease);
}
.jw-offer-card__code:hover {
    border-color: var(--jw-champagne-d);
    background: #fff;
}
.jw-offer-card__copy {
    transition: all 200ms var(--jw-ease);
}
.jw-offer-card__copy:active { transform: scale(0.95); }

/* =====================================================================
 * 7. EMI BLOCK — gradient background + badge icon
 * =================================================================== */

body.jw-single-product .jw-emi {
    background: linear-gradient(135deg, #fff 0%, var(--jw-ivory) 100%);
    border-color: var(--jw-charcoal-10);
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(26,26,26,0.02);
    transition: box-shadow 300ms var(--jw-ease);
}
body.jw-single-product .jw-emi:hover {
    box-shadow: 0 6px 16px rgba(184,147,90,0.08);
}
body.jw-single-product .jw-emi__icon {
    padding: 6px;
    background: rgba(184,147,90,0.10);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    color: var(--jw-champagne-d);
}

/* =====================================================================
 * 8. ASSURANCE BADGES — icon in champagne circles + hover
 * =================================================================== */

body.jw-single-product .jw-assurance__item {
    padding: 4px 0;
    transition: transform 250ms var(--jw-ease);
}
body.jw-single-product .jw-assurance__item:hover { transform: translateY(-2px); }
body.jw-single-product .jw-assurance__icon {
    padding: 6px;
    background: rgba(184,147,90,0.08);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    box-shadow: inset 0 0 0 1px rgba(184,147,90,0.15);
    transition: all 300ms var(--jw-ease);
}
body.jw-single-product .jw-assurance__item:hover .jw-assurance__icon {
    background: var(--jw-champagne);
    color: #fff;
    box-shadow: inset 0 0 0 1px transparent, 0 4px 12px rgba(184,147,90,0.25);
}

/* =====================================================================
 * 9. SIZE GUIDE CARD — micro-interactions
 * =================================================================== */

.jw-size-guide-card {
    position: relative;
    overflow: hidden;
}
.jw-size-guide-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(184,147,90,0.05) 100%);
    opacity: 0;
    transition: opacity 300ms var(--jw-ease);
}
.jw-size-guide-card:hover::before { opacity: 1; }
.jw-size-guide-card__icon {
    transition: all 300ms var(--jw-ease);
}
.jw-size-guide-card:hover .jw-size-guide-card__icon {
    background: var(--jw-champagne);
    color: #fff;
    border-color: var(--jw-champagne);
    transform: rotate(-4deg);
}

/* =====================================================================
 * 10. ACCORDION — smoother transitions, tinted open state
 * =================================================================== */

.jw-accordion__item {
    transition: background 300ms var(--jw-ease), box-shadow 300ms var(--jw-ease), border-color 300ms var(--jw-ease);
}
.jw-accordion__item:hover:not([open]) {
    background: #fff;
    border-color: rgba(184,147,90,0.2);
}
.jw-accordion__item[open] {
    background: linear-gradient(180deg, #fff 0%, var(--jw-ivory) 100%);
    border-color: var(--jw-champagne-l);
    box-shadow: 0 4px 20px rgba(26,26,26,0.05);
}
.jw-accordion__icon {
    transition: all 350ms var(--jw-ease);
}
.jw-accordion__item[open] .jw-accordion__icon {
    background: linear-gradient(135deg, var(--jw-burgundy) 0%, var(--jw-burgundy-l) 100%);
    box-shadow: 0 4px 12px rgba(124,45,42,0.25);
}
.jw-accordion__body {
    animation: jwAccordionOpen 350ms var(--jw-ease);
}
@keyframes jwAccordionOpen {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.jw-accordion__grid dd {
    position: relative;
    display: inline-block;
}
.jw-accordion__grid dt {
    color: var(--jw-charcoal-50);
    transition: color 200ms var(--jw-ease);
}
.jw-accordion__item[open] .jw-accordion__grid dt { color: var(--jw-champagne-d); }

/* =====================================================================
 * 11. PRICE BREAKUP TABLE — row hover + zebra tint
 * =================================================================== */

.jw-breakup-table tbody tr {
    transition: background 200ms var(--jw-ease);
}
.jw-breakup-table tbody tr:not(.jw-breakup-table__row-subtotal):hover {
    background: rgba(184,147,90,0.04);
}
.jw-breakup-table tbody tr:nth-child(even):not(.jw-breakup-table__row-subtotal):not(:hover) {
    background: rgba(26,26,26,0.015);
}
.jw-breakup-table__dot {
    transition: transform 300ms var(--jw-ease);
}
.jw-breakup-table tr:hover .jw-breakup-table__dot { transform: scale(1.15); }

.jw-breakup-table__row-total td {
    background: linear-gradient(135deg, var(--jw-charcoal) 0%, #2a2a2a 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.jw-breakup-table__value--final {
    background: linear-gradient(135deg, var(--jw-champagne-l) 0%, var(--jw-champagne) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
    font-weight: 600 !important;
}

/* =====================================================================
 * 12. DETAILS SECTION — golden gradient divider, better rhythm
 * =================================================================== */

.jw-details-section {
    position: relative;
    background: linear-gradient(180deg, #fff 0%, var(--jw-ivory) 40%, #fff 100%);
    border-top: 0 !important;
}
.jw-details-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--jw-champagne) 50%,
        transparent 100%);
}
.jw-details-section__title {
    position: relative;
    padding-bottom: 16px;
}
.jw-details-section__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--jw-champagne-l), var(--jw-champagne));
    border-radius: 2px;
}

/* Toggle enhancement */
.jw-details-tabs {
    transition: box-shadow 300ms var(--jw-ease);
}
.jw-details-tabs:hover {
    box-shadow: inset 0 1px 2px rgba(26,26,26,0.04), 0 4px 16px rgba(124,45,42,0.06);
}
.jw-details-tabs__btn.is-active {
    background: linear-gradient(135deg, var(--jw-burgundy) 0%, var(--jw-burgundy-d) 100%) !important;
    box-shadow: 0 4px 12px rgba(124,45,42,0.30), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

/* Right aside: image + service badge polish */
.jw-details-section__image {
    box-shadow: 0 4px 24px rgba(26,26,26,0.06);
    transition: box-shadow 400ms var(--jw-ease), transform 400ms var(--jw-ease);
}
.jw-details-section__image:hover {
    box-shadow: 0 20px 48px rgba(26,26,26,0.10);
    transform: translateY(-3px);
}
.jw-details-section__image img {
    transition: transform 800ms var(--jw-ease);
}
.jw-details-section__image:hover img {
    transform: scale(1.03);
}
.jw-details-section__service {
    background: linear-gradient(135deg, var(--jw-ivory) 0%, #fff 100%);
}

/* =====================================================================
 * 13. RELATED / RECENTLY VIEWED — section spacing + title emphasis
 * =================================================================== */

.jw-related,
.jw-recently-viewed {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}
.jw-related .jw-section-head,
.jw-recently-viewed .jw-section-head {
    margin-bottom: 32px;
    text-align: center;
}
.jw-related .jw-eyebrow,
.jw-recently-viewed .jw-eyebrow {
    display: block;
    margin-bottom: 8px;
}
.jw-related .jw-section-title,
.jw-recently-viewed .jw-section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}
.jw-related .jw-section-title::after,
.jw-recently-viewed .jw-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--jw-champagne-l), var(--jw-champagne));
    border-radius: 2px;
}
.jw-pcard-grid {
    gap: 28px;
}
@media (max-width: 768px) {
    .jw-pcard-grid { gap: 16px; grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
 * 14. BUTTONS — subtle gradient + hover lift
 * =================================================================== */

body.jw-single-product .jw-btn--primary {
    background: linear-gradient(135deg, var(--jw-charcoal) 0%, #2a2a2a 100%);
    box-shadow: 0 2px 8px rgba(26,26,26,0.12), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: all 300ms var(--jw-ease);
}
body.jw-single-product .jw-btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    box-shadow: 0 8px 24px rgba(26,26,26,0.24), inset 0 1px 0 rgba(255,255,255,0.08);
    transform: translateY(-2px);
}
body.jw-single-product .jw-btn--primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26,26,26,0.16);
}

body.jw-single-product .jw-btn--secondary {
    transition: all 300ms var(--jw-ease);
    background: #fff;
}
body.jw-single-product .jw-btn--secondary:hover:not(:disabled) {
    background: var(--jw-charcoal);
    color: var(--jw-ivory);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,26,26,0.18);
}

/* Wishlist heart pulse when active */
body.jw-single-product .jw-wishlist-btn.is-active {
    background: linear-gradient(135deg, var(--jw-champagne-l) 0%, var(--jw-champagne) 100%);
    border-color: var(--jw-champagne);
    box-shadow: 0 4px 12px rgba(184,147,90,0.28);
    animation: jwHeartPop 400ms var(--jw-ease);
}
@keyframes jwHeartPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Share button hover */
body.jw-single-product .jw-share-btn:hover {
    background: var(--jw-charcoal);
    color: var(--jw-ivory);
    border-color: var(--jw-charcoal);
    transform: translateY(-1px);
}

/* =====================================================================
 * 15. UNIFIED FOCUS RING (accessibility)
 * =================================================================== */

body.jw-single-product *:focus-visible {
    outline: 2px solid var(--jw-champagne) !important;
    outline-offset: 3px !important;
    border-radius: 4px;
}

body.jw-single-product input:focus-visible,
body.jw-single-product select:focus-visible,
body.jw-single-product textarea:focus-visible {
    outline: none !important;
}

/* =====================================================================
 * 16. PRICE BLOCK — richer emphasis
 * =================================================================== */

body.jw-single-product .jw-price-block {
    padding: 20px 0;
}
body.jw-single-product .jw-price-block__final {
    background: linear-gradient(135deg, var(--jw-charcoal) 0%, #333 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
body.jw-single-product .jw-price-block__savings {
    animation: jwSubtlePulse 2.5s ease-in-out infinite;
}
@keyframes jwSubtlePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(75,123,74,0); }
    50%      { opacity: 0.94; box-shadow: 0 0 0 4px rgba(75,123,74,0.06); }
}
body.jw-single-product .jw-price-block__breakup-link:hover {
    color: var(--jw-champagne);
}

/* =====================================================================
 * 17. QUANTITY STEPPER — cleaner interactions
 * =================================================================== */

body.jw-single-product .jw-qty__stepper { overflow: hidden; }
body.jw-single-product .jw-qty__btn {
    transition: all 200ms var(--jw-ease);
}
body.jw-single-product .jw-qty__btn:hover {
    background: var(--jw-charcoal);
    color: var(--jw-ivory);
}

/* =====================================================================
 * 18. STICKY MOBILE BAR — richer shadow + backdrop blur
 * =================================================================== */

body.jw-single-product .jw-sticky-bar {
    background: rgba(255,255,255,0.96) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(26,26,26,0.06) !important;
    box-shadow: 0 -12px 40px rgba(26,26,26,0.10) !important;
}

/* =====================================================================
 * 19. SUMMARY HEADER — hover on icon actions
 * =================================================================== */

body.jw-single-product .jw-summary__title {
    transition: color 250ms var(--jw-ease);
}
body.jw-single-product .jw-summary__collection {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(184,147,90,0.08);
    border-radius: 100px;
    color: var(--jw-champagne-d) !important;
    font-size: 10px !important;
    letter-spacing: 0.18em !important;
}

/* =====================================================================
 * 20. RESPONSIVE FIXES
 * =================================================================== */

@media (max-width: 768px) {
    body.jw-single-product .jw-summary__spec-pills {
        padding: 10px 14px;
        gap: 10px;
    }
    body.jw-single-product .jw-spec-pill__value { font-size: 15px !important; }
    .jw-details-section__title::after,
    .jw-related .jw-section-title::after,
    .jw-recently-viewed .jw-section-title::after {
        width: 32px;
    }
}
