/* ==========================================================================
   EMJOY PRODUCT PAGE
   ========================================================================== */

/* ==========================================================================
   PRODUCT LAYOUT
   ========================================================================== */

.em-product {
    padding: var(--sp-8) 0 var(--sp-16);
}

.em-product__layout {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: var(--sp-14);
    align-items: start;
}

@media (max-width: 1023px) {
    .em-product__layout {
        grid-template-columns: 1fr;
        gap: var(--sp-8);
    }
}

/* ==========================================================================
   PRODUCT GALLERY
   ========================================================================== */

.em-product-gallery {
    position: sticky;
    top: calc(var(--sp-16) + var(--sp-4));
}

.em-product-gallery__wrapper {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface-card);
}

.em-product-gallery__wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.woocommerce-product-gallery__image--placeholder {
    aspect-ratio: 1;
    background: var(--surface-brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gallery Navigation */
.em-product-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.em-product-gallery__nav--prev {
    left: var(--sp-4);
}

.em-product-gallery__nav--next {
    right: var(--sp-4);
}

.em-product-gallery__nav button {
    width: var(--tap-min);
    height: var(--tap-min);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    border: none;
    border-radius: var(--r-full);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--dur-fast);
}

.em-product-gallery__nav button:hover {
    background: var(--surface-brand);
    color: var(--em-white);
}

/* Thumbnails */
.em-product-gallery__thumbs-wrapper {
    padding: var(--sp-4) 0 0;
}

.em-product-gallery__thumbs {
    display: flex;
    gap: var(--sp-3);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.em-product-gallery__thumbs::-webkit-scrollbar {
    height: 4px;
}

.em-product-gallery__thumbs::-webkit-scrollbar-track {
    background: var(--border-subtle);
    border-radius: var(--r-full);
}

.em-product-gallery__thumbs::-webkit-scrollbar-thumb {
    background: var(--surface-brand);
    border-radius: var(--r-full);
}

.em-product-gallery__thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--r-md);
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color var(--dur-fast);
}

.em-product-gallery__thumb.is-active {
    border-color: var(--surface-brand);
}

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

.em-product-gallery__thumb:hover {
    border-color: var(--surface-accent);
}

/* Embroidery Preview */
.em-product-gallery__embroidery-preview {
    position: absolute;
    bottom: var(--sp-4);
    right: var(--sp-4);
    background: var(--surface-card);
    border-radius: var(--r-lg);
    padding: var(--sp-3);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.em-product-gallery__embroidery-label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    margin-bottom: var(--sp-2);
}

.em-product-gallery__embroidery-label .em-icon {
    width: 14px;
    height: 14px;
    color: var(--surface-accent);
}

.em-product-gallery__embroidery-canvas {
    width: 120px;
    height: 120px;
    background: var(--surface-brand-soft);
    border-radius: var(--r-md);
}

/* ==========================================================================
   PRODUCT VIDEO GALLERY
   ========================================================================== */

/* Video Slide */
.em-product-gallery__video-slide {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--text-inverse);
}

.em-product-gallery__video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.em-product-gallery__video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.em-product-gallery__video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-brand-soft);
}

.em-product-gallery__video-placeholder .em-icon {
    width: 80px;
    height: 80px;
    color: var(--surface-brand);
    opacity: 0.5;
}

/* Video Play Button (on thumbnail) */
.em-product-gallery__video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-brand);
    border: none;
    border-radius: var(--r-full);
    cursor: pointer;
    transition: all var(--dur-fast);
    box-shadow: 0 4px 20px rgba(0, 56, 160, 0.4);
}

.em-product-gallery__video-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 56, 160, 0.5);
}

.em-product-gallery__video-play .em-icon {
    width: 24px;
    height: 24px;
    color: var(--em-white);
    margin-left: 4px; /* Visual centering for play icon */
}

/* Video Thumbnail in Thumbnails Bar */
.em-product-gallery__thumb[data-type="video"] {
    position: relative;
}

.em-product-gallery__video-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-brand-soft);
}

.em-product-gallery__video-thumb-placeholder .em-icon {
    width: 24px;
    height: 24px;
    color: var(--surface-brand);
}

.em-product-gallery__video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-brand);
    border-radius: var(--r-full);
    box-shadow: 0 2px 8px rgba(0, 56, 160, 0.3);
}

.em-product-gallery__video-badge .em-icon {
    width: 12px;
    height: 12px;
    color: var(--em-white);
    margin-left: 2px;
}

/* Active Video Thumbnail */
.em-product-gallery__thumb.is-active[data-type="video"] {
    border-color: var(--surface-brand);
}

/* ==========================================================================
   VIDEO MODAL
   ========================================================================== */

.em-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--dur-base);
}

.em-video-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.em-video-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.em-video-modal__content {
    position: relative;
    width: 90%;
    max-width: 900px;
    animation: videoModalIn 0.3s ease-out;
}

@keyframes videoModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.em-video-modal__close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--r-full);
    color: var(--em-white);
    cursor: pointer;
    transition: all var(--dur-fast);
}

.em-video-modal__close:hover {
    background: var(--em-white);
    color: var(--text-inverse);
}

.em-video-modal__close .em-icon {
    width: 20px;
    height: 20px;
}

.em-video-modal__video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--r-lg);
    overflow: hidden;
}

.em-video-modal__video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Mobile Video Modal */
@media (max-width: 767px) {
    .em-video-modal__content {
        width: 95%;
    }

    .em-video-modal__video-wrapper {
        border-radius: var(--r-md);
    }

    .em-video-modal__close {
        top: -44px;
        width: 36px;
        height: 36px;
    }
}

/* Fullscreen Video Option */
.em-video-modal__fullscreen {
    position: absolute;
    bottom: var(--sp-4);
    right: var(--sp-4);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--r-md);
    color: var(--em-white);
    cursor: pointer;
    transition: all var(--dur-fast);
}

.em-video-modal__fullscreen:hover {
    background: rgba(255, 255, 255, 0.2);
}

.em-video-modal__fullscreen .em-icon {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   PRODUCT SUMMARY
   ========================================================================== */

.em-product-summary {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

/* Title */
.woocommerce-product-gallery ~ .em-product-summary .product_title,
.em-product-summary .product_title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    color: var(--text-strong);
    line-height: 1.2;
    margin: 0;
}

/* Rating */
.em-product-summary .woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.em-product-summary .star-rating {
    color: var(--surface-accent);
}

/* Price */
.em-product-price {
    display: flex;
    align-items: baseline;
    gap: var(--sp-3);
}

.em-product-price__current {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    color: var(--price-color);
}

.em-product-price__original {
    font-size: var(--fs-h4);
    color: var(--price-compare);
    text-decoration: line-through;
}

.em-price-tag__prefix {
    color: var(--text-body);
    font-size: 14px;
    font-weight: var(--fw-semibold);
}

.em-price-tag.has-selected-variation .price {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
}

.em-price-tag.has-selected-variation del {
    color: var(--price-compare);
    font-size: 16px;
    opacity: 1;
}

.em-price-tag.has-selected-variation ins {
    color: var(--price-color);
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
    text-decoration: none;
}

/* WooCommerce returns a bare amount for a regular-price variation instead of
   wrapping it in .price or ins. Keep that server-rendered/JS-updated markup
   visually consistent with .em-price-tag__current. */
.em-price-tag.has-selected-variation > .woocommerce-Price-amount {
    color: var(--em-blue-700);
    font-size: 28px;
    font-weight: 700;
}

/* Short Description */
.em-product-summary .woocommerce-product-details__short-description {
    font-size: var(--fs-body);
    color: var(--text-body);
    line-height: var(--lh-loose);
}

.em-product-summary .woocommerce-product-details__short-description p {
    margin: 0;
}

/* ==========================================================================
   EMBROIDERY CUSTOMIZER
   ========================================================================== */

.em-embroidery-customizer {
    background: var(--surface-brand-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
    margin-top: var(--sp-2);
}

.em-embroidery-customizer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-4);
}

