/* WooCommerce Size Guide — Frontend Styles */

/* ── Size Guide Button ─────────────────────────────────── */
.wsg-button-wrap {
    margin: 8px 0 4px;
}

.wsg-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1.5px solid #c9356e;
    border-radius: 20px;
    color: #c9356e;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.wsg-open-btn svg {
    flex-shrink: 0;
    transition: stroke 0.2s;
}

.wsg-open-btn:hover {
    background: #c9356e;
    color: #fff;
}

.wsg-open-btn:hover svg {
    stroke: #fff;
}

/* ── Overlay ───────────────────────────────────────────── */
.wsg-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wsg-overlay.wsg-visible {
    display: block;
    opacity: 1;
}

/* ── Slide Panel ───────────────────────────────────────── */
.wsg-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 480px;
    max-width: 100vw;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    /*border-radius: 12px 0 0 12px;*/
    overflow: hidden;
}

.wsg-panel.wsg-open {
    transform: translateX(0);
}

/* ── Panel Header ──────────────────────────────────────── */
.wsg-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fdf0f4;
    border-bottom: 1px solid #f0d0da;
    flex-shrink: 0;
}

.wsg-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1.3;
}

.wsg-panel-title svg {
    stroke: #c9356e;
    flex-shrink: 0;
}

.wsg-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Unit Toggle ───────────────────────────────────────── */
.wsg-unit-toggle {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
    padding: 2px;
    gap: 2px;
}

.wsg-unit-btn {
    border: none;
    background: transparent;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    line-height: 1.4;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wsg-unit-btn.active {
    background: #c9356e;
    color: #fff;
}

.wsg-unit-btn:not(.active):hover {
    background: #f5e0e8;
    color: #c9356e;
}

.wsg-unit-label {
    font-size: 12px;
    font-weight: 700;
    color: #c9356e;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: #fce8ef;
    border-radius: 12px;
    padding: 4px 12px;
}

/* ── Close Button ──────────────────────────────────────── */
.wsg-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #555;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.wsg-close-btn:hover {
    background: #f0d0da;
    color: #c9356e;
}

/* ── Panel Body ────────────────────────────────────────── */
.wsg-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.wsg-panel-body::-webkit-scrollbar {
    width: 5px;
}

.wsg-panel-body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.wsg-panel-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

/* ── Unit Content Tabs ─────────────────────────────────── */
.wsg-unit-content {
    display: none;
}

.wsg-unit-content.active {
    display: block;
}

.wsg-image-wrap {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #fafafa;
}

.wsg-image-wrap:last-child {
    margin-bottom: 0;
}

.wsg-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 520px) {
    .wsg-panel {
        width: 100vw;
        border-radius: 0;
    }

    .wsg-panel-header {
        padding: 14px 16px;
    }

    .wsg-panel-title {
        font-size: 14px;
    }

    .wsg-unit-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .wsg-panel-body {
        padding: 16px;
    }
}

/* ── Body lock when panel open ─────────────────────────── */
body.wsg-panel-open {
    overflow: hidden;
}
