/**
 * WC Outfit Inspiration Styles (AboutYou aesthetic)
 */

:root {
    --wcoi-bg-card: #f5f5f5;
    --wcoi-bg-card-hover: #efefef;
    --wcoi-border: #e6e6e6;
    --wcoi-text-primary: #111111;
    --wcoi-text-muted: #666666;
    --wcoi-btn-bg: #ffffff;
    --wcoi-btn-text: #111111;
    --wcoi-btn-border: #e2e2e2;
    --wcoi-radius-card: 4px;
    --wcoi-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wcoi-section {
    position: relative;
    width: 100%;
    margin: 45px 0 35px;
    padding: 10px 0;
    font-family: var(--wcoi-font-family);
    box-sizing: border-box;
    overflow: hidden;
}

.wcoi-section *,
.wcoi-section *::before,
.wcoi-section *::after {
    box-sizing: border-box;
}

/* Header */
.wcoi-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 15px;
}

.wcoi-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--wcoi-text-muted);
    margin-bottom: 6px;
}

.wcoi-title {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--wcoi-text-primary);
    margin: 0;
    line-height: 1.25;
}

/* Slider Track Wrapper */
.wcoi-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0 15px;
}

.wcoi-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    cursor: grab;
}

.wcoi-track.is-dragging {
    cursor: grabbing;
    transition: none;
}

/* Individual Slide */
.wcoi-slide {
    flex: 0 0 88%;
    max-width: 520px;
    padding: 0 6px;
    box-sizing: border-box;
    opacity: 0.45;
    transform: scale(0.96);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wcoi-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

/* Card Outfit Layout */
.wcoi-outfit-card {
    display: flex;
    gap: 6px;
    height: 420px;
    width: 100%;
    background: transparent;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .wcoi-outfit-card {
        height: 380px;
        gap: 5px;
    }
}

/* Desktop sizing & layout enhancements */
@media (min-width: 768px) {
    .wcoi-slide {
        flex: 0 0 580px;
        max-width: 620px;
        padding: 0 8px;
    }
    .wcoi-outfit-card {
        height: 460px;
        gap: 8px;
    }
}

/* Left Hero Column */
.wcoi-col-main {
    flex: 0 0 62%;
    position: relative;
    background: var(--wcoi-bg-card);
    border-radius: var(--wcoi-radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 14px 12px 14px;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.wcoi-col-main:hover {
    background: var(--wcoi-bg-card-hover);
}

.wcoi-main-img-link {
    flex: 1 1 auto;
    min-height: 0; /* Crucial: allows image container to flex-shrink without forcing button out */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    box-sizing: border-box;
    padding: 4px 0;
}

.wcoi-main-img {
    max-width: 92%;
    max-height: 94%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.wcoi-col-main:hover .wcoi-main-img {
    transform: scale(1.03);
}

/* Desktop Main Product Info (Title & Price) */
.wcoi-main-info {
    display: none;
    flex: 0 0 auto;
    width: 100%;
    padding: 8px 4px 4px;
    text-align: left;
    box-sizing: border-box;
}

.wcoi-main-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wcoi-text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 3px;
}

.wcoi-main-title:hover {
    text-decoration: underline;
}

.wcoi-main-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--wcoi-text-primary);
    line-height: 1.2;
}

.wcoi-main-price del {
    color: #888888;
    font-size: 12px;
    font-weight: normal;
    margin-right: 4px;
}

.wcoi-main-price ins {
    text-decoration: none;
    color: #d32f2f;
}

@media (min-width: 768px) {
    .wcoi-main-info {
        display: block;
    }
}

.wcoi-main-action {
    flex: 0 0 auto;
    position: relative;
    width: 100%;
    z-index: 3;
    padding: 6px 0 0;
    margin-top: auto;
    box-sizing: border-box;
}

.wcoi-btn-view-outfit {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: var(--wcoi-btn-bg);
    color: var(--wcoi-btn-text);
    border: 1px solid var(--wcoi-btn-border);
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.3px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
    text-align: center;
    line-height: 1.3;
    margin: 0;
}

.wcoi-btn-view-outfit:hover {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Right Stack Column (3 stacked items) */
.wcoi-col-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .wcoi-col-stack {
        gap: 5px;
    }
}

@media (min-width: 768px) {
    .wcoi-col-stack {
        flex: 0 0 38%;
        gap: 8px;
    }
}

.wcoi-mini-card {
    flex: 1;
    background: var(--wcoi-bg-card);
    border-radius: var(--wcoi-radius-card);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.wcoi-mini-card:hover {
    background: var(--wcoi-bg-card-hover);
}

.wcoi-mini-card.wcoi-mini-empty {
    background: #fbfbfb;
    border: 1px dashed #e8e8e8;
}

.wcoi-mini-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    box-sizing: border-box;
    padding: 6px;
}

.wcoi-mini-thumb-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.wcoi-mini-img {
    max-width: 88%;
    max-height: 88%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease;
}

.wcoi-mini-card:hover .wcoi-mini-img {
    transform: scale(1.06);
}

/* Mobile: Mini Item Floating Tooltip on Hover/Tap */
@media (max-width: 767px) {
    .wcoi-mini-info {
        position: absolute;
        bottom: 4px;
        left: 4px;
        right: 4px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        padding: 4px 6px;
        border-radius: 3px;
        font-size: 10px;
        color: #111;
        display: flex;
        flex-direction: column;
        opacity: 0;
        transform: translateY(4px);
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: none;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        z-index: 2;
    }
    .wcoi-mini-card:hover .wcoi-mini-info {
        opacity: 1;
        transform: translateY(0);
    }
    .wcoi-mini-name {
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 10px;
    }
    .wcoi-mini-price {
        font-size: 10px;
        color: #000;
        font-weight: 700;
    }
}

/* Desktop: Mini items show Title and Price BY DEFAULT */
@media (min-width: 768px) {
    .wcoi-mini-card {
        padding: 6px 10px;
    }
    .wcoi-mini-link {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        padding: 0 !important;
    }
    .wcoi-mini-thumb-wrap {
        width: 60px !important;
        height: 68px !important;
        flex-shrink: 0 !important;
        background: #ffffff;
        border-radius: 3px;
        padding: 4px;
        box-sizing: border-box;
    }
    .wcoi-mini-img {
        max-width: 100% !important;
        max-height: 100% !important;
    }
    .wcoi-mini-info {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        min-width: 0 !important;
        flex: 1 !important;
        text-align: left !important;
        position: static !important;
        opacity: 1 !important;
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        pointer-events: auto !important;
    }
    .wcoi-mini-name {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 12px;
        font-weight: 600;
        color: var(--wcoi-text-primary);
        line-height: 1.3;
        margin-bottom: 3px;
        white-space: normal;
    }
    .wcoi-mini-price {
        font-size: 13px;
        font-weight: 800;
        color: var(--wcoi-text-primary);
        line-height: 1.2;
    }
    .wcoi-mini-price del {
        color: #888;
        font-size: 11px;
        font-weight: normal;
        margin-right: 3px;
    }
    .wcoi-mini-price ins {
        text-decoration: none;
        color: #d32f2f;
    }
}

/* Bottom Navigation Bar (< 3 / 8 >) */
.wcoi-nav-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 22px !important;
}