/* Toggle */
.em-embroidery-customizer__toggle {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    cursor: pointer;
}

.em-embroidery-customizer__toggle input {
    display: none;
}

.em-embroidery-customizer__toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-subtle);
    border-radius: var(--r-full);
    transition: background-color var(--dur-fast);
}

.em-embroidery-customizer__toggle input:checked + .em-embroidery-customizer__toggle-track {
    background: var(--surface-brand);
}

.em-embroidery-customizer__toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--em-white);
    border-radius: 50%;
    transition: transform var(--dur-fast);
}

.em-embroidery-customizer__toggle input:checked + .em-embroidery-customizer__toggle-track::after {
    transform: translateX(20px);
}

.em-embroidery-customizer__toggle-label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-display);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
}

.em-embroidery-customizer__toggle-label .em-icon {
    width: 18px;
    height: 18px;
    color: var(--surface-accent);
}

.em-embroidery-customizer__fee {
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--price-color);
}

/* Options */
.em-embroidery-customizer__options {
    display: grid;
    gap: var(--sp-5);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-subtle);
}

.em-embroidery-customizer__options:not(.is-active) {
    display: none;
}

.em-embroidery-customizer__field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.em-embroidery-customizer__label {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
}

.em-embroidery-customizer__label-hint {
    font-weight: var(--fw-normal);
    color: var(--text-muted);
}

.em-embroidery-customizer__input-wrap {
    position: relative;
}

.em-embroidery-customizer__input {
    width: 100%;
    padding-right: var(--sp-12);
}

.em-embroidery-customizer__char-count {
    position: absolute;
    right: var(--sp-3);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--fs-caption);
    color: var(--text-muted);
}

.em-embroidery-customizer__hint {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-caption);
    color: var(--text-muted);
    margin: 0;
}

.em-embroidery-customizer__hint .em-icon {
    width: 14px;
    height: 14px;
}

.em-embroidery-customizer__preview-note {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
    padding: var(--sp-3);
    background: var(--surface-card);
    border-radius: var(--r-md);
    font-size: var(--fs-caption);
    color: var(--text-muted);
}

.em-embroidery-customizer__preview-note .em-icon {
    width: 16px;
    height: 16px;
    color: var(--surface-brand);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Font Picker */
.em-font-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-2);
}

.em-font-picker__option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-3);
    background: var(--surface-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all var(--dur-fast);
}

.em-font-picker__option:hover {
    border-color: var(--border-brand);
}

.em-font-picker__option.is-active {
    border-color: var(--surface-brand);
    background: var(--surface-brand-soft);
}

.em-font-picker__preview {
    font-size: var(--fs-h4);
}

.em-font-picker__name {
    font-size: var(--fs-micro);
    color: var(--text-muted);
}

/* Thread Color Picker */
.em-thread-picker {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

.em-thread-picker__option {
    width: 36px;
    height: 36px;
    padding: 2px;
    background: transparent;
    border: 2px solid var(--border-subtle);
    border-radius: var(--r-full);
    cursor: pointer;
    transition: all var(--dur-fast);
}

.em-thread-picker__option:hover {
    transform: scale(1.1);
}

.em-thread-picker__option.is-active {
    border-color: var(--surface-brand);
}

.em-thread-picker__swatch {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
}

/* Placement Picker */
.em-placement-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-2);
}

.em-placement-picker__option {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    padding: var(--sp-3);
    background: var(--surface-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--r-md);
    cursor: pointer;
    text-align: left;
    transition: all var(--dur-fast);
}

.em-placement-picker__option:hover {
    border-color: var(--border-brand);
}

.em-placement-picker__option.is-active {
    border-color: var(--surface-brand);
    background: var(--surface-brand-soft);
}

.em-placement-picker__name {
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
}

.em-placement-picker__desc {
    font-size: var(--fs-caption);
    color: var(--text-muted);
}

/* ==========================================================================
   PRODUCT META
   ========================================================================== */

.em-product__meta {
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-subtle);
}

.em-product__meta .product_meta {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    font-size: var(--fs-caption);
    color: var(--text-muted);
}

.em-product__meta .product_meta span {
    display: flex;
    gap: var(--sp-2);
}

.em-product__meta .product_meta span strong {
    color: var(--text-body);
}

/* ==========================================================================
   TRUST BADGES
   ========================================================================== */

.em-trust-badges {
    padding: var(--sp-4);
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
}

.em-trust-badges__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
}

.em-trust-badge {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.em-trust-badge .em-icon {
    width: 24px;
    height: 24px;
    color: var(--surface-brand);
    flex-shrink: 0;
}

.em-trust-badge__content {
    display: flex;
    flex-direction: column;
}

.em-trust-badge__content strong {
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
}

.em-trust-badge__content span {
    font-size: var(--fs-caption);
    color: var(--text-muted);
}

.em-trust-badges__payment {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-top: var(--sp-4);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-subtle);
    font-size: var(--fs-caption);
    color: var(--text-muted);
}

.em-trust-badges__payment-icons {
    display: flex;
    gap: var(--sp-3);
}

.em-payment-icon {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
}

.em-payment-icon .em-icon {
    width: 14px;
    height: 14px;
}

@media (max-width: 767px) {
    .em-trust-badges__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PRODUCT TABS
   ========================================================================== */

.em-product-tabs {
    margin-top: var(--sp-16);
    padding-top: var(--sp-8);
    border-top: 1px solid var(--border-subtle);
}

.em-product-tabs__nav {
    display: flex;
    gap: var(--sp-1);
    border-bottom: 2px solid var(--border-subtle);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.em-product-tabs__tab {
    flex-shrink: 0;
    padding: var(--sp-3) var(--sp-5);
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all var(--dur-fast);
    white-space: nowrap;
}

.em-product-tabs__tab:hover {
    color: var(--text-body);
}

.em-product-tabs__tab.is-active {
    color: var(--text-link);
    border-bottom-color: var(--surface-brand);
}

.em-product-tabs__content {
    padding-top: var(--sp-6);
}

.em-product-tabs__panel {
    display: none;
}

.em-product-tabs__panel.is-active {
    display: block;
}

.em-product-tabs__panel-title {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    color: var(--text-strong);
    margin: 0 0 var(--sp-5);
}

/* Product Description */
.em-product-description {
    max-width: 720px;
}

.em-product-description p {
    font-size: var(--fs-body);
    line-height: var(--lh-loose);
    color: var(--text-body);
}

.em-product-description .em-content-callout {
    margin: var(--sp-5) 0;
    padding: var(--sp-4) var(--sp-5);
    background: var(--surface-brand-soft);
    border: 1px solid var(--em-blue-200);
    border-left: 4px solid var(--surface-brand);
    border-radius: var(--r-sm);
}

.em-product-description .em-content-callout p {
    margin: 0;
}

.em-product-description h2,
.em-product-description h3 {
    font-family: var(--font-display);
    color: var(--text-strong);
    margin-top: var(--sp-6);
}

.em-product-description ul,
.em-product-description ol {
    padding-left: var(--sp-5);
}

.em-product-description li {
    line-height: var(--lh-loose);
    margin-bottom: var(--sp-2);
}

/* Product Features */
.em-product-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
    margin-top: var(--sp-8);
    padding: var(--sp-6);
    background: var(--surface-card);
    border-radius: var(--r-lg);
}

.em-product-feature {
    display: flex;
    gap: var(--sp-4);
}

.em-product-feature__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-brand-soft);
    border-radius: var(--r-md);
    flex-shrink: 0;
}

