/* ============================================
   Size Guide — قطب‌نمای سایز بانو جناب
   ============================================ */

.size-guide-page {
    padding-bottom: var(--spacing-2xl, 3rem);
}

.size-guide-page .container {
    max-width: 920px;
}

/* ---------- Hero atelier ---------- */
.sg-hero {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    margin: 1.5rem 0 2rem;
    min-height: 280px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(ellipse at 18% 50%, rgba(201, 169, 98, 0.22) 0%, transparent 55%),
        linear-gradient(145deg, #1c1c1c 0%, #0f0f0f 55%, #1a1610 100%);
    color: #fff;
    isolation: isolate;
}

.sg-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 18px,
            rgba(201, 169, 98, 0.04) 18px,
            rgba(201, 169, 98, 0.04) 19px
        );
    pointer-events: none;
    opacity: 0.6;
}

.sg-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.sg-tape-track {
    position: absolute;
    top: 18px;
    left: -8%;
    right: -8%;
    height: 22px;
    transform: rotate(-2deg);
    overflow: hidden;
}

.sg-tape-strip {
    height: 100%;
    width: 220%;
    background:
        repeating-linear-gradient(
            90deg,
            #c9a962 0 10px,
            #f3e6c4 10px 20px,
            #c9a962 20px 22px,
            #1a1a1a 22px 24px
        );
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    animation: sgTapeSlide 18s linear infinite;
}

@keyframes sgTapeSlide {
    from { transform: translateX(0); }
    to { transform: translateX(-40%); }
}

.sg-compass {
    position: absolute;
    left: 7%;
    top: 54%;
    transform: translateY(-50%);
    width: 176px;
    height: 176px;
}

.sg-compass-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(201, 169, 98, 0.38);
    border-radius: 50%;
    animation: sgSpin 22s linear infinite;
}

.sg-compass-ring--2 {
    inset: 16%;
    animation-direction: reverse;
    animation-duration: 16s;
    border-color: rgba(201, 169, 98, 0.22);
}

.sg-compass-ring--3 {
    inset: 32%;
    animation-duration: 11s;
    border-style: dashed;
    border-color: rgba(201, 169, 98, 0.18);
}

