/**
 * Inno Swatch Frontend Styles
 *
 * Handles:
 * - Swatch display (color circles, text labels)
 * - Active/hover/disabled states
 * - Quote form styling
 * - Responsive design for mobile
 */

:root {
    --inno-accent: #0e7c5f;
    --inno-accent-soft: #e8f5f0;
    --inno-accent-ink: #0a5c46;
    --inno-surface: #ffffff;
    --inno-surface-alt: #f7f5f1;
    --inno-border: #e0ddd8;
    --inno-ink: #1f1c19;
    --inno-ink-muted: #6b6560;
    --inno-upload-thumb-size: 96px;
    --inno-upload-box-height: 98px;
    --inno-radius-lg: 12px;
    --inno-radius-md: 8px;
    --inno-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.05);
}

html {
    scrollbar-gutter: stable;
}

/* ========================================
   Variations Container (Replaces Table)
   ======================================== */

.inno-variations-container {
    margin-bottom: 6px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    display: block;
    box-sizing: border-box;
    overflow-x: clip;
}

.inno-attribute-wrapper {
    margin-bottom: 12px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    display: block;
    box-sizing: border-box;
    overflow-x: clip;
}

.inno-attribute-wrapper.inno-print-color-wrapper {
    margin-bottom: 12px;
}

.inno-variations-container .inno-attribute-wrapper:last-child {
    margin-bottom: 0;
}

.inno-attribute-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--inno-ink-muted);
    margin-bottom: 10px;
    display: block;
}

/* ========================================
   Swatch Container
   ======================================== */

.inno-swatch-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
    padding: 5px;
}

.variations_form.cart,
.single-product .wp-block-woocommerce-add-to-cart-form,
.single-product .wp-block-woocommerce-add-to-cart-form form.variations_form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.single-product .variations_form .single_variation_wrap,
.single-product .variations_form .variations_button,
.single-product .variations_form .woocommerce-variation-add-to-cart {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Hide duplicate variation price shown under swatches. */
.single-product .variations_form .single_variation .woocommerce-variation-price,
.single-product .variations_form .single_variation .price {
    display: none !important;
}

/* Hide the default WooCommerce summary price under product name. */
.single-product .entry-summary > .price,
.single-product .entry-summary > p.price,
.single-product .wp-block-woocommerce-product-price,
.wp-block-woocommerce-product-price {
    display: none !important;
}

/* ========================================
   Base Swatch Button Styles
   ======================================== */

.inno-swatch {
    border: 1.5px solid var(--inno-border);
    background: var(--inno-surface);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: var(--inno-ink);
}

.inno-swatch:focus {
    outline: none;
}

.inno-swatch:focus-visible {
    outline: 2px solid var(--inno-accent);
    outline-offset: 2px;
}

/* ========================================
   Color Swatches (Circular)
   ======================================== */

.inno-swatch-color {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    border-color: #fff;
    box-shadow: inset 0 0 0 1px #d0cbc2;
}

.inno-swatch-color:hover {
    transform: scale(1.08);
}

/* ========================================
   Text Swatches (Rectangular)
   ======================================== */

.inno-swatch-text {
    min-width: 54px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
    gap: 0;
}

/* When the swatch has a price badge, tighten the label padding slightly */
.inno-swatch-text.inno-swatch-has-price {
    padding: 6px 6px 6px 14px;
}

.inno-swatch-text-label {
    white-space: nowrap;
}

/* Price badge — shown to the right of the size text inside the same pill */
.inno-swatch-price-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--inno-ink-muted);
    letter-spacing: 0.01em;
    background: rgba(0, 0, 0, 0.045);
    border-radius: 999px;
    padding: 2px 8px;
    margin-left: 6px;
    white-space: nowrap;
    line-height: 1.5;
    transition: color 0.2s ease, background 0.2s ease;
}

/* When the swatch is selected (green bg), flip badge to white-tinted */
.inno-swatch-text.selected .inno-swatch-price-badge {
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.18);
}