.em-product-feature__icon .em-icon {
    width: 24px;
    height: 24px;
    color: var(--surface-brand);
}

.em-product-feature__content {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.em-product-feature__title {
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
    margin: 0;
}

.em-product-feature__desc {
    font-size: var(--fs-caption);
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 767px) {
    .em-product-features {
        grid-template-columns: 1fr;
    }
}

/* Product Materials */
.em-product-materials {
    margin-top: var(--sp-8);
}

.em-product-materials__title {
    font-family: var(--font-display);
    font-size: var(--fs-h4);
    font-weight: var(--fw-bold);
    color: var(--text-strong);
    margin: 0 0 var(--sp-4);
}

.em-product-materials__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
}

.em-product-materials__item {
    display: flex;
    gap: var(--sp-2);
    padding: var(--sp-3);
    background: var(--surface-card);
    border-radius: var(--r-md);
    font-size: var(--fs-body-sm);
}

.em-product-materials__item strong {
    flex-shrink: 0;
    color: var(--text-muted);
}

@media (max-width: 767px) {
    .em-product-materials__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SIZE GUIDE
   ========================================================================== */

.em-size-guide {
    max-width: 720px;
}

.em-size-guide__title {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    color: var(--text-strong);
    margin: 0 0 var(--sp-4);
}

.em-size-guide__intro {
    font-size: var(--fs-body);
    color: var(--text-body);
    margin: 0 0 var(--sp-6);
}

.em-size-guide__chart {
    overflow-x: auto;
    margin-bottom: var(--sp-6);
}

.em-size-guide__table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-body-sm);
}

.em-size-guide__table th,
.em-size-guide__table td {
    padding: var(--sp-3) var(--sp-4);
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.em-size-guide__table th {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    background: var(--surface-brand-soft);
}

.em-size-guide__table td {
    color: var(--text-body);
}

.em-size-guide__table tr:hover td {
    background: var(--surface-brand-soft);
}

.em-size-guide__measure {
    margin-bottom: var(--sp-6);
}

.em-size-guide__measure h4 {
    font-family: var(--font-display);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
    margin: 0 0 var(--sp-3);
}

.em-size-guide__measure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
}

.em-size-guide__measure-item {
    display: flex;
    gap: var(--sp-2);
    font-size: var(--fs-body-sm);
}

.em-size-guide__measure-item strong {
    flex-shrink: 0;
    color: var(--text-muted);
}

.em-size-guide__tips {
    padding: var(--sp-4);
    background: var(--surface-brand-soft);
    border-radius: var(--r-md);
}

.em-size-guide__tip {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
    font-size: var(--fs-body-sm);
    color: var(--text-body);
}

.em-size-guide__tip .em-icon {
    width: 16px;
    height: 16px;
    color: var(--surface-brand);
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 767px) {
    .em-size-guide__measure-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SHIPPING INFO
   ========================================================================== */

.em-shipping-info {
    max-width: 720px;
}

.em-shipping-info__title {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    color: var(--text-strong);
    margin: 0 0 var(--sp-6);
}

.em-shipping-info__section {
    margin-bottom: var(--sp-6);
}

.em-shipping-info__section h4 {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-display);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
    margin: 0 0 var(--sp-3);
}

.em-shipping-info__section h4 .em-icon {
    width: 18px;
    height: 18px;
    color: var(--surface-brand);
}

.em-shipping-info__list {
    margin: 0;
    padding-left: var(--sp-6);
}

.em-shipping-info__list li {
    font-size: var(--fs-body-sm);
    color: var(--text-body);
    margin-bottom: var(--sp-2);
    line-height: var(--lh-body);
}

.em-shipping-info__list li strong {
    color: var(--text-strong);
}

.em-shipping-info__note {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
    padding: var(--sp-4);
    background: var(--surface-brand-soft);
    border-radius: var(--r-md);
    font-size: var(--fs-body-sm);
    color: var(--text-body);
}

.em-shipping-info__note .em-icon {
    width: 18px;
    height: 18px;
    color: var(--surface-brand);
    flex-shrink: 0;
    margin-top: 2px;
}

.em-shipping-info__note a {
    color: var(--text-link);
    font-weight: var(--fw-semibold);
}

/* ==========================================================================
   ADD TO CART BUTTON
   ========================================================================== */

.em-product-purchase {
    margin-top: var(--sp-6);
}

.em-product-purchase form.cart {
    display: grid;
    grid-template-columns: 112px minmax(160px, 1fr) minmax(160px, 1fr);
    gap: var(--sp-3);
    align-items: stretch;
}

.em-product-purchase .rsc-customizer-wrap,
.em-product-purchase .variations,
.em-product-purchase .single_variation_wrap,
.em-product-purchase .woocommerce-variation,
.em-product-purchase .woocommerce-variation-add-to-cart {
    grid-column: 1 / -1;
    width: 100%;
}

.em-product-purchase .rsc-customizer-wrap,
.em-product-purchase .variations,
.em-product-purchase .single_variation_wrap,
.em-product-purchase .woocommerce-variation {
    grid-column: 1 / -1;
}

/* The selected variation price is promoted to the primary price beside the title. */
.em-product-purchase .woocommerce-variation-price {
    display: none !important;
}

.em-product-purchase .woocommerce-variation-add-to-cart {
    display: grid;
    grid-template-columns: 112px minmax(160px, 1fr) minmax(160px, 1fr);
    gap: var(--sp-3);
}

.em-product-purchase table.variations,
.em-product-purchase table.variations tbody {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
}

.em-product-purchase table.variations tr {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--em-line);
}

.em-product-purchase table.variations th.label,
.em-product-purchase table.variations td.value {
    display: block;
    width: auto;
    padding: 0 !important;
    border: 0;
    background: transparent;
    text-align: left;
}

.em-product-purchase table.variations th.label label {
    display: block;
    margin: 0;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: var(--fw-semibold);
    line-height: 1.35;
}

.em-product-purchase table.variations td.value select {
    width: 100%;
    min-height: 46px;
    margin: 0;
}

.em-product-purchase table.variations .reset_variations {
    display: inline-block;
    margin-top: 5px;
    font-size: 12px;
}

.em-variation-display--swatch .em-product-purchase table.variations tr {
    display: block;
    padding: 0 0 18px;
    border-bottom: 0;
}

.em-variation-display--swatch .em-product-purchase table.variations th.label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.em-variation-display--swatch .em-product-purchase table.variations td.value {
    width: 100%;
}

/* PHP renders swatches with the initial HTML, so hide native selects before JS runs. */
.em-variation-display--swatch .em-product-purchase table.variations td.value > select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

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