.sg-compass-tick {
    position: absolute;
    background: var(--accent-gold, #c9a962);
    opacity: 0.7;
}

.sg-compass-tick--n,
.sg-compass-tick--s {
    width: 2px;
    height: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.sg-compass-tick--n { top: 6px; }
.sg-compass-tick--s { bottom: 6px; }

.sg-compass-tick--e,
.sg-compass-tick--w {
    width: 12px;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.sg-compass-tick--e { right: 6px; }
.sg-compass-tick--w { left: 6px; }

.sg-compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 42%;
    background: linear-gradient(to top, transparent, var(--accent-gold, #c9a962));
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(-28deg);
    border-radius: 2px;
    animation: sgNeedle 4.5s ease-in-out infinite alternate;
}

.sg-compass-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--accent-gold, #c9a962);
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.2);
}

@keyframes sgSpin {
    to { transform: rotate(360deg); }
}

@keyframes sgNeedle {
    from { transform: translate(-50%, -100%) rotate(-48deg); }
    to { transform: translate(-50%, -100%) rotate(18deg); }
}

.sg-float-sizes {
    position: absolute;
    inset: 0;
}

.sg-float-size {
    position: absolute;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(201, 169, 98, 0.28);
    animation: sgFloat 7s ease-in-out infinite;
}

.sg-float-size[data-s="S"] { top: 28%; left: 38%; font-size: 2.2rem; animation-delay: 0s; }
.sg-float-size[data-s="M"] { top: 42%; left: 48%; font-size: 3rem; animation-delay: 1.2s; }
.sg-float-size[data-s="L"] { bottom: 18%; left: 32%; font-size: 2.4rem; animation-delay: 2s; }
.sg-float-size[data-s="XL"] { top: 22%; left: 54%; font-size: 1.6rem; animation-delay: 3s; }

@keyframes sgFloat {
    0%, 100% { transform: translateY(0); opacity: 0.28; }
    50% { transform: translateY(-10px); opacity: 0.5; }
}

.sg-hero-content {
    position: relative;
    z-index: 1;
    padding: 2.4rem 2.6rem 2.2rem;
    margin-right: auto;
    max-width: 560px;
}

.sg-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--accent-gold, #c9a962);
    margin-bottom: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.28rem 0.7rem;
    border: 1px solid rgba(201, 169, 98, 0.35);
    border-radius: 999px;
    background: rgba(201, 169, 98, 0.08);
}

.sg-title {
    font-size: clamp(1.7rem, 4.4vw, 2.55rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 0.7rem;
    background: linear-gradient(90deg, #fff 0%, #f3e6c4 70%, #c9a962 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sg-subtitle {
    font-size: 0.95rem;
    opacity: 0.88;
    line-height: 1.85;
    margin-bottom: 1.2rem;
}

.sg-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.35rem;
    border-radius: 999px;
    background: var(--accent-gold, #c9a962);
    color: #1a1a1a;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(201, 169, 98, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sg-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(201, 169, 98, 0.4);
    color: #1a1a1a;
}

/* ---------- Gender ---------- */
.sg-gender-switch {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.sg-gender-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.6rem;
    border: 1.5px solid var(--border-color, #e5e5e5);
    border-radius: 999px;
    background: var(--bg-primary, #fff);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-secondary, #666);
}

.sg-gender-btn:hover {
    border-color: var(--accent-gold, #c9a962);
    color: var(--text-primary, #1a1a1a);
}

.sg-gender-btn.active {
    background: var(--color-charcoal, #2d2d2d);
    border-color: var(--color-charcoal, #2d2d2d);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

html.gender-female .sg-gender-btn.active {
    background: #6b4f12;
    border-color: #6b4f12;
}

.sg-gender-icon {
    width: 20px;
    height: 20px;
    display: flex;
}

.sg-gender-icon svg {
    width: 100%;
    height: 100%;
}

/* ---------- Wizard ---------- */
.sg-wizard {
    background:
        linear-gradient(180deg, rgba(201, 169, 98, 0.06) 0%, transparent 90px),
        var(--bg-primary, #fff);
    border: 1px solid rgba(201, 169, 98, 0.18);
    border-radius: 24px;
    padding: 1.6rem 1.5rem 1.4rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.05);
    scroll-margin-top: 90px;
}

.sg-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0 0 1.6rem;
    padding: 0;
    list-style: none;
    gap: 0.25rem;
    position: relative;
}

.sg-steps::before {
    content: "";
    position: absolute;
    top: 16px;
    right: 12%;
    left: 12%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold, #c9a962), var(--border-color, #eee));
    z-index: 0;
}

.sg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.sg-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    background: #fff;
    border: 2px solid var(--border-color, #ddd);
    color: var(--text-secondary, #888);
    transition: all 0.3s ease;
}

.sg-step.active .sg-step-num {
    background: var(--accent-gold, #c9a962);
    border-color: var(--accent-gold, #c9a962);
    color: #1a1a1a;
    box-shadow: 0 0 0 5px rgba(201, 169, 98, 0.18);
}

.sg-step.done .sg-step-num {
    background: var(--color-charcoal, #2d2d2d);
    border-color: var(--color-charcoal, #2d2d2d);
    color: #fff;
}

.sg-step-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary, #888);
}

.sg-step.active .sg-step-label {
    color: var(--text-primary, #1a1a1a);
}

.sg-panel {
    display: none;
    animation: sgFadeIn 0.35s ease;
}

.sg-panel.active {
    display: block;
}

@keyframes sgFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sg-panel-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    text-align: center;
}

.sg-panel-lead {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
    margin: 0 0 1.2rem;
    line-height: 1.7;
}

/* Category grid */
.sg-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.sg-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 1.3rem 0.75rem;
    border: 1.5px solid var(--border-color, #eee);
    border-radius: 16px;
    background: var(--bg-primary, #fff);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    text-align: center;
}

.sg-cat-card:hover {
    border-color: var(--accent-gold, #c9a962);
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(201, 169, 98, 0.12);
}

.sg-cat-card.active {
    border-color: var(--accent-gold, #c9a962);
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.12), rgba(201, 169, 98, 0.03));
    box-shadow: 0 8px 20px rgba(201, 169, 98, 0.16);
}

.sg-cat-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-gold, #c9a962);
}

.sg-cat-card strong {
    font-size: 0.9rem;
}

/* Method cards */
.sg-method-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 520px) {
    .sg-method-cards { grid-template-columns: 1fr; }
}

.sg-method-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1.05rem;
    border: 1.5px solid var(--border-color, #eee);
    border-radius: 16px;
    background: var(--bg-primary, #fff);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    text-align: right;
}

.sg-method-card strong {
    font-size: 0.95rem;
}

.sg-method-card span:last-child {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    line-height: 1.55;
}

.sg-method-card.active {
    border-color: var(--accent-gold, #c9a962);
    background: rgba(201, 169, 98, 0.07);
}

.sg-method-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-gold, #c9a962);
}

.sg-method-icon svg {
    width: 100%;
    height: 100%;
}

/* Body visual */
.sg-measure-visual {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background:
        radial-gradient(circle at 20% 30%, rgba(201, 169, 98, 0.12), transparent 55%),
        var(--bg-secondary, #f8f8f8);
    border-radius: 16px;
    margin-top: 0.5rem;
    border: 1px dashed rgba(201, 169, 98, 0.28);
}

.sg-body-svg {
    width: 86px;
    height: auto;
    flex-shrink: 0;
    color: var(--accent-gold, #c9a962);
}

.sg-tape-line {
    opacity: 0;
    stroke-dasharray: 6 4;
    animation: none;
}

.sg-tape-line.active {
    opacity: 0.9;
    animation: sgDash 1.2s linear infinite;
}

@keyframes sgDash {
    to { stroke-dashoffset: -20; }
}

.sg-measure-point {
    fill: var(--accent-gold, #c9a962);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sg-measure-point.active {
    opacity: 1;
    animation: sgPulse 1.5s ease infinite;
}

@keyframes sgPulse {
    0%, 100% { r: 5; opacity: 1; }
    50% { r: 7.5; opacity: 0.55; }
}

.sg-measure-hint {
    font-size: 0.88rem;
    color: var(--text-secondary, #555);
    line-height: 1.75;
    margin: 0;
}

/* Input */
.sg-input-row {
    margin-bottom: 1.25rem;
}

.sg-input-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.sg-input-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.sg-input {
    flex: 1;
    max-width: 220px;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border-color, #eee);
    border-radius: 14px;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    direction: ltr;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.sg-input:focus {
    outline: none;
    border-color: var(--accent-gold, #c9a962);
    box-shadow: 0 0 0 5px rgba(201, 169, 98, 0.15);
}

.sg-input-unit {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-gold, #c9a962);
}

/* Fit cards */
.sg-fit-label {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.sg-fit-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
}

@media (max-width: 520px) {
    .sg-fit-cards { grid-template-columns: 1fr; }
}

.sg-fit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.95rem 0.5rem;
    border: 1.5px solid var(--border-color, #eee);
    border-radius: 16px;
    background: var(--bg-primary, #fff);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    text-align: center;
}

.sg-fit-card strong {
    font-size: 0.85rem;
}

.sg-fit-card span:last-child {
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
}

.sg-fit-card.active {
    border-color: var(--accent-gold, #c9a962);
    background: rgba(201, 169, 98, 0.08);
}

.sg-fit-emoji {
    font-size: 1.05rem;
    color: var(--accent-gold, #c9a962);
}

/* Result */
.sg-result {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}

.sg-result-seal {
    position: relative;
    width: 128px;
    height: 128px;
    margin: 0 auto 1.1rem;
}

.sg-result-seal-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px dashed rgba(201, 169, 98, 0.55);
    animation: sgSpin 12s linear infinite;
}

.sg-result-badge {
    position: absolute;
    inset: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #3a3a3a, #141414);
    color: var(--accent-gold, #c9a962);
    font-size: 2.6rem;
    font-weight: 900;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    animation: sgPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.04em;
}

@keyframes sgPop {
    from { transform: scale(0.45); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.sg-result-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.sg-result-note,
.sg-result-alt {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    line-height: 1.75;
}

.sg-spectrum {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin: 1rem 0 0.65rem;
}

.sg-spectrum-item {
    min-width: 46px;
    padding: 0.4rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-color, #eee);
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--text-secondary, #888);
    background: #fff;
}

.sg-spectrum-item.is-result {
    background: var(--color-charcoal, #2d2d2d);
    color: var(--accent-gold, #c9a962);
    border-color: var(--color-charcoal, #2d2d2d);
    transform: scale(1.08);
}

.sg-result-alt {
    margin-top: 0.5rem;
    padding: 0.75rem 0.9rem;
    background: rgba(201, 169, 98, 0.12);
    border-radius: 12px;
    font-size: 0.85rem;
}

/* Nav buttons */
.sg-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #eee);
}

.sg-btn {
    padding: 0.7rem 1.55rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.sg-btn--ghost {
    background: transparent;
    color: var(--text-secondary, #666);
    border: 1px solid var(--border-color, #ddd);
}

.sg-btn--ghost:hover:not(:disabled) {
    border-color: var(--text-primary, #1a1a1a);
    color: var(--text-primary, #1a1a1a);
}

.sg-btn--ghost:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sg-btn--primary {
    background: var(--color-charcoal, #2d2d2d);
    color: #fff;
}

.sg-btn--primary:hover {
    background: var(--accent-gold, #c9a962);
    color: #1a1a1a;
}

.sg-btn--apply {
    display: inline-flex;
    margin-top: 0.9rem;
    background: var(--accent-gold, #c9a962);
    color: #1a1a1a;
}

.sg-btn--apply:hover {
    filter: brightness(1.05);
}

.sg-btn--apply[hidden] {
    display: none !important;
}

/* Charts */
.sg-charts-section {
    margin-bottom: 2.5rem;
}

.sg-charts-head {
    text-align: center;
    margin-bottom: 1.25rem;
}

.sg-charts-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.sg-charts-desc {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}

.sg-chart-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.sg-chart-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #eee);
    border-radius: 999px;
    background: var(--bg-primary, #fff);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sg-chart-tab.active {
    background: var(--color-charcoal, #2d2d2d);
    color: #fff;
    border-color: var(--color-charcoal, #2d2d2d);
}

.sg-chart-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color, #eee);
}

.sg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.sg-table th,
.sg-table td {
    padding: 0.8rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color, #eee);
}

.sg-table th {
    background: var(--bg-secondary, #f8f8f8);
    font-weight: 700;
    white-space: nowrap;
}

.sg-table tr:last-child td {
    border-bottom: none;
}

.sg-table tr:hover td {
    background: rgba(201, 169, 98, 0.05);
}

.sg-table .sg-highlight td {
    background: rgba(201, 169, 98, 0.16);
    font-weight: 700;
}

.sg-table .sg-size-code {
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent-gold, #c9a962);
}

/* Tips */
.sg-tips-title {
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.25rem;
}

.sg-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.sg-tip-card {
    padding: 1.3rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #faf8f3, #f6f6f6);
    border: 1px solid rgba(201, 169, 98, 0.16);
    position: relative;
    overflow: hidden;
}

.sg-tip-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 3px;
    background: var(--accent-gold, #c9a962);
}

.sg-tip-num {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-gold, #c9a962);
    margin-bottom: 0.5rem;
}

.sg-tip-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.sg-tip-card p {
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
    line-height: 1.65;
    margin: 0;
}

/* Modal mode */
.size-guide-widget--modal .sg-hero { display: none; }

.sg-modal-head {
    text-align: center;
    margin-bottom: 1.1rem;
}

.sg-modal-mark {
    position: relative;
    width: 42px;
    height: 42px;
    margin: 0 auto 0.55rem;
}

.sg-modal-mark-ring {
    position: absolute;
    inset: 0;
    border: 1.5px solid var(--accent-gold, #c9a962);
    border-radius: 50%;
}

.sg-modal-mark-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 40%;
    background: var(--accent-gold, #c9a962);
    transform: translate(-50%, -100%) rotate(-25deg);
    transform-origin: bottom center;
}

.sg-modal-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.sg-modal-sub {
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

.size-guide-widget--modal .sg-wizard {
    box-shadow: none;
    border: none;
    padding: 0;
    background: transparent;
}

.size-guide-widget--modal .sg-charts-section,
.size-guide-widget--modal .sg-tips {
    display: none;
}

/* Product page trigger */
.size-guide-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: auto;
    padding: 0.38rem 0.75rem;
    border: 1px solid rgba(201, 169, 98, 0.45);
    border-radius: 999px;
    background: rgba(201, 169, 98, 0.1);
    color: #8a6d2c;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.size-guide-trigger svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.size-guide-trigger:hover {
    background: var(--accent-gold, #c9a962);
    color: #1a1a1a;
    border-color: var(--accent-gold, #c9a962);
}

.sg-product-open {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0.35rem 0 0;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 0% 50%, rgba(201, 169, 98, 0.22), transparent 52%),
        linear-gradient(120deg, #1c1c1c, #141414 60%, #1b1710);
    color: #fff;
    text-align: right;
    min-height: 56px;
}

.sg-product-open:hover {
    background:
        radial-gradient(ellipse at 0% 50%, rgba(201, 169, 98, 0.3), transparent 52%),
        linear-gradient(120deg, #222, #171717 60%, #1f1a12);
    color: #fff;
    border: none;
}

.sg-product-open .sg-entry-mark {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.sg-product-open .sg-entry-mark svg {
    width: 22px;
    height: 22px;
}

.sg-product-open-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sg-product-open-copy strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.sg-product-open-copy span {
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.sg-product-open-cta {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: var(--accent-gold, #c9a962);
    color: #1a1a1a;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.option-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.sg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 12, 0.62);
    z-index: 9998;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.sg-overlay.open {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 640px) {
    .sg-overlay {
        align-items: center;
        padding: 1rem;
    }
}

.sg-modal {
    background: var(--bg-primary, #fff);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 540px;
    max-height: min(92vh, 100dvh);
    overflow-y: auto;
    padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.35s ease;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
    .sg-modal {
        border-radius: 24px;
        transform: translateY(20px);
    }
}

.sg-overlay.open .sg-modal {
    transform: translateY(0);
}

.sg-modal-close {
    position: sticky;
    top: 0;
    float: left;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    line-height: 1;
}

.sg-modal-close:hover {
    background: var(--border-color, #eee);
}

/* ---------- Site-wide entry points ---------- */
.sg-entry-teaser {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem 1.25rem;
    margin: 1.25rem 0 1.75rem;
    padding: 1.15rem 1.35rem;
    border-radius: 20px;
    background:
        radial-gradient(ellipse at 0% 50%, rgba(201, 169, 98, 0.2), transparent 50%),
        linear-gradient(120deg, #1c1c1c, #141414 55%, #1b1710);
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.sg-entry-teaser::before {
    content: "";
    position: absolute;
    top: 10px;
    left: -6%;
    right: -6%;
    height: 10px;
    background: repeating-linear-gradient(90deg, #c9a962 0 8px, #f3e6c4 8px 16px, #1a1a1a 16px 18px);
    opacity: 0.55;
    transform: rotate(-1.5deg);
    pointer-events: none;
}

.sg-entry-teaser:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

.sg-entry-mark {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1.5px solid rgba(201, 169, 98, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold, #c9a962);
    position: relative;
    z-index: 1;
}

.sg-entry-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.sg-entry-kicker {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-gold, #c9a962);
    margin-bottom: 0.2rem;
}

.sg-entry-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.sg-entry-desc {
    display: block;
    font-size: 0.82rem;
    opacity: 0.78;
    line-height: 1.6;
}

.sg-entry-cta {
    position: relative;
    z-index: 1;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--accent-gold, #c9a962);
    color: #1a1a1a;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.sg-entry-teaser--compact {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    grid-template-columns: auto 1fr;
}

.sg-entry-teaser--compact .sg-entry-cta,
.sg-entry-teaser--compact .sg-entry-desc {
    display: none;
}

.sg-entry-teaser--compact .sg-entry-mark {
    width: 40px;
    height: 40px;
}

.sg-entry-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(201, 169, 98, 0.1);
    border: 1px dashed rgba(201, 169, 98, 0.4);
    text-decoration: none;
    color: inherit;
}

.sg-entry-inline:hover {
    background: rgba(201, 169, 98, 0.16);
    color: inherit;
}

.sg-entry-inline strong {
    display: block;
    font-size: 0.8rem;
    color: #6f561c;
}

.sg-entry-inline span {
    font-size: 0.72rem;
    color: #7a7a7a;
}

.sg-entry-inline-go {
    font-size: 0.75rem;
    font-weight: 800;
    color: #8a6d2c;
    white-space: nowrap;
}

.product-sizing-label {
    text-decoration: none;
}

a.product-sizing-label:hover {
    color: var(--accent-gold, #c9a962);
}

.nav-action-btn--size-guide {
    color: var(--accent-gold, #c9a962);
}

.nav-action-btn--size-guide.is-active {
    background: rgba(201, 169, 98, 0.28);
}

.mega-menu-item--size,
.mobile-nav-item--size {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mega-menu-item--size svg,
.mobile-nav-item--size svg {
    width: 16px;
    height: 16px;
    color: var(--accent-gold, #c9a962);
}

/* Responsive */
@media (max-width: 720px) {
    .sg-compass { opacity: 0.35; transform: translateY(-50%) scale(0.72); left: -18px; }
    .sg-float-sizes { display: none; }
    .sg-hero-content { padding: 3.4rem 1.15rem 1.4rem; max-width: none; }
    .sg-hero { min-height: 200px; border-radius: 20px; }
    .sg-entry-teaser {
        grid-template-columns: auto 1fr;
        padding: 1.15rem 1rem 1rem;
        gap: 0.75rem;
    }
    .sg-entry-cta,
    .sg-product-open-cta { display: none; }
    .sg-product-open {
        grid-template-columns: auto 1fr;
        padding: 0.8rem 0.9rem;
        min-height: 52px;
    }
    .sg-product-open-copy span { font-size: 0.7rem; }
    .sg-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .sg-modal {
        max-height: min(88dvh, 92vh);
        border-radius: 20px 20px 0 0;
        padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    }
}

@media (max-width: 640px) {
    .nav-action-btn--size-guide { display: none; }
    .sg-gender-btn { padding: 0.6rem 1.15rem; }
    .sg-wizard { padding: 1.15rem 0.85rem 1rem; }
    .sg-input { max-width: none; width: 100%; }
}

@media (max-width: 480px) {
    .sg-step-label { display: none; }
    .sg-title { font-size: 1.55rem; }
}