.inno-swatch-text:hover {
    border-color: var(--inno-accent);
    background: #f9faf9;
}

/* ========================================
   Image Swatches
   ======================================== */

.inno-swatch-image {
    width: 110px;
    height: auto;
    padding: 0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background: var(--inno-surface);
}

.inno-swatch-image:hover {
    transform: translateY(-1px);
    border-color: var(--inno-accent);
}

.inno-swatch-image img {
    width: 100%;
    height: 84px;
    object-fit: cover;
    display: block;
}

.inno-swatch-image-label {
    width: 100%;
    padding: 5px 6px;
    font-size: 10.5px;
    font-weight: 600;
    text-align: center;
    background: var(--inno-surface);
    color: var(--inno-ink);
    border-top: 1px solid #ebe7e0;
}

/* ========================================
   Selected State
   ======================================== */

.inno-swatch.selected {
    border-color: var(--inno-accent);
}

.inno-swatch-color.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--inno-accent), inset 0 0 0 1px #d0cbc2;
}

.inno-swatch-text.selected {
    background: var(--inno-accent);
    color: #fff;
    border-color: var(--inno-accent);
    box-shadow: none;
}

.inno-swatch-image.selected {
    background: var(--inno-accent-soft);
    border-color: var(--inno-accent);
    box-shadow: none;
}

.inno-swatch-image.selected .inno-swatch-image-label {
    background: var(--inno-accent-soft);
    color: var(--inno-accent-ink);
    border-top-color: #cae6dd;
}

/* Price badge inside image swatches — overlay on top-right corner */
.inno-swatch-image .inno-swatch-price-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: auto;
    border-radius: 999px;
    margin-left: 0;
    padding: 2px 7px;
    font-size: 10.5px;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    z-index: 2;
    line-height: 1.4;
}

.inno-swatch-image.selected .inno-swatch-price-badge {
    color: #fff;
    background: var(--inno-accent);
}

/* Hide WooCommerce summary price — price is shown in the qty slider */
.single-product .summary > .price {
    display: none !important;
}

/* ========================================
   Disabled/Hidden State (for cascading filter)
   ======================================== */

.inno-swatch.hidden {
    display: none;
}

.inno-swatch:disabled,
.inno-swatch.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.inno-swatch-color.disabled,
.inno-swatch-color:disabled {
    filter: grayscale(60%);
}

.inno-swatch-color.disabled::after,
.inno-swatch-color:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 2px;
    height: 130%;
    background: rgba(0, 0, 0, 0.4);
}

.inno-swatch-text.disabled,
.inno-swatch-text:disabled {
    background: #f3f1ed;
    color: #9a948d;
}

.inno-swatch-text.disabled:hover,
.inno-swatch-text:disabled:hover {
    border-color: var(--inno-border);
    background: #f3f1ed;
    transform: none;
}

/* ========================================
   Quote Form Styles
   ======================================== */

.inno-quote-fields {
    margin: 8px 0 14px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e4e1db;
    border-radius: var(--inno-radius-lg);
    box-shadow: var(--inno-shadow-soft);
}

.inno-artwork-block {
    margin-bottom: 10px;
}

.inno-instructions-block {
    margin-top: 12px;
}

.inno-quote-label {
    display: block;
    margin-bottom: 9px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b6560;
}

.inno-quote-instructions {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd9d2;
    border-radius: var(--inno-radius-md);
    background: #fff;
    font-size: 13px;
    line-height: 1.45;
    font-family: inherit;
    height: 38px;
    max-width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.single-product .variations_form.cart .inno-quote-fields input.inno-quote-instructions {
    height: 38px !important;
}

.inno-quote-instructions:focus {
    outline: none;
    border-color: var(--inno-accent);
    box-shadow: 0 0 0 2px rgba(14, 124, 95, 0.12);
}

.inno-quote-instructions::placeholder {
    color: #999;
}

/* Dropzone file upload - card layout like their design */
.inno-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-height: var(--inno-upload-box-height);
    border: 2px dashed #d5d0c7;
    border-radius: var(--inno-radius-md);
    background: #f7f4ef;
    transition: all 0.2s ease;
}