.em-variation-current {
    color: var(--em-ink-3);
    font-weight: var(--fw-regular);
}

.em-variation-size-guide {
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--em-blue-700);
    font-size: 13px;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.em-variation-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.em-variation-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid var(--em-line-strong, var(--em-line));
    border-radius: var(--r-sm, 10px);
    background: var(--em-white);
    color: var(--text-strong);
    font-weight: var(--fw-semibold);
    cursor: pointer;
    font-size: 15px;
    transition: all var(--dur-fast, .18s) var(--ease-out, ease);
}

.em-variation-swatch:hover,
.em-variation-swatch.is-active {
    border-color: var(--em-blue-700);
}

.em-variation-swatch.is-active {
    background: var(--em-blue-700);
    color: var(--em-white);
}

.em-variation-swatches--color .em-variation-swatch {
    min-width: 36px;
    min-height: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--em-line-strong, var(--em-line));
    border-radius: 50%;
    background: var(--em-swatch-color);
}

.em-variation-swatches--color .em-variation-swatch > span {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.em-variation-swatches--color .em-variation-swatch.is-active {
    border: 2px solid var(--em-blue-700);
    background: var(--em-swatch-color);
    box-shadow: 0 0 0 3px rgba(0, 56, 160, .14);
}

.em-variation-swatches--color .em-variation-swatch.is-active > span::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--em-swatch-check-color, #fff);
    font-size: 14px;
    font-weight: 700;
}

.em-variation-swatch:disabled {
    opacity: .5;
    cursor: not-allowed;
    text-decoration: line-through;
}

.em-variation-display--swatch .reset_variations {
    display: none !important;
}

.em-product-purchase .em-quantity-control {
    display: grid;
    grid-template-columns: 34px minmax(36px, 1fr) 34px;
    min-height: 48px;
    margin: 0 !important;
    overflow: hidden;
    min-height: 48px;
    border: 1px solid var(--border-default);
    border-radius: var(--r-md);
    background: var(--em-white);
}

.em-product-purchase .em-quantity-control__button,
.em-product-purchase .em-quantity-control .qty {
    width: 100% !important;
    min-width: 0;
    min-height: 46px;
    padding: 0;
    border: 0 !important;
    background: transparent;
    text-align: center;
}

.em-product-purchase .em-quantity-control__button {
    color: var(--text-strong);
    font-size: 20px;
    cursor: pointer;
}

.em-product-purchase .single_add_to_cart_button,
.em-product-purchase .em-buy-now-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 var(--sp-6);
    border: 0;
    border-radius: var(--r-md);
    background: var(--surface-brand);
    color: var(--em-white);
    font-weight: var(--fw-bold);
    cursor: pointer;
}

.em-product-purchase .single_add_to_cart_button::before {
    content: '';
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

.em-product-purchase .em-buy-now-button {
    background: var(--text-strong);
}

.em-product-purchase .single_add_to_cart_button:hover,
.em-product-purchase .em-buy-now-button:hover {
    filter: brightness(0.92);
}

@media (max-width: 767px) {
    .em-product-purchase form.cart,
    .em-product-purchase .woocommerce-variation-add-to-cart {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .em-product-purchase .em-buy-now-button {
        grid-column: 1 / -1;
    }

    .em-product-purchase table.variations tr {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 8px;
    }
}

.single_add_to_cart_button {
    position: relative;
}

.single_add_to_cart_button.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.single_add_to_cart_button.is-added {
    background-color: var(--surface-brand) !important;
    color: var(--em-white) !important;
}

.em-product-purchase .added_to_cart.wc-forward.em-product-cart-notice {
    grid-column: 1 / -1;
    order: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    width: 100%;
    min-height: 44px;
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--border-brand);
    border-radius: var(--r-md);
    background: var(--surface-brand-soft);
    color: var(--surface-brand);
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

.em-product-purchase .em-product-cart-notice strong {
    font-weight: var(--fw-bold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.em-product-purchase .em-product-cart-notice:hover {
    border-color: var(--surface-brand);
    background: color-mix(in srgb, var(--surface-brand-soft) 82%, var(--surface-brand));
}

/* ==========================================================================
   RELATED PRODUCTS
   ========================================================================== */

.em-related-products {
    margin-top: var(--sp-16);
    padding-top: var(--sp-8);
    border-top: 1px solid var(--border-subtle);
}

.em-related-products__title {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    color: var(--text-strong);
    margin: 0 0 var(--sp-6);
}

.woocommerce div.product .related {
    padding: 0;
}

.woocommerce div.product .related h2 {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    color: var(--text-strong);
}

/* ========================================================================== 
   CURRENT SINGLE PRODUCT TEMPLATE 
   ========================================================================== */

/* Breadcrumb */
.em-breadcrumb {
    padding: 26px 0 0;
    font-size: 13.5px;
    color: var(--em-ink-4);
}
.em-breadcrumb a {
    color: var(--em-ink-4);
    text-decoration: none;
}
.em-breadcrumb a:hover { color: var(--em-blue-700); }
.em-breadcrumb span { color: var(--em-ink-2); }

/* Main Product Grid */
.em-product-main { padding: 24px 0 60px; }
.em-product-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: start;
}

/* Gallery */
.em-gallery {
    position: sticky;
    top: 96px;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
}
.em-gallery--side .em-gallery__thumbs-nav {
    grid-column: 1;
    grid-row: 1;
}
.em-gallery--side .em-gallery__main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}
.em-gallery__thumbs-nav {
    display: grid;
    grid-template-rows: 32px minmax(0, 1fr) 32px;
    gap: 8px;
    align-self: start;
}
.em-gallery__thumbs-viewport {
    max-height: 460px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    touch-action: pan-x;
}
.em-gallery__thumbs-viewport.is-dragging { cursor: grabbing; }
.em-gallery__thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 200ms ease;
}
.em-gallery__thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: var(--em-white);
    line-height: 0;
}
.em-gallery__thumb.is-active { border-color: var(--em-blue-700); }
.em-gallery__thumb img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.em-gallery__thumb-nav,
.em-gallery__main-nav,
.em-gallery__zoom,
.em-gallery-lightbox__nav,
.em-gallery-lightbox__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--em-line);
    background: rgba(255,255,255,.94);
    color: var(--em-blue-700);
    cursor: pointer;
    box-shadow: var(--em-shadow-sm);
    transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}
