/* AATB – Add All To Basket
   Override these on :root or a parent to rebrand. */

   :root {
    --AATB-accent: #d2b98b;
    --AATB-accent-hover: #b7a37e;
    --AATB-accent-text: #3b3b3b;
    --AATB-text: #252525;
    --AATB-text-muted: #6b7280;
    --AATB-bg: #fafafa;
    --AATB-bg-muted: #f1f3f4;
    --AATB-border: #e5e7eb;
    --AATB-radius: 5px;
    --AATB-sale: #b91c1c;
}

/* Hide quicklook popup during size extraction */
.quicklookitem-wrapper[data-state="open"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ── Animations ── */

@keyframes AATB-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes AATB-ripple {
    to { transform: scale(4); opacity: 0; }
}
@keyframes AATB-spin {
    to { transform: rotate(360deg); }
}
.AATB-selected { position: relative; }

/* ── Size selector panel ── */

.AATB-size-selector {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    animation: AATB-fadeIn 0.2s ease-out;
    background: var(--AATB-bg) !important;
    border-radius: var(--AATB-radius) !important;
    transition: opacity 0.2s ease !important;
    opacity: 1;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}
.AATB-size-selector .AATB-size-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--AATB-text);
}
.AATB-size-selector .AATB-size-selector-header span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: bold;
}
.AATB-size-selector .AATB-size-selector-close {
    background: var(--AATB-bg-muted);
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 8px;
    line-height: 1;
    border-radius: var(--AATB-radius);
    color: var(--AATB-text-muted);
    transition: background 0.2s ease, color 0.2s ease;
    height: 20px;
}
.AATB-size-selector .AATB-size-selector-close:hover {
    background: var(--AATB-border);
    color: var(--AATB-text);
}
.AATB-size-selector .AATB-size-selector-grid {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    flex-flow: column;
    align-content: start;
}

/* ── Size option buttons ── */

.AATB-size-option {
    padding: 8px 12px;
    border: 2px solid var(--AATB-border);
    background: var(--AATB-bg);
    border-radius: var(--AATB-radius);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    user-select: none;
    text-align: center;
    color: var(--AATB-text);
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    min-height: fit-content;
}
.AATB-size-option:hover:not(.AATB-size-option--selected):not([aria-disabled="true"]) {
    border-color: var(--AATB-accent);
    background-color: var(--AATB-bg-muted);
}
.AATB-size-option.AATB-size-option--selected {
    border-color: var(--AATB-accent);
    background: var(--AATB-accent);
    color: var(--AATB-accent-text);
    font-weight: 600;
}
.AATB-size-option[aria-disabled="true"] {
    opacity: 0.5;
    text-decoration: line-through;
    pointer-events: none;
    background: var(--AATB-bg-muted);
}
.AATB-size-selector .AATB-size-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: AATB-ripple 0.6s ease-out;
    width: 100px;
    height: 100px;
    left: 50%;
    top: 50%;
    margin-left: -50px;
    margin-top: -50px;
    pointer-events: none;
}

/* ── Bundle bar ── */

#AATB-bundle-bar {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: .8rem;
    background: var(--AATB-bg);
    border: 1px solid var(--AATB-border);
    border-radius: var(--AATB-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    max-width: 100%;
}
#AATB-bundle-bar .AATB-bundle-left  { flex: 1; min-width: 0; }
#AATB-bundle-bar .AATB-bundle-right { flex: 0 0 auto; min-width: 180px; }
#AATB-bundle-bar .AATB-bundle-total-wrap {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--AATB-text-muted);
}
#AATB-bundle-bar .AATB-bundle-total {
    font-size: 18px;
    color: var(--AATB-text);
}

@media (max-width: 640px) {
    #AATB-bundle-bar { flex-direction: column; }
    #AATB-bundle-bar .AATB-bundle-right { min-width: 100%; }
}

/* ── Choose Size button ── */