.inno-dropzone:hover {
    border-color: #b8b1a8;
    background: #f4f0ea;
}

.inno-upload-preview-row {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.inno-upload-preview-row .inno-dropzone {
    flex: 1 1 auto;
    min-width: 0;
    min-height: var(--inno-upload-box-height);
}

.inno-dropzone .dz-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    margin: 0 !important;
    text-align: center;
    color: #4b443d;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
}

.inno-dropzone.dz-started .dz-message {
    display: none;
}

.inno-dropzone.dz-started {
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
}

.inno-dropzone .dz-preview {
    margin: 6px;
}

.inno-dropzone .dz-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
    height: auto;
    margin: 6px;
    vertical-align: top;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: var(--inno-radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.inno-dropzone .dz-preview:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.inno-dropzone .dz-preview .dz-image {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 120px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.inno-dropzone .dz-preview .dz-image img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 120px;
    object-fit: contain;
}

/* Spinner overlay while uploading */
.inno-dropzone .dz-preview.dz-processing:not(.dz-success):not(.dz-error)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--inno-accent);
    border-radius: 50%;
    animation: inno-spin 0.9s linear infinite;
    z-index: 20;
}

.inno-dropzone .dz-preview.dz-processing:not(.dz-success):not(.dz-error)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    z-index: 15;
}

/* Hide details overlay (file size / filename) on logo preview */
.inno-dropzone .dz-preview .dz-details {
    display: none !important;
}

/* Always show details for non-image files (PDFs, etc) */
.inno-dropzone .dz-preview.dz-file-preview .dz-details {
    opacity: 1;
}

.inno-dropzone .dz-preview .dz-size {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.inno-dropzone .dz-preview .dz-filename {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

/* Remove button - always visible X button without text */
.inno-dropzone .dz-preview .dz-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    background: #dc3545;
    color: transparent;
    border-radius: 100px;
    text-align: center;
    line-height: 20px;
    font-size: 0;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    opacity: 1;
    z-index: 10;
}

.inno-dropzone .dz-preview .dz-remove:before {
    content: "×";
    color: #fff;
    font-size: 18px;
    display: block;
}

.inno-dropzone .dz-preview .dz-remove:hover {
    background: #c82333;
}

/* Success/error marks */
.inno-dropzone .dz-preview .dz-success-mark,
.inno-dropzone .dz-preview .dz-error-mark {
    display: none;
}

/* Progress bar (Dropzone default — hidden, we use custom) */
.inno-dropzone .dz-preview .dz-progress {
    display: none !important;
}

/* Custom upload progress bar */
.inno-upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    z-index: 5;
}
.inno-upload-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0e7c5f, #1a8a6a);
    transition: width 0.15s ease;
}
/* Percentage overlay on file preview */
.inno-upload-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    z-index: 22;
    pointer-events: none;
    border-radius: 8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Embroidery Button Row
   ======================================== */

.inno-emb-btn-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 14px;
}

.inno-emb-open-btn {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--inno-radius-md);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    border: 2px solid var(--inno-accent);
    color: var(--inno-accent);
    background: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.inno-emb-open-btn:hover {
    background: var(--inno-accent-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(14, 124, 95, 0.15);
}

/* ========================================
   Mockup Controls Row (Orientation + Button)
   ======================================== */

.inno-mockup-controls-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 14px;
}