.em-gallery__thumb-nav { width: 84px; height: 32px; border-radius: 10px; }
.em-gallery__thumb-nav svg,
.em-gallery__main-nav svg,
.em-gallery__zoom svg,
.em-gallery-lightbox__nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.em-gallery--side .em-gallery__thumb-nav--prev svg { transform: rotate(90deg); }
.em-gallery--side .em-gallery__thumb-nav--next svg { transform: rotate(90deg); }
.em-gallery__thumb-nav:disabled { opacity: .35; cursor: default; }
.em-gallery__thumb-nav:not(:disabled):hover,
.em-gallery__main-nav:hover,
.em-gallery__zoom:hover { background: var(--em-blue-700); color: var(--em-white); }
.em-gallery__main {
    position: relative;
    border-radius: var(--em-radius-xl);
    overflow: hidden;
    background-color: var(--em-paper-2);
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}
.em-gallery__main.is-dragging { cursor: grabbing; }
.em-gallery__main img {
    width: 100%;
    aspect-ratio: 1500 / 1728;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.em-gallery__main-image-clone {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.em-gallery__main-nav,
.em-gallery__zoom {
    position: absolute;
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}
.em-gallery__main-nav { display: none; }
.em-gallery__main-nav { top: 50%; transform: translateY(-50%); }
.em-gallery__main-nav--prev { left: 14px; }
.em-gallery__main-nav--next { right: 14px; }
.em-gallery__zoom { right: 14px; bottom: 14px; }

/* Gallery Layout: Bottom (thumbnails below main image) */
.em-gallery--bottom {
    grid-template-columns: 1fr;
}
.em-gallery--bottom .em-gallery__thumbs-nav {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    grid-template-rows: 1fr;
    gap: 10px;
    order: 2;
    align-items: center;
}
.em-gallery--bottom .em-gallery__thumbs-viewport { max-height: none; overflow: hidden; }
.em-gallery--bottom .em-gallery__thumbs-viewport { touch-action: pan-y; }
.em-gallery--bottom .em-gallery__thumbs {
    display: flex;
    flex-direction: row;
    gap: 10px;
}
.em-gallery--bottom .em-gallery__thumb {
    flex-basis: calc((100% - 30px) / 4);
    width: calc((100% - 30px) / 4);
    height: auto;
    aspect-ratio: 1;
}
.em-gallery--bottom .em-gallery__thumb-nav { width: 32px; height: 72px; }
.em-gallery--bottom .em-gallery__main { order: 1; }

.em-gallery-lightbox[hidden] { display: none; }
.em-gallery-lightbox { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; }
.em-gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(10,12,18,.82);
    cursor: zoom-out;
    appearance: none;
}
.em-gallery-lightbox__content { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: min(1100px, 100%); height: min(90vh, 900px); }
.em-gallery-lightbox__content img { display: block; max-width: calc(100% - 112px); max-height: 100%; object-fit: contain; border-radius: 14px; }
.em-gallery-lightbox__content img.is-changing { animation: em-gallery-image-in 260ms cubic-bezier(.2,.8,.2,1); }
@keyframes em-gallery-image-in {
    from { opacity: .25; transform: scale(.985); }
    to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .em-gallery__thumbs,
    .em-gallery-lightbox__content img.is-changing { transition: none; animation: none; }
}
.em-gallery-lightbox__nav { position: absolute; top: 50%; width: 46px; height: 46px; border-radius: 50%; transform: translateY(-50%); }
.em-gallery-lightbox__nav--prev { left: 0; }
.em-gallery-lightbox__nav--next { right: 0; }
.em-gallery-lightbox__close { position: absolute; z-index: 2; top: 0; right: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 28px; line-height: 1; }
body.em-gallery-lightbox-open { overflow: hidden; }

/* Badge */
.em-badge {
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--em-radius-pill);
    letter-spacing: 0.08em;
}
.em-badge--accent {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--em-yellow-500);
    color: var(--em-blue-900);
}

/* Product Info */
.em-product-info { display: grid; gap: 22px; }
.em-product-info__category {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--em-ink-4);
}
.em-product-info__title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--em-ink);
    margin: 8px 0 0;
}
.em-product-info__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.em-product-info__excerpt {
    font-size: 16px;
    line-height: 1.7;
    color: var(--em-ink-3);
    margin: 0;
}
.em-product-taxonomy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 18px;
    border-top: 1px solid var(--em-line);
    color: var(--em-ink-4);
    font-size: 13px;
}
.em-product-taxonomy__item { display: inline-flex; align-items: baseline; gap: 5px; }
.em-product-taxonomy__item strong { color: var(--em-ink-2); font-weight: 600; }
.em-product-taxonomy__item a { color: var(--em-blue-700); text-decoration: none; }
.em-product-taxonomy__item a:hover { text-decoration: underline; }

/* Price Tag */
.em-price-tag { display: flex; align-items: baseline; gap: 10px; }
.em-price-tag__original {
    font-size: 18px;
    color: var(--em-ink-4);
    text-decoration: line-through;
}
.em-price-tag__current {
    font-size: 28px;
    font-weight: 700;
    color: var(--em-blue-700);
}

/* Rating */
.em-rating { display: inline-flex; align-items: center; gap: 6px; }
.em-stars { color: var(--em-yellow-500); letter-spacing: 2px; }
.em-rating-count { font-size: 13px; color: var(--em-ink-4); }

/* Stock */
.em-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
}
.em-stock.in-stock { color: var(--em-success); }
.em-stock.out-of-stock { color: var(--em-error); }
.em-stock .em-icon { width: 14px; height: 14px; }

/* Embroidery Panel */
.em-embroidery-panel {
    background: var(--em-white);
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-lg);
    padding: 22px;
}
.em-embroidery-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.em-embroidery-panel__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--em-ink);
}
.em-embroidery-panel__badge { font-size: 13px; color: var(--em-blue-700); }
.em-embroidery-form { display: grid; gap: 18px; }
.em-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Field */
.em-field { display: grid; gap: 6px; }
.em-field__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--em-ink);
}
.em-field__required { color: var(--em-error); }
.em-field__hint { font-size: 12px; color: var(--em-ink-4); }
.em-input-wrapper { position: relative; }
.em-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-md);
    background: var(--em-white);
    color: var(--em-ink);
    transition: border-color 0.2s;
}
.em-input:focus { outline: none; border-color: var(--em-blue-700); }
.em-input--lg { padding: 14px 50px 14px 16px; }
.em-input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--em-ink-4);
}
.em-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--em-ink-4);
}

/* Placement Picker */
.em-placement-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.em-placement-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-md);
    background: var(--em-white);
    cursor: pointer;
    transition: all 0.2s;
}
.em-placement-btn .em-icon { width: 20px; height: 20px; color: var(--em-ink-4); }
.em-placement-btn span { font-size: 13px; color: var(--em-ink-2); }
.em-placement-btn.is-active {
    border-color: var(--em-blue-700);
    background: var(--em-blue-50);
}
.em-placement-btn.is-active .em-icon,
.em-placement-btn.is-active span { color: var(--em-blue-700); }

/* Font Picker */
.em-font-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.em-font-btn {
    width: 56px;
    height: 48px;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-md);
    background: var(--em-white);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}
.em-font-btn:hover { border-color: var(--em-blue-700); }
.em-font-btn.is-active {
    border-color: var(--em-blue-700);
    background: var(--em-blue-700);
    color: white;
}