.wcoi-nav-bar .wcoi-nav-btn {
    all: unset !important;
    box-sizing: border-box !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border-radius: 50% !important;
    border: 1px solid #dcdcdc !important;
    background: #ffffff !important;
    color: #111111 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    outline: none !important;
    position: relative !important;
    overflow: visible !important;
    text-indent: 0 !important;
    line-height: 1 !important;
}

.wcoi-nav-bar .wcoi-nav-btn:hover:not(:disabled) {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

.wcoi-nav-bar .wcoi-nav-btn:hover:not(:disabled) .wcoi-arrow-svg {
    stroke: #ffffff !important;
}

.wcoi-nav-bar .wcoi-nav-btn:hover:not(:disabled) .wcoi-arrow-fallback {
    color: #ffffff !important;
}

.wcoi-nav-bar .wcoi-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.wcoi-nav-bar .wcoi-nav-btn .wcoi-arrow-svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    display: block !important;
    stroke: #111111 !important;
    stroke-width: 2.5 !important;
    fill: none !important;
    pointer-events: none !important;
    margin: auto !important;
    transition: stroke 0.2s ease !important;
}

/* Fallback chevron icon if SVG is blocked or unsupported */
.wcoi-nav-bar .wcoi-nav-btn .wcoi-arrow-fallback {
    display: none;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    color: #111111;
}

.wcoi-counter {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #777777 !important;
    min-width: 58px !important;
    justify-content: center !important;
    user-select: none !important;
}

.wcoi-current-index {
    color: #111111 !important;
    font-weight: 700 !important;
}

.wcoi-divider {
    color: #999999 !important;
}

/* Modal / Bottom Sheet Popup */
.wcoi-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.25s, opacity 0.25s ease;
}

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

.wcoi-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.wcoi-modal-container {
    position: relative;
    background: #ffffff;
    width: 92%;
    max-width: 580px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 2;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.wcoi-modal.is-open .wcoi-modal-container {
    transform: translateY(0) scale(1);
}

/* Mobile Bottom Sheet style */
@media (max-width: 540px) {
    .wcoi-modal {
        align-items: flex-end;
    }
    .wcoi-modal-container {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
        transform: translateY(100%);
    }
    .wcoi-modal.is-open .wcoi-modal-container {
        transform: translateY(0);
    }
}

.wcoi-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #ebebeb;
}

.wcoi-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcoi-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #555555;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.wcoi-modal-close:hover {
    background: #f0f0f0;
    color: #111111;
}

.wcoi-modal-body {
    padding: 18px 22px 25px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Modal Loader */
.wcoi-modal-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    gap: 12px;
    color: #666;
    font-size: 14px;
}

.wcoi-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #111;
    border-radius: 50%;
    animation: wcoi-spin 0.8s linear infinite;
}

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

/* Outfit Grid in Modal */
.wcoi-outfit-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wcoi-modal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.wcoi-modal-item:hover {
    background: #f2f2f2;
}

.wcoi-modal-item-thumb {
    width: 68px;
    height: 80px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcoi-modal-item-thumb img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.wcoi-modal-item-info {
    flex: 1;
    min-width: 0;
}

.wcoi-modal-item-title {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.wcoi-modal-item-title a {
    color: #111111;
    text-decoration: none;
}

.wcoi-modal-item-title a:hover {
    text-decoration: underline;
}

.wcoi-modal-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 8px;
}

.wcoi-modal-item-price del {
    color: #888;
    font-weight: normal;
    margin-right: 5px;
}

.wcoi-modal-item-price ins {
    text-decoration: none;
    color: #d32f2f;
}

.wcoi-modal-item-action {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wcoi-btn-modal {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    background: #111111;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.wcoi-btn-modal:hover {
    background: #333333;
}

.wcoi-link-view {
    font-size: 12px;
    color: #555555;
    text-decoration: none;
    font-weight: 500;
}

.wcoi-link-view:hover {
    color: #111111;
    text-decoration: underline;
}

.wcoi-badge-outofstock {
    font-size: 11px;
    font-weight: 600;
    color: #d32f2f;
    background: #ffebee;
    padding: 3px 8px;
    border-radius: 4px;
}