/* Orientation Toggle */
.inno-orientation-toggle {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(135deg, var(--inno-accent) 0%, #12a87a 100%);
    border-radius: var(--inno-radius-md);
    padding: 4px;
    flex-shrink: 0;
}

.inno-orientation-option {
    flex: 1 1 0;
    border: none;
    outline: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: calc(var(--inno-radius-md) - 2px);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}

.inno-orientation-option:focus {
    outline: none;
    box-shadow: none;
}

.inno-orientation-option:hover {
    color: #fff;
}

.inno-orientation-option.active {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.inno-orientation-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

/* Generate Mockup Button */
.inno-generate-mockup-button.is-loading {
    opacity: 0.85;
    cursor: wait;
}

.inno-generate-mockup-button {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--inno-radius-md);
    padding: 12px 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--inno-accent) 0%, #12a87a 100%);
    box-shadow: 0 4px 14px rgba(14, 124, 95, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.inno-generate-mockup-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(14, 124, 95, 0.28);
}

.inno-generate-mockup-button:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.inno-uploaded-file-link,
.inno-variation-image-link {
    font-size: 12px;
    color: #5f5851;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f8f6f2;
    border: 1px solid #ece8e1;
}

.inno-logo-preview-image {
    display: block;
    max-height: 120px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.inno-mockup-result {
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
}

.inno-mockup-preview-container {
    position: relative;
    width: 100%;
    border-radius: var(--inno-radius-lg);
    overflow: hidden;
    border: 1px solid var(--inno-border);
    background: #fff;
}

.inno-mockup-preview-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.2s ease;
    background: #faf8f4;
}

.inno-mockup-preview-image:hover {
    opacity: 0.92;
}

.inno-mockup-generated-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--inno-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.inno-mockup-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.inno-mockup-action-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--inno-radius-md);
    font-size: 12px;
    font-weight: 600;
    color: var(--inno-ink-muted);
    background: var(--inno-surface-alt);
    border: 1px solid var(--inno-border);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.inno-mockup-action-link:hover {
    color: var(--inno-accent-ink);
    border-color: var(--inno-accent);
    background: var(--inno-accent-soft);
}

.inno-mockup-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 14px;
}

.inno-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #d6d6d6;
    border-top-color: var(--inno-accent);
    border-radius: 50%;
    animation: inno-spin 0.9s linear infinite;
}

@keyframes inno-spin {
    to {
        transform: rotate(360deg);
    }
}

.inno-mockup-error {
    color: #b42318;
    font-size: 14px;
}

.inno-mockup-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.inno-mockup-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.inno-mockup-modal-image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.inno-mockup-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 22px;
    line-height: 30px;
    cursor: pointer;
}

/* ========================================
   Stable Product Media Viewer
   ======================================== */

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
    width: 100%;
    height: clamp(320px, 40vw, 520px);
    overflow: hidden;
    background: #fff;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image {
    height: 100%;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        height: clamp(260px, 70vw, 420px);
    }
}

/* ========================================
   Inno Gallery Slider
   ======================================== */

.inno-gallery-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 4px;
}

/* When our custom slider is active, hide ALL FlexSlider internals */
.inno-gallery-slider-active .flex-viewport,
.inno-gallery-slider-active .flex-control-nav,
.inno-gallery-slider-active .flex-control-thumbs,
.inno-gallery-slider-active .flex-direction-nav,
.inno-gallery-slider-active > .woocommerce-product-gallery__wrapper {
    display: none !important;
}

.inno-gallery-slider__track {
    position: relative;
    width: 100%;
    height: clamp(320px, 40vw, 520px);
}

.inno-gallery-slider__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.inno-gallery-slider__slide.active {
    opacity: 1;
    pointer-events: auto;
}

.inno-gallery-slider__slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* Arrows */
.inno-gallery-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.inno-gallery-slider__arrow:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.08);
}

.inno-gallery-slider__arrow--prev {
    left: 10px;
}

.inno-gallery-slider__arrow--next {
    right: 10px;
}

/* Thumbnails strip */
.inno-gallery-slider__thumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    -webkit-overflow-scrolling: touch;
}

.inno-gallery-slider__thumbs::-webkit-scrollbar {
    height: 4px;
}

.inno-gallery-slider__thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.inno-gallery-slider__thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.65;
}

.inno-gallery-slider__thumb:hover {
    opacity: 1;
}