/* Embroidery Preview */
.em-embroidery-preview {
    position: relative;
    border-radius: var(--em-radius-lg);
    overflow: hidden;
    background-color: var(--em-paper-2);
}
.em-embroidery-preview__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.em-embroidery-preview__text {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.embroidery-name {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--em-white);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.embroidery-date {
    display: block;
    font-size: 14px;
    color: var(--em-white);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Upload Area */
.em-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed var(--em-line);
    border-radius: var(--em-radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}
.em-upload-area:hover { border-color: var(--em-blue-700); background: var(--em-blue-50); }
.em-upload-area .em-icon { width: 32px; height: 32px; color: var(--em-ink-4); }
.em-upload-area__text { font-size: 14px; font-weight: 600; color: var(--em-ink); }
.em-upload-area__hint { font-size: 12px; color: var(--em-ink-4); text-align: center; }

/* Swatch Picker */
.em-swatch-picker { display: grid; gap: 10px; }
.em-swatch-picker__label { font-size: 14px; font-weight: 600; color: var(--em-ink); }
.em-swatch-picker__options { display: flex; gap: 10px; flex-wrap: wrap; }
.em-swatch-btn {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 3px;
    border: 2px solid transparent;
    border-radius: var(--em-radius-pill);
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}
.em-swatch-btn__inner {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: var(--em-radius-pill);
    background-color: var(--swatch-color);
    border: 1px solid var(--em-line);
}
.em-swatch-btn.is-active { border-color: var(--em-blue-700); }
.em-swatch-btn__tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    font-size: 12px;
    white-space: nowrap;
    background: var(--em-ink);
    color: white;
    border-radius: var(--em-radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 10;
}
.em-swatch-btn:hover .em-swatch-btn__tooltip,
.em-swatch-btn.is-active .em-swatch-btn__tooltip { opacity: 1; visibility: visible; }

/* Size Picker */
.em-size-picker { display: grid; gap: 10px; }
.em-size-picker__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.em-size-picker__label { font-size: 14px; font-weight: 600; color: var(--em-ink); }
.em-size-guide-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    color: var(--em-blue-700);
    cursor: pointer;
}
.em-size-guide-trigger .em-icon { width: 16px; height: 16px; }
.em-size-picker__options { display: flex; gap: 10px; flex-wrap: wrap; }
.em-size-btn {
    min-width: 52px;
    padding: 12px 16px;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-md);
    background: var(--em-white);
    font-size: 14px;
    font-weight: 600;
    color: var(--em-ink);
    cursor: pointer;
    transition: all 0.2s;
}
.em-size-btn:hover { border-color: var(--em-blue-700); }
.em-size-btn.is-active {
    border-color: var(--em-blue-700);
    background: var(--em-blue-700);
    color: white;
}

/* Product Actions */
.em-product-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.em-product-actions__quantity { display: contents; }
.em-product-actions__quantity-label { display: none; }
.em-quantity {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    height: 44px;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-pill);
    overflow: hidden;
    background: var(--em-white);
}
.em-quantity__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 42px;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--em-ink-2);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: background-color var(--em-dur-fast), color var(--em-dur-fast);
}
.em-quantity__btn:hover { background: var(--em-paper); color: var(--em-blue-700); }
.em-quantity input.em-quantity__input {
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    height: 42px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    outline: none;
    background: transparent;
    background-color: transparent;
    box-shadow: none;
    text-align: center;
    font-family: var(--em-font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--em-ink);
    -moz-appearance: textfield;
}
.em-quantity input.em-quantity__input::-webkit-outer-spin-button,
.em-quantity input.em-quantity__input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Buttons */
.em-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--em-radius-pill);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
}
.em-btn--lg { min-height: 52px; padding: 16px 30px; font-size: 17px; line-height: 1; }
.em-btn--full { width: 100%; }
.em-btn--primary { background: var(--em-blue-700); color: white; box-shadow: var(--em-shadow-brand); }
.em-btn--primary:hover { background: var(--em-blue-900); }
.em-btn--secondary {
    background: var(--em-white);
    color: var(--em-ink);
    border-color: var(--em-line);
}
.em-btn--secondary:hover { border-color: var(--em-blue-700); color: var(--em-blue-700); }
.em-btn--dark { background: var(--em-ink); color: white; box-shadow: var(--em-shadow-md); }
.em-btn--dark:hover { background: #000; }
.em-btn--ghost { background: transparent; color: var(--em-ink-2); }
.em-btn--ghost:hover { background: var(--em-paper); }
.em-btn--icon-left { padding-left: 26px; }
.em-btn .em-icon { width: 18px; height: 18px; }

/* Notice */
.em-notice {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(400px, calc(100vw - 32px));
    padding: 16px 20px;
    border-radius: var(--em-radius-lg);
    box-shadow: var(--em-shadow-xl);
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.em-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.em-notice.is-hiding {
    opacity: 0;
    transform: translateY(20px);
}
.em-notice--success {
    background: var(--em-blue-700);
    color: var(--em-white);
}
.em-notice--error {
    background: #fff1f1;
    color: #b42318;
}
.em-notice .em-icon { width: 18px; height: 18px; }
.em-notice__message { flex: 1; min-width: 0; font-weight: 600; }
.em-notice__close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: var(--em-radius-sm);
    background: transparent;
    color: currentColor;
    cursor: pointer;
}
.em-notice__cart-link {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--em-radius-pill);
    color: var(--em-white);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}
.em-notice__cart-link:hover {
    background: var(--em-white);
    color: var(--em-blue-700);
}

@media (max-width: 639px) {
    .em-notice {
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: auto;
    }
}

/* Trust Grid */
.em-trust-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    border-top: 1px solid var(--em-line);
    padding-top: 22px;
}
.em-trust-item { display: flex; align-items: flex-start; gap: 12px; }
.em-trust-item__content { min-width: 0; }
.em-trust-item__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--em-blue-50);
    border-radius: var(--em-radius-md);
    flex-shrink: 0;
}
.em-trust-item__icon .em-icon { width: 20px; height: 20px; color: var(--em-blue-700); }
.em-trust-item__title { display: block; font-size: 14px; font-weight: 600; color: var(--em-ink); }
.em-trust-item__desc { display: block; font-size: 12px; color: var(--em-ink-4); }

/* FAQ Accordion */
.em-faq { display: flex; flex-direction: column; gap: 8px; }
.em-faq__item {
    overflow: hidden;
    background: var(--em-white);
    border: 1px solid var(--em-line);
    border-radius: 14px;
}
.em-faq__question {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    gap: 12px;
    padding: 16px 18px;
    border: none;
    border-radius: 13px;
    background: var(--em-white);
    font-family: var(--em-font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--em-ink);
    cursor: pointer;
    text-align: left;
}
.em-faq__question:hover { background: var(--em-white); }
.em-faq__item.is-open .em-faq__question {
    border-radius: 13px 13px 0 0;
    border-bottom: 1px solid var(--em-line);
    background: var(--em-blue-50, #eef4ff);
}
.em-faq__item.is-open .em-faq__question:hover { background: var(--em-blue-50, #eef4ff); }
.em-faq__icon { width: 18px; height: 18px; color: var(--em-blue-700); flex-shrink: 0; }
.em-faq__icon-vertical { transition: opacity var(--em-dur-fast); }
.em-faq__item.is-open .em-faq__icon-vertical { opacity: 0; }
.em-faq__answer {
    display: none;
    padding: 22px 24px 24px;
}
.em-faq__item.is-open .em-faq__answer { display: block; }
.em-faq__answer p {
    font-family: var(--em-font-body);
    font-size: 15.5px;
    line-height: 1.72;
    color: var(--em-ink-3);
    margin: 0;
}
.em-faq__answer p + p { margin-top: 12px; }
.em-faq__answer h2,
.em-faq__answer h3 {
    margin: 0 0 14px;
    color: var(--em-ink);
    font-family: var(--em-font-display);
    font-weight: 700;
    line-height: 1.35;
}
.em-faq__answer h2 { font-size: 21px; }
.em-faq__answer h3 { margin-top: 22px; font-size: 17px; }
.em-faq__answer ul,
.em-faq__answer ol {
    margin: 14px 0 0;
    padding-left: 22px;
    color: var(--em-ink-3);
    font-size: 15.5px;
    line-height: 1.65;
}
.em-faq__answer li + li { margin-top: 8px; }
.em-faq__answer strong { color: var(--em-ink); font-weight: 700; }
.em-faq__answer a { color: var(--em-blue-700); text-underline-offset: 3px; }

@media (max-width: 767px) {
    .em-faq__answer { padding: 18px 18px 20px; }
    .em-faq__answer h2 { font-size: 19px; }
    .em-faq__answer p,
    .em-faq__answer ul,
    .em-faq__answer ol { font-size: 15px; }
}

/* Modal */
.em-modal {
    position: fixed;
    --em-size-guide-top: var(--em-header-height, 72px);
    top: var(--em-size-guide-top);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 20px 24px;
    overflow: auto;
}
.em-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 21, 19, 0.5);
}
.em-modal__content {
    position: relative;
    width: min(600px, 100%);
    max-height: calc(100vh - var(--em-size-guide-top) - 40px);
    max-height: calc(100dvh - var(--em-size-guide-top) - 40px);
    overflow: auto;
    background: var(--em-white);
    border-radius: var(--em-radius-xl);
    box-shadow: var(--em-shadow-lg);
}
.em-modal__content--lg { width: min(1000px, 100%); }
.em-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 26px;
    border-bottom: 1px solid var(--em-line);
    position: sticky;
    top: 0;
    background: var(--em-white);
    z-index: 1;
}
.em-modal__title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 700;
    color: var(--em-ink);
}
.em-modal__title .em-icon { width: 20px; height: 20px; }
.em-modal__close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--em-radius-md);
}
.em-modal__close:hover { background: var(--em-paper); }
.em-modal__close .em-icon { width: 18px; height: 18px; color: var(--em-ink-4); }
.em-modal__body { padding: 22px 26px 30px; }