.AATB-choose-size-btn {
    margin-top: 12px;
    padding: .2rem;
    background: var(--AATB-accent) !important;
    color: var(--AATB-accent-text);
    border-radius: var(--AATB-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    user-select: none;
    transition: background 0.2s ease !important;
    border: none !important;
}
.AATB-choose-size-btn:hover {
    background: var(--AATB-accent-hover) !important;
}

/* ── Add to Cart button ── */

.AATB-bundle-add-btn {
    width: 100%;
    padding: .5rem;
    background: var(--AATB-accent);
    border: 1px solid var(--AATB-accent);
    border-radius: var(--AATB-radius);
    color: var(--AATB-accent-text);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    line-height: normal;
    height: fit-content;
}
.AATB-bundle-add-btn:hover:not(:disabled) {
    background: var(--AATB-accent-hover);
    border-color: var(--AATB-accent-hover);
    color: var(--AATB-accent-text);
}
.AATB-bundle-add-btn:disabled {
    opacity: 0.9;
    cursor: not-allowed;
    background: var(--AATB-border) !important;
    border-color: var(--AATB-border);
}

/* ── Selected list mini-cards ── */

#AATB-bundle-selected-list { min-height: 0; }
#AATB-bundle-selected-list .AATB-bundle-list-heading {
    font-size: 12px;
    font-weight: 600;
    color: var(--AATB-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}
.AATB-bundle-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--AATB-bg-muted);
    font-size: 13px;
}
.AATB-bundle-card:last-child { border-bottom: none; }
.AATB-bundle-card-img {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--AATB-radius);
    overflow: hidden;
    background: var(--AATB-bg-muted);
}
.AATB-bundle-card-img img { width: 100%; height: 100%; object-fit: cover; }
.AATB-bundle-card-text {min-width: 0;flex: 1;}
.AATB-bundle-card-title {
    font-weight: 500;
    color: var(--AATB-text);
    /* white-space: nowrap; */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
}
.AATB-bundle-card-size {
    color: var(--AATB-text-muted);
    font-size: 12px;
    margin-top: 2px;
}
.AATB-bundle-remove-btn {
    flex-shrink: 0;
    padding: 5px;
    background: var(--AATB-bg);
    border: 1px solid var(--AATB-border);
    border-radius: var(--AATB-radius);
    color: var(--AATB-text-muted);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    height: 30px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.AATB-bundle-remove-btn:hover {
    background: var(--AATB-bg-muted);
    border-color: var(--AATB-text-muted);
}

/* ── Loading indicator ── */

.AATB-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--AATB-bg-muted);
    border-radius: var(--AATB-radius);
    border: 1px solid var(--AATB-border);
    color: var(--AATB-text-muted);
    font-size: 14px;
    box-sizing: border-box;
}
.AATB-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--AATB-border);
    border-top-color: var(--AATB-accent);
    border-radius: 50%;
    animation: AATB-spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* ── Container section (scoped to [data-aatb]) ── */

[data-aatb] {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
[data-aatb] .col-1 > h2 {
    color: var(--AATB-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}
[data-aatb] .flexslider { margin: 0; }
[data-aatb] .flexslider .slides {
    list-style: none;
    margin: 0;
    padding: 0;
}
[data-aatb] .flexslider .slides > li {
    box-sizing: border-box;
    position: relative;
    background: var(--AATB-bg);
    border: 1px solid var(--AATB-border);
    border-radius: var(--AATB-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.25s ease;
    padding: .5rem;
    margin-right: .5rem;
    flex: 1 1;
}
[data-aatb] .flexslider .slides > li:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
[data-aatb] .flexslider .slides > li > a {
    text-decoration: none;
    color: inherit;
    display: block;
}
[data-aatb] .flexslider .slides > li .flipmeContain {
    aspect-ratio: 1 / 1;
    background-color: #f9fafb !important;
    background-size: cover !important;
    background-position: center !important;
    max-width: 100%;
}
[data-aatb] .flexslider .slides > li .item-repeater-info-name {
    color: var(--AATB-text);
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
    padding-bottom: 0px;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;  
    overflow: hidden !important;
    
    /* Keep your height constraints so the box stays consistent */
    line-height: 1.5 !important;
    height: 3lh !important;
    min-height: 3lh !important;
    max-height: 3lh !important;
}
[data-aatb] .flexslider .slides > li .pricingRepeater {
    color: var(--AATB-text);
    font-size: 14px;
    font-weight: 600;
}
[data-aatb] .flexslider .slides > li .nowPrice-repeater {
    /* color: var(--AATB-sale); */
}
[data-aatb] .flexslider .slides > li .standardPrice-repeater {
    color: var(--AATB-text-muted);
    font-weight: 500;
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 6px;
}