.inno-gallery-slider__thumb.active {
    border-color: var(--inno-accent, #1a73e8);
    opacity: 1;
}

.inno-gallery-slider__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 768px) {
    .inno-gallery-slider__track {
        height: clamp(260px, 70vw, 420px);
    }

    .inno-gallery-slider__arrow {
        width: 30px;
        height: 30px;
    }

    .inno-gallery-slider__arrow--prev {
        left: 6px;
    }

    .inno-gallery-slider__arrow--next {
        right: 6px;
    }
}
/* ========================================
   Product Section Sticky Gallery (Block Theme)
   ======================================== */

@media (min-width: 992px) {
    .single-product .wp-block-columns.alignwide.wp-block-columns-is-layout-flex {
        align-items: flex-start !important;
        overflow: visible !important;
    }

    .single-product .wp-block-columns.alignwide.wp-block-columns-is-layout-flex>.wp-block-column:first-child {
        min-width: 0;
        position: sticky;
        top: 24px;
        align-self: start;
        overflow: visible !important;
    }

    .single-product .wp-block-columns.alignwide.wp-block-columns-is-layout-flex>.wp-block-column:last-child {
        min-width: 0;
        overflow: visible !important;
    }

    .single-product .wp-block-columns.alignwide.wp-block-columns-is-layout-flex>.wp-block-column:first-child .woocommerce-product-gallery {
        position: relative;
        top: auto;
    }
}

/* ========================================
   Quantity Slider + Pricing
   ======================================== */

.inno-qty-pricing {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 8px 0 18px;
    clear: both;
    min-width: 0;
}

/* Hide native WooCommerce variation description (we render our own styled version) */
.single-product .variations_form .woocommerce-variation-description {
    display: none !important;
}

/* Desktop: Hide original qty slider — floating clone is always visible */
@media (min-width: 769px) {
    .inno-qty-pricing:not(.is-pinned) {
        display: none !important;
    }
    .inno-qty-pricing.is-pinned {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 340px;
        z-index: 100;
        border-radius: 16px;
        box-shadow: none;
        opacity: 0;
        pointer-events: none;
        transition: top 0.3s ease, opacity 0.3s ease;
    }
    .inno-qty-pricing.is-pinned.is-active {
        opacity: 1;
        pointer-events: auto;
    }
}

.inno-qty-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
}

.inno-qty-head-label {
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 11px;
    font-weight: 700;
    color: #8a847d;
}

.inno-qty-panel.inno-qty-card {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e6e6e4;
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0;
}

.inno-qty-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px 4px;
}

.inno-qty-head-value {
    font-size: 0;
}

.inno-qty-head-value {
    position: relative;
}

.inno-qty-plus-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #1a8a6a;
    pointer-events: none;
}

.inno-qty-head-input {
    width: 72px;
    height: 36px;
    padding: 0 4px;
    border: 1.5px solid #e0e0de;
    border-radius: 10px;
    background: #fff;
    color: #1a8a6a;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.inno-qty-head-input:focus {
    outline: none;
    border-color: #1a8a6a;
    box-shadow: 0 0 0 2px rgba(26, 138, 106, 0.12);
}

.inno-qty-head-input:disabled {
    background: #f6f6f4;
    color: #9a958f;
    cursor: not-allowed;
}

.inno-qty-total-block {
    margin-left: auto;
    text-align: right;
}

.variations_form.inno-has-custom-qty .quantity {
    display: none !important;
}