/* Size Guide */
.em-size-guide-tabs {
    display: flex;
    gap: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--em-line);
}
.em-size-guide-tab {
    padding: 12px 22px;
    border: none;
    border-radius: var(--em-radius-pill);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    background: transparent;
    color: var(--em-ink-4);
    transition: all 0.2s;
}
.em-size-guide-tab.is-active { background: var(--em-blue-700); color: white; }
.em-size-guide-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--em-yellow-100);
    border-radius: var(--em-radius-lg);
    padding: 18px 20px;
    margin-top: 22px;
}
.em-size-guide-badge {
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--em-yellow-500);
    color: var(--em-blue-900);
    padding: 6px 12px;
    border-radius: var(--em-radius-pill);
    width: fit-content;
}
.em-size-guide-note, .em-size-guide-detail {
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--em-ink-2);
    margin: 0;
}
.em-material-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--em-paper);
    border-radius: var(--em-radius-md);
    padding: 14px 20px;
    margin-top: 14px;
    font-size: 14.5px;
    color: var(--em-ink-3);
}
.em-material-info .em-icon { width: 16px; height: 16px; color: var(--em-blue-700); }
.em-material-info strong { color: var(--em-ink); }
.em-size-table {
    margin-top: 22px;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-md);
    overflow: hidden;
}
.em-size-table table { width: 100%; border-collapse: collapse; }
.em-size-table th, .em-size-table td {
    padding: 15px 13px;
    text-align: center;
    border-bottom: 1px solid var(--em-line);
}
.em-size-table th {
    font-size: 13px;
    font-weight: 700;
    color: var(--em-ink);
    background: var(--em-paper);
}
.em-size-table th span { font-weight: 400; color: var(--em-ink-4); font-size: 11px; }
.em-size-table td { font-size: 15px; color: var(--em-ink-2); }
.em-size-table td:first-child { font-weight: 700; color: var(--em-ink); }
.em-measure-guide {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 26px;
    align-items: start;
    background: var(--em-paper);
    border-radius: var(--em-radius-lg);
    padding: 22px;
    margin-top: 22px;
}
.em-measure-guide__image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--em-radius-md);
}
.em-measure-guide__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--em-ink-4);
}
.em-measure-guide__tips h4 { font-size: 16px; color: var(--em-ink); margin: 0 0 12px; }
.em-measure-guide__tips ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--em-ink-2);
}
.em-measure-guide__contact {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 20px;
    border-top: 1px solid var(--em-line);
    padding-top: 18px;
}
.em-measure-guide__contact .em-icon {
    width: 18px;
    height: 18px;
    color: var(--em-blue-700);
    flex-shrink: 0;
    margin-top: 2px;
}
.em-measure-guide__contact span {
    font-size: 15px;
    font-style: italic;
    line-height: 1.55;
    color: var(--em-blue-700);
}

/* Reviews Section */
.em-reviews-section { padding: 72px 0; border-top: 1px solid var(--em-line); }
.em-section-heading {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--em-ink);
    text-align: left;
    margin: 0 0 28px;
}
.em-section-heading span { color: var(--em-blue-700); }
.em-reviews-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    align-items: start;
}
.em-reviews-sidebar {
    position: sticky;
    top: 96px;
    background: var(--em-white);
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-xl);
    padding: 26px;
    display: grid;
    gap: 18px;
}
.em-reviews-summary { text-align: center; }
.em-reviews-summary__score {
    display: block;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: var(--em-blue-700);
}
.em-stars-lg { display: block; color: var(--em-yellow-500); font-size: 20px; letter-spacing: 2px; margin: 8px 0; }
.em-reviews-summary__recommend {
    display: block;
    font-size: 13.5px;
    color: var(--em-ink-4);
}
.em-reviews-histogram { display: grid; gap: 8px; }
.em-histogram-row {
    display: grid;
    grid-template-columns: 40px 1fr 28px;
    gap: 10px;
    align-items: center;
}
.em-histogram-star { font-size: 13px; color: var(--em-ink-3); }
.em-histogram-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--em-line);
    overflow: hidden;
}
.em-histogram-fill {
    height: 100%;
    background: var(--em-yellow-500);
    border-radius: 999px;
}
.em-histogram-count { font-size: 13px; color: var(--em-ink-4); text-align: right; }
.em-reviews-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.em-filter-btn {
    padding: 8px 14px;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-pill);
    background: var(--em-white);
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s;
}
.em-filter-btn.is-active {
    background: var(--em-blue-700);
    color: white;
    border-color: var(--em-blue-700);
}
.em-reviews-list { display: grid; gap: 18px; }
.em-review-form {
    background: var(--em-white);
    border: 2px solid var(--em-blue-700);
    border-radius: var(--em-radius-xl);
    padding: 26px;
    display: grid;
    gap: 18px;
}
.em-review-form h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--em-ink);
    margin: 0;
}
.em-review-form__field label { font-size: 14px; font-weight: 600; color: var(--em-ink); display: block; margin-bottom: 8px; }
.em-star-picker { display: flex; gap: 6px; }
.em-star-btn {
    border: none;
    background: none;
    padding: 2px;
    font-size: 26px;
    line-height: 1;
    color: var(--em-line);
    cursor: pointer;
}
.em-star-btn.is-active { color: var(--em-yellow-500); }
.em-review-form p.stars { display: none !important; }
.em-review-form #rating { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.em-review-form__native { display: grid; gap: 18px; }
.em-review-form__native p { margin: 0; }
.em-review-upload { display: grid; gap: 10px; }
.em-review-upload > label:first-child { font-size: 14px; font-weight: 600; color: var(--em-ink); }
.em-review-upload > label:first-child span { font-weight: 400; color: var(--em-ink-4); }
.em-review-upload__drop {
    min-height: 96px;
    border: 1px dashed var(--em-blue-700);
    border-radius: var(--em-radius-md);
    background: #f4f7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: var(--em-blue-700);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.em-review-upload__drop:hover { background: #eaf0ff; border-color: var(--em-blue-900); }
.em-review-upload__drop .em-icon { width: 22px; height: 22px; }
.em-review-upload__drop small { color: var(--em-ink-4); }
.em-review-upload input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.em-review-upload__preview { display: flex; flex-wrap: wrap; gap: 10px; }
.em-review-upload__preview img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--em-line); border-radius: var(--em-radius-md); }
.em-review-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.em-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-md);
    resize: vertical;
    min-height: 110px;
}
.em-textarea:focus { outline: none; border-color: var(--em-blue-700); }
.em-review-form__actions { display: flex; gap: 12px; }

