/* Configurator styles, adapted from public_html/a. */
/* Layout Container */
.main-layout {
    display: flex;
    flex-direction: row;
    gap: 48px;
    width: 100%;
    max-width: 1200px;
    align-items: flex-start;
    padding: 32px 24px;
}

/* Left Column: Gallery */
.gallery-column {
    position: -webkit-sticky;
    position: sticky;
    top: 32px;
    flex: 1;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mockup-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 10; 
    background-color: var(--bg-alt);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
}

/* Product Wrapper dynamically scales both the garment AND the artwork simultaneously */
.product-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
}

.shirt-base {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.artwork-container {
    position: absolute;
    top: 25%;
    width: 55%;
    left: 22.5%; 
    aspect-ratio: 2 / 1;
    z-index: 2;
    transition: opacity 0.15s ease-in-out;
    pointer-events: none;
    opacity: 1;
}

.chart-graphic {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    transition: filter 0.3s ease-in-out, mix-blend-mode 0.3s ease-in-out;
    mix-blend-mode: multiply; 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ticker-label {
    position: absolute;
    top: -15%;
    left: 4%; 
    font-size: clamp(14px, 3.5vw, 20px);
    font-weight: 900;
    color: #15803D; 
    font-family: sans-serif; 
    letter-spacing: 1px;
    text-transform: uppercase; 
    pointer-events: none;
    transition: color 0.3s, mix-blend-mode 0.3s ease-in-out;
}

.protection-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10; cursor: default;
}

/* Right Column: Controls */
.controls-column {
    display: flex;
    flex-direction: column; 
    flex: 1;
    width: 100%;
    gap: 32px; 
    max-width: 500px;
}

/* Sticky One-Line Product Header */
.product-header-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 110;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 4px;
    margin-top: -16px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 10px -10px rgba(0,0,0,0.08);
}

.product-title {
    margin: 0;
    font-size: 1.35rem;
    color: var(--text-main);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main); 
    white-space: nowrap;
    margin-left: 16px;
}

.product-short-desc {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-sec);
    margin: -16px 0 0 0;
}

/* Sections */
.control-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    border-radius: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
}

.section-header h3 {
    color: var(--text-main);
    margin: 0; 
    font-size: 0.95rem;
    font-weight: 600;
}

.text-link {
    font-size: 0.85rem;
    color: var(--text-sec);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.text-link:hover { color: var(--text-main); }

/* Inputs & Buttons */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

input[type="text"], textarea {
    width: 100%;
    padding: 12px 16px; 
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"] { font-weight: 600; text-transform: uppercase; }

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--border-active);
    box-shadow: 0 0 0 1px var(--border-active);
}

.autocomplete-list {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 101;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.trending-subtitle {
    padding: 12px 16px 4px 16px;
    font-size: 0.75rem;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.autocomplete-list div.item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
}
.autocomplete-list div.item:hover { background-color: var(--bg-alt); }

.box-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.box-btn {
    padding: 10px 16px; 
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.box-btn:hover { border-color: var(--border-active); }
.box-btn.active {
    background-color: var(--bg-alt);
    border-color: var(--text-main);
    font-weight: 600;
}

/* Swatches */
.swatches {
    display: flex;
    gap: 12px; 
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

.swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 56px; 
}

.swatch-label {
    font-size: 0.75rem;
    color: var(--text-sec);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%; 
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
    padding: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swatch:hover { box-shadow: inset 0 0 0 1px var(--text-main); }
.swatch.active {
    outline: none;
    border-color: var(--text-main);
    /* Two contrasting inset rings stay inside even tightly spaced swatches. */
    box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--text-main);
}
.swatch:focus-visible {
    outline: 2px dashed var(--text-main);
    outline-offset: -4px;
    box-shadow: inset 0 0 0 4px #fff;
}

.swatch.active::after {
    content: '';
    width: 16px;
    height: 16px;
    background-color: transparent;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23808080" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    background-size: cover;
    position: absolute;
    z-index: 5;
}
.swatch[data-color="color-white"].active::after,
.swatch[data-light="true"].active::after,
.swatch[style*="#ffffff"].active::after,
.swatch[style*="#eeeeee"].active::after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23111827" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
}
.swatch.active[style*="#000000"]::after,
.swatch[data-color="color-black"].active::after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
}

/* Order Note */
details.order-note {
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}
details.order-note summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
}
details.order-note summary::-webkit-details-marker { display: none; }
details.order-note summary::after { content: "+"; font-size: 1.2rem; line-height: 1; }
details[open].order-note summary::after { content: "−"; }

details.order-note textarea {
    margin-top: 16px;
    min-height: 80px;
}

/* Checkout Section */
.checkout-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.add-to-cart-btn {
    width: 100%;
    padding: 16px; 
    background-color: var(--brand-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.add-to-cart-btn:hover { background-color: var(--brand-green-hover); }
.add-to-cart-btn:active { transform: scale(0.98); }

.delivery-summary {
    font-size: 0.85rem;
    color: var(--text-sec);
    line-height: 1.6;
    background: var(--bg-alt);
    padding: 16px;
    border-radius: 8px;
}
.delivery-summary strong { color: var(--text-main); }
.delivery-summary a { color: var(--text-main); text-decoration: underline; }

.error-msg {
    color: var(--error-text);
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
    background: var(--error-bg);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #FECACA;
}

.highlight-error {
    box-shadow: 0 0 0 2px var(--error-text);
    padding: 12px;
    margin: -12px;
    border-radius: 12px;
    background: var(--error-bg);
}

/* Below Fold Details */
.product-details-container {
    width: 100%;
    max-width: 1200px;
    padding: 48px 24px;
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.details-section h2 {
    font-size: 1.5rem;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}
.details-section p, .details-section li {
    font-size: 1rem;
    color: var(--text-sec);
    line-height: 1.6;
}

/* Graphic Color Filters */
.color-blue       { filter: none; }
.color-black      { filter: url(#filter-black-artwork); }
.color-deepgreen  { filter: hue-rotate(-65deg) saturate(1.5) brightness(0.8); }
.color-green      { filter: hue-rotate(-80deg) saturate(1.5); }
.color-yellow     { filter: hue-rotate(-160deg) saturate(3) brightness(1.5); }
.color-red        { filter: hue-rotate(150deg) saturate(2) brightness(1.1); }
.color-purple     { filter: hue-rotate(80deg) saturate(1.2); }
.color-neongreen  { filter: hue-rotate(-110deg) saturate(3.5) brightness(1.4); }
.color-white      { filter: grayscale(100%) brightness(2.5); }