.variations_form.inno-has-custom-qty .woocommerce-variation-add-to-cart,
.variations_form.inno-has-custom-qty .variations_button {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.variations_form.inno-has-custom-qty .single_add_to_cart_button {
    align-self: flex-start !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}

.single-product .variations_form.cart .single_add_to_cart_button {
    margin-top: 12px !important;
    border-radius: var(--inno-radius-md) !important;
}

.inno-total-value {
    font-size: 26px;
    font-weight: 800;
    color: #222;
    line-height: 1;
    letter-spacing: -0.03em;
}

.inno-qty-subline {
    margin-top: 3px;
    font-size: 11px;
    color: #8f8a84;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
}

.inno-qty-saving-inline {
    color: #e74c3c;
    font-weight: 600;
    margin-left: 4px;
}

.inno-qty-slider-wrap {
    position: relative;
    padding: 8px 18px 0;
}

.inno-qty-slider {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 2;
    height: 22px;
    border-radius: 0;
    background: linear-gradient(90deg, #2ab88a 0%, #1a8a6a var(--inno-slider-progress, 0%), #ecebea var(--inno-slider-progress, 0%), #ecebea 100%) center / 100% 6px no-repeat;
    outline: none;
}

.inno-qty-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #1a8a6a;
    box-shadow: 0 1px 6px rgba(26, 138, 106, 0.25);
    cursor: pointer;
    margin-top: 0;
    transition: box-shadow 0.2s ease;
}

.inno-qty-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 1px 10px rgba(26, 138, 106, 0.4);
}

.inno-qty-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #1a8a6a;
    box-shadow: 0 1px 6px rgba(26, 138, 106, 0.25);
    cursor: pointer;
}

.inno-qty-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #ecebea;
}

.inno-qty-slider::-webkit-slider-runnable-track {
    height: 22px;
    border-radius: 0;
    background: transparent;
}

.inno-qty-slider:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.inno-qty-slider:disabled::-webkit-slider-thumb,
.inno-qty-slider:disabled::-moz-range-thumb {
    border-color: #8d8d8d;
    box-shadow: none;
    cursor: not-allowed;
}

.inno-qty-marks {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 8px;
    height: 6px;
    margin: 0;
    pointer-events: none;
    z-index: 3;
}