/* Review calls to action */
#write-review-btn:hover,
#write-review-btn:focus-visible,
.em-review-form input[type="submit"].em-btn:hover,
.em-review-form input[type="submit"].em-btn:focus-visible {
    background: var(--em-blue-700);
    border-color: var(--em-blue-700);
    color: #fff;
}

#write-review-btn:hover .em-icon,
#write-review-btn:focus-visible .em-icon {
    color: #fff;
}

.em-review-form input[type="submit"].em-btn--primary {
    background: var(--em-blue-700);
    border-color: var(--em-blue-700);
    color: #fff;
}

.em-review-form input[type="submit"].em-btn--primary:hover,
.em-review-form input[type="submit"].em-btn--primary:focus-visible {
    background: var(--em-blue-800);
    border-color: var(--em-blue-800);
    color: #fff;
}
.em-review-card {
    background: var(--em-white);
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius-xl);
    padding: 24px;
    display: grid;
    gap: 16px;
}
.em-review-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.em-review-card__author { display: flex; align-items: flex-start; gap: 14px; }
.em-review-card__avatar {
    width: 46px;
    height: 46px;
    border-radius: var(--em-radius-pill);
    background: var(--em-blue-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--em-blue-700);
    flex-shrink: 0;
}
.em-review-card__info { display: grid; gap: 5px; }
.em-review-card__name { font-size: 16px; font-weight: 700; color: var(--em-ink); }
.em-review-card__verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--em-success);
}
.em-review-card__verified .em-icon { width: 13px; height: 13px; }
.em-review-card__stars { font-size: 16px; letter-spacing: 0.1em; color: var(--em-yellow-600); }
.em-review-card__meta { font-size: 13px; color: var(--em-ink-4); margin: 0; }
.em-review-card__body {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--em-ink-2);
    margin: 0;
}
.em-review-card__photos { display: flex; flex-wrap: wrap; gap: 10px; }
.em-review-card__photos a { display: block; border-radius: var(--em-radius-md); overflow: hidden; }
.em-review-card__photos img { display: block; width: 96px; height: 96px; object-fit: cover; transition: transform 0.2s; }
.em-review-card__photos a:hover img { transform: scale(1.04); }
.em-review-card__reply {
    background: var(--em-paper);
    border-radius: var(--em-radius-md);
    padding: 16px 18px;
    display: grid;
    gap: 6px;
}
.em-review-card__reply strong { font-size: 14px; color: var(--em-blue-700); }
.em-review-card__reply span { font-size: 14.5px; line-height: 1.65; color: var(--em-ink-2); }
.em-review-card__body p { margin: 0 0 10px; }
.em-review-card__body p:last-child { margin-bottom: 0; }
.em-reviews-empty {
    padding: 42px 24px;
    text-align: center;
    background: var(--em-white);
    border: 1px dashed var(--em-line);
    border-radius: var(--em-radius-xl);
    color: var(--em-ink-3);
}
.em-reviews-empty strong { display: block; margin-bottom: 6px; color: var(--em-ink); font-size: 18px; }
.em-reviews-empty p { margin: 0; }

/* Related Products */
.em-related-products { padding: 72px 0; background: var(--em-white); }
.em-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}
/* Icon helper */
.em-icon { display: inline-block; width: 1em; height: 1em; }

/* Responsive */
@media (max-width: 1023px) {
    .em-product-grid { grid-template-columns: 1fr; gap: 32px; }
    .em-gallery { position: static; grid-template-columns: 1fr; }
    .em-gallery__thumbs-nav { grid-template-columns: 32px minmax(0, 1fr) 32px; grid-template-rows: 1fr; order: 2; align-items: center; }
    .em-gallery__thumbs-viewport { max-height: none; touch-action: pan-y; }
    .em-gallery__thumbs { flex-direction: row; gap: 8px; }
    .em-gallery__thumb { flex: 0 0 calc((100% - 24px) / 4); width: calc((100% - 24px) / 4); height: auto; aspect-ratio: 1; }
    .em-gallery__thumb img { width: 100%; height: 100%; aspect-ratio: 1; }
    .em-gallery__thumb-nav { width: 32px; height: 72px; }
    .em-gallery--side .em-gallery__main,
    .em-gallery--side .em-gallery__thumbs-nav {
        grid-column: 1;
        grid-row: auto;
    }
    .em-gallery--side .em-gallery__thumb-nav--prev svg,
    .em-gallery--side .em-gallery__thumb-nav--next svg { transform: none; }
    .em-gallery__main { order: 1; }
    .em-form-row { grid-template-columns: 1fr; }
    .em-measure-guide { grid-template-columns: 1fr; }
    .em-reviews-layout { grid-template-columns: 1fr; }
    .em-reviews-sidebar { position: static; }
    .em-product-actions {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        align-items: center;
    }
    .em-product-actions .em-quantity {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }
    .em-product-actions #add-to-cart-btn {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
    }
    .em-product-actions #buy-now-btn {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }
}
@media (max-width: 767px) {
    .em-gallery__thumb-nav { width: 32px; height: 64px; }
    .em-gallery-lightbox { padding: 12px; }
    .em-gallery-lightbox__content img { max-width: 100%; max-height: calc(100% - 100px); }
    .em-gallery-lightbox__nav { top: auto; bottom: 12px; transform: none; }
    .em-gallery-lightbox__nav--prev { left: calc(50% - 58px); }
    .em-gallery-lightbox__nav--next { right: calc(50% - 58px); }
    .em-trust-grid { grid-template-columns: minmax(0, 1fr); }
    .em-product-actions { gap: 10px; }
    .em-product-actions #add-to-cart-btn { padding-inline: 14px; }
    .em-size-table { overflow-x: auto; }
    .em-review-form__row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .em-product-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .em-product-actions__quantity {
        display: flex;
        grid-column: 1;
        grid-row: auto;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
    }
    .em-product-actions__quantity-label {
        display: inline;
        color: var(--em-ink-2);
        font-size: 14px;
        font-weight: 600;
    }
    .em-product-actions .em-quantity {
        grid-column: auto;
        grid-row: auto;
        justify-self: auto;
    }
    .em-product-actions #add-to-cart-btn,
    .em-product-actions #buy-now-btn {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        min-height: 48px;
    }
    .em-product-actions #add-to-cart-btn { padding-inline: 18px; }
}