.inno-mark {
    position: absolute;
    transform: translateX(-50%);
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.inno-mark i {
    display: block;
    width: 2px;
    height: 10px;
    border-radius: 1px;
    margin: 0 auto;
    background: rgba(130, 125, 118, 0.5);
}

.inno-qty-tiers {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
    padding: 8px 14px 14px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.inno-tier-box {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 2px 6px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    background: transparent;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.inno-tier-box.is-active {
    background: #eef9f5;
    border-color: #1a8a6a;
}

.inno-tier-box:focus-visible {
    outline: 2px solid rgba(26, 138, 106, 0.35);
    outline-offset: 1px;
}

.inno-tier-range {
    font-size: 10px;
    font-weight: 600;
    color: #aaa39b;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.inno-tier-price {
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    font-family: inherit;
    color: #555;
    margin-top: 2px;
}

.inno-tier-discount {
    font-size: 9px;
    color: #bbb4ab;
    margin-top: 1px;
    font-weight: 700;
}

.inno-tier-box.is-active .inno-tier-range,
.inno-tier-box.is-active .inno-tier-price,
.inno-tier-box.is-active .inno-tier-discount {
    color: #1a8a6a;
}

.inno-saving-note {
    margin: 0;
    padding: 9px 18px;
    border-radius: 0;
    background: linear-gradient(90deg, #f0faf6, #e6f7f0);
    color: #1a8a6a;
    border-top: 1px solid #d8f0e6;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
}

.inno-saving-main {
    color: inherit;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inno-saving-next {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: #5e907f;
    background: rgba(26, 138, 106, 0.1);
    border: 1px solid rgba(26, 138, 106, 0.2);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
    text-align: right;
    flex: 0 0 auto;
}

.inno-saving-note.is-locked {
    background: #fafaf8;
    border-top-color: #efede9;
    color: #b7b3ac;
}

.inno-saving-note.is-locked .inno-saving-main {
    color: #b7b3ac;
}

.inno-qty-pricing.inno-qty-no-tiers .inno-qty-slider-wrap {
    padding-bottom: 10px;
}

@media (min-width: 992px) {
    .single-product .wp-block-column:last-child .wp-block-post-title {
        font-size: clamp(28px, 2.15vw, 36px);
        line-height: 1.18;
        margin-bottom: 6px;
    }

    .single-product .wp-block-column:last-child .wp-block-post-excerpt__excerpt {
        font-size: 14px;
        line-height: 1.48;
        margin-bottom: 16px;
    }

    .single-product .wp-block-column:last-child .wp-block-woocommerce-add-to-cart-form,
    .single-product .wp-block-column:last-child .variations_form.cart {
        max-width: 680px;
    }
}


/* ========================================
   Responsive Mobile Styles
   ======================================== */

@media (max-width: 768px) {
    .inno-swatch-container {
        gap: 8px;
    }

    .inno-swatch-color {
        width: 36px;
        height: 36px;
    }

    .inno-swatch-text {
        min-width: 45px;
        height: 36px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .inno-swatch-image {
        width: 78px;
    }

    .inno-swatch-image img {
        height: 72px;
    }

    .inno-swatch-image-label {
        font-size: 11px;
        padding: 5px 6px;
    }

    .inno-qty-head-input {
        width: 60px;
        height: 34px;
        font-size: 17px;
        padding: 0 6px;
    }

    .inno-total-value {
        font-size: 23px;
    }

    .inno-qty-subline {
        font-size: 10px;
    }

    .inno-qty-slider-wrap {
        padding: 8px 14px 0;
    }

    .inno-qty-marks {
        left: 14px;
        right: 14px;
        top: 8px;
    }

    .inno-tier-range {
        font-size: 9px;
    }

    .inno-tier-price {
        font-size: 14px;
    }

    .inno-tier-discount {
        font-size: 8px;
    }

    .inno-qty-tiers {
        padding: 8px 10px 12px;
        gap: 4px;
    }

    .inno-tier-box {
        padding: 8px 2px 6px;
    }

    .inno-saving-note {
        font-size: 11px;
        padding: 8px 14px;
    }

    .inno-upload-preview-row {
        flex-direction: column;
    }

    .inno-mockup-result {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    /* Embroidery button row: stack on mobile */
    .inno-emb-btn-row {
        flex-direction: column;
    }

    .inno-emb-btn-row .inno-emb-open-btn,
    .inno-emb-btn-row .inno-generate-mockup-button {
        width: 100%;
        box-sizing: border-box;
    }

    /* Mockup controls: stack orientation toggle and generate button */
    .inno-mockup-controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .inno-mockup-controls-row .inno-orientation-toggle {
        width: 100%;
        box-sizing: border-box;
    }

    .inno-mockup-controls-row .inno-generate-mockup-button {
        width: 100%;
        box-sizing: border-box;
    }

    .inno-orientation-option {
        font-size: 12px;
        padding: 6px 10px;
    }

    .inno-generate-mockup-button {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .inno-swatch-container {
        gap: 6px;
    }

    .inno-swatch-color {
        width: 32px;
        height: 32px;
    }

    .inno-swatch-text {
        min-width: 40px;
        height: 32px;
        padding: 5px 10px;
        font-size: 12px;
    }

    .inno-swatch-image {
        width: 66px;
    }

    .inno-swatch-image img {
        height: 62px;
    }

    .inno-swatch-image-label {
        font-size: 10px;
        padding: 4px 5px;
    }

    .inno-qty-pricing {
        max-width: 100%;
        min-width: 0;
    }

    .inno-qty-head-input {
        width: 54px;
        height: 32px;
        font-size: 16px;
        padding: 0 5px;
    }

    .inno-qty-top {
        padding: 12px 12px 3px;
        gap: 8px;
    }

    .inno-total-value {
        font-size: 21px;
    }

    .inno-qty-subline {
        font-size: 10px;
    }

    .inno-qty-slider-wrap {
        padding: 7px 12px 0;
    }

    .inno-qty-marks {
        left: 12px;
        right: 12px;
        top: 7px;
    }

    .inno-tier-range {
        font-size: 8px;
    }

    .inno-tier-price {
        font-size: 13px;
    }

    .inno-tier-discount {
        font-size: 8px;
    }

    .inno-qty-tiers {
        padding: 7px 8px 10px;
        gap: 3px;
    }

    .inno-tier-box {
        padding: 7px 2px 5px;
    }

    .inno-saving-note {
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* Hide PayPal express buttons on product pages (conflicts with quote flow) */
.single-product #ppc-button,
.single-product #ppc-button-ppcp-gateway,
.single-product #ppcp-button-product,
.single-product .ppcp-messages,
.single-product #ppcp-messages,
.single-product .ppc-button-wrapper,
.single-product #ppcp-hosted-fields,
.single-product .ppcp-button-apm,
.single-product .wc-gateway-ppcp,
.single-product .ppcp-gateway-button-container,
.single-product .ppc-button,
.single-product [id^="ppc-button"],
.single-product [id^="ppcp-button"],
.single-product [class*="ppcp-"],
.single-product [class*="paypal-button"] {
    display: none !important;
}

/* ========================================
   Variation Description
   ======================================== */

.inno-variation-description {
    margin: 10px 0;
    padding: 12px 16px;
    background: var(--inno-surface-alt);
    border: 1px solid var(--inno-border);
    border-radius: var(--inno-radius-md);
    font-size: 13px;
    line-height: 1.6;
    color: var(--inno-ink);
}

/* Desktop: hide original — only the floating clone should display */
@media (min-width: 769px) {
    .inno-variation-description {
        display: none !important;
    }
}

.inno-variation-description:empty {
    display: none;
}

.inno-variation-description p {
    margin: 0 0 6px;
}

.inno-variation-description p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Large-Order Chat CTA
   Non-blocking banner shown above the Add to Cart
   button when quantity exceeds the towel-type soft
   limit. Does NOT replace Buy — sits alongside it.
   ======================================== */

.inno-chat-cta {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.inno-chat-cta-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--inno-radius-md, 12px);
    background: linear-gradient(135deg, #eef4ff 0%, #e8f0fe 100%);
    border: 1.5px solid rgba(26, 115, 232, 0.25);
}

.inno-chat-cta-inner svg {
    flex-shrink: 0;
    color: #1a73e8;
}

.inno-chat-cta-text {
    flex: 1 1 0;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}

.inno-chat-cta-text strong {
    color: #1a73e8;
}

.inno-chat-cta-btn {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.inno-chat-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
}

@media (max-width: 480px) {
    .inno-chat-cta-inner {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }

    .inno-chat-cta-btn {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   Product Catalog — Grid & Square Images
   ======================================== */

/* Override WooCommerce block grid: 4 columns default, 5 on large screens */
ul.wc-block-product-template.columns-3,
ul.wc-block-product-template.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

@media (min-width: 1400px) {
    ul.wc-block-product-template.columns-3,
    ul.wc-block-product-template.columns-4 {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 768px) {
    ul.wc-block-product-template.columns-3,
    ul.wc-block-product-template.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Force 1:1 aspect ratio with contain on all catalog images */
.wc-block-components-product-image,
.wc-block-grid__product-image {
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff;
}

.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image a, .wc-block-components-product-image a {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-block-components-product-image img,
.wc-block-grid__product-image img,
img.attachment-woocommerce_thumbnail {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    aspect-ratio: auto;
}

/* Classic WooCommerce product loop fallback */
.products .product .woocommerce-loop-product__link img,
.products .product > a img {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background: #fff;
}

/* ========================================
   Hide Short Product Description
   ======================================== */

.single-product .woocommerce-product-details__short-description,
.single-product .wp-block-post-excerpt {
    display: none !important;
}

/* ========================================
   Variation Description in Floating Panel
   ======================================== */

.inno-variation-description-clone {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--inno-surface, #faf8f5);
    border: 1px solid #ebe7e0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--inno-ink, #333);
}

.inno-variation-description-clone p {
    margin: 0 0 6px;
}

.inno-variation-description-clone p:last-child {
    margin-bottom: 0;
}