/* ── Gothic Jewelry Fit Calculator ── v1.0 ── */

:root {
    --gfc-black:   #111111;
    --gfc-dark:    #1c1c1c;
    --gfc-mid:     #555555;
    --gfc-light:   #aaaaaa;
    --gfc-border:  #e0e0e0;
    --gfc-bg:      #fafafa;
    --gfc-white:   #ffffff;
    --gfc-accent:  #8b0000;   /* dark red — gothic accent */
    --gfc-accent2: #c0392b;
    --gfc-radius:  4px;
    --gfc-font:    inherit;
}

/* ── Wrapper ── */
.gfc {
    max-width: 760px;
    margin: 0 auto;
    font-family: var(--gfc-font);
    color: var(--gfc-black);
}

/* ── Header ── */
.gfc__header {
    text-align: center;
    margin-bottom: 36px;
}
.gfc__ornament {
    font-size: 1.4rem;
    color: var(--gfc-accent);
    letter-spacing: .2em;
    margin-bottom: 10px;
}
.gfc__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .04em;
    margin: 0 0 8px;
    text-transform: uppercase;
}
.gfc__subtitle {
    font-size: .85rem;
    color: var(--gfc-mid);
    margin: 0;
    max-width: 500px;
    margin-inline: auto;
    line-height: 1.6;
}

/* ── Progress ── */
.gfc__progress {
    margin-bottom: 32px;
}
.gfc__steps-labels {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 8px;
}
.gfc__step-label {
    flex: 1;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--gfc-light);
    transition: color .25s;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gfc-border);
    text-align: center;
}
.gfc__step-label.is-done {
    color: var(--gfc-light);
    border-bottom-color: var(--gfc-accent);
}
.gfc__step-label.is-active {
    color: var(--gfc-black) !important;
    border-bottom-color: var(--gfc-accent) !important;
    font-weight: 800;
}

/* ── Fieldset / Step ── */
.gfc__step {
    border: none;
    margin: 0;
    padding: 0;
    display: none;
}
.gfc__step.is-active { display: block; }

.gfc__step-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--gfc-mid);
    margin: 0 0 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gfc-border);
    display: block;
}

/* ── Fields ── */
.gfc__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.gfc__field {
    margin-bottom: 20px;
}
.gfc__field-group {
    margin-bottom: 22px;
}
.gfc__label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--gfc-dark);
    margin-bottom: 8px;
}
.gfc__unit {
    font-weight: 400;
    font-size: .7rem;
    color: var(--gfc-light);
    text-transform: none;
    letter-spacing: 0;
}
.gfc__input,
.gfc__select {
    width: 100% !important;
    padding: 11px 12px !important;
    border: 1px solid var(--gfc-border) !important;
    border-radius: var(--gfc-radius) !important;
    font-size: .88rem !important;
    line-height: 1.4 !important;
    color: var(--gfc-black) !important;
    background-color: var(--gfc-white) !important;
    box-sizing: border-box !important;
    transition: border-color .2s;
    appearance: none !important;
    -webkit-appearance: none !important;
    height: auto !important;
    min-height: 44px !important;
    margin: 0 !important;
}
.gfc__input:focus,
.gfc__select:focus {
    outline: none !important;
    border-color: var(--gfc-accent) !important;
    box-shadow: none !important;
}
.gfc__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 32px !important;
    cursor: pointer;
}
.gfc__field-note {
    display: block;
    font-size: .72rem;
    color: var(--gfc-light);
    margin-top: 5px;
}
.gfc__hint {
    font-size: .8rem;
    color: var(--gfc-mid);
    margin: 0 0 20px;
    line-height: 1.5;
}
.gfc__measure-guide {
    background: #f5f5f5;
    border-left: 3px solid var(--gfc-accent);
    padding: 10px 14px;
    font-size: .78rem;
    color: var(--gfc-mid);
    margin-bottom: 20px;
    border-radius: 0 var(--gfc-radius) var(--gfc-radius) 0;
}

/* ── Radio cards ── */
.gfc__radio-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gfc__radio-row--grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.gfc__radio-card {
    flex: 1;
    min-width: 70px;
    cursor: pointer;
}
.gfc__radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.gfc__radio-card > span:not(.gfc__style-icon):not(.gfc__style-name):not(.gfc__style-desc),
.gfc__radio-card:not(.gfc__radio-card--style) > span {
    display: block;
    padding: 8px 10px;
    border: 1px solid var(--gfc-border);
    border-radius: var(--gfc-radius);
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    color: var(--gfc-mid);
    transition: all .2s;
    background: var(--gfc-white);
}
.gfc__radio-card input[type="radio"]:checked + span:not(.gfc__style-icon) {
    border-color: var(--gfc-accent);
    color: var(--gfc-accent);
    background: #fff5f5;
}

/* Style cards (3-line) */
.gfc__radio-card--style {
    position: relative;
    border: 1.5px solid var(--gfc-border);
    border-radius: var(--gfc-radius);
    padding: 12px 6px 10px;
    text-align: center;
    background: var(--gfc-white);
    transition: border-color .2s, background .2s;
    cursor: pointer;
    display: block;
}
.gfc__radio-card--style:hover {
    border-color: #bbb;
}
.gfc__radio-card--style:has(input:checked) {
    border-color: var(--gfc-accent) !important;
    background: #fff5f5 !important;
}
.gfc__radio-card--style > span { display: block; }
.gfc__radio-card--style .gfc__style-icon {
    font-size: 1.4rem;
    display: block;
    text-align: center;
    margin-bottom: 6px;
    line-height: 1;
}
.gfc__style-name {
    font-size: .7rem;
    font-weight: 700;
    color: var(--gfc-dark);
    display: block;
    line-height: 1.2;
    margin-bottom: 3px;
}
.gfc__radio-card--style:has(input:checked) .gfc__style-name {
    color: var(--gfc-accent) !important;
}
.gfc__style-desc {
    font-size: .62rem;
    color: var(--gfc-light);
    display: block;
    line-height: 1.3;
}

/* ── Nav buttons ── */
.gfc__nav {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    justify-content: flex-end;
}
.gfc__btn {
    padding: 11px 24px;
    border: none;
    border-radius: var(--gfc-radius);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    cursor: pointer;
    transition: all .2s;
}
.gfc__btn--next,
.gfc__btn--submit {
    background: var(--gfc-black);
    color: var(--gfc-white);
}
.gfc__btn--next:hover,
.gfc__btn--submit:hover { background: var(--gfc-accent); }
.gfc__btn--back {
    background: transparent;
    color: var(--gfc-mid);
    border: 1px solid var(--gfc-border);
}
.gfc__btn--back:hover { border-color: var(--gfc-mid); }
.gfc__btn--outline {
    background: transparent;
    color: var(--gfc-dark);
    border: 1px solid var(--gfc-border);
}
.gfc__btn--outline:hover { border-color: var(--gfc-dark); }
.gfc__btn--submit { min-width: 180px; }

/* ── Results ── */
.gfc__results { margin-top: 8px; }
.gfc__results-header {
    text-align: center;
    margin-bottom: 28px;
}
.gfc__results-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 8px 0 6px;
}
.gfc__results-style {
    font-size: .82rem;
    color: var(--gfc-mid);
    line-height: 1.6;
    max-width: 520px;
    margin-inline: auto;
}

/* ── Result cards ── */
.gfc__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}
.gfc__extra-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.gfc__card {
    border: 1px solid var(--gfc-border);
    border-radius: var(--gfc-radius);
    padding: 18px 16px;
    background: var(--gfc-white);
}
.gfc__card--primary {
    border-color: var(--gfc-accent);
    background: #fff5f5;
}
.gfc__card-label {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--gfc-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gfc__card-label--primary { color: var(--gfc-accent); }
.gfc__card-badge {
    background: var(--gfc-accent);
    color: #fff;
    font-size: .55rem;
    padding: 1px 5px;
    border-radius: 20px;
    letter-spacing: .06em;
}
.gfc__card-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--gfc-black);
    margin-bottom: 2px;
}
.gfc__card--primary .gfc__card-value { color: var(--gfc-accent); }
.gfc__card-sub {
    font-size: .75rem;
    color: var(--gfc-mid);
}
.gfc__card-name {
    font-size: .7rem;
    color: var(--gfc-light);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 6px;
    border-top: 1px solid var(--gfc-border);
    padding-top: 8px;
}
.gfc__card--primary .gfc__card-name { border-color: #f5cece; }

/* ── Share bar ── */
.gfc__share {
    margin-bottom: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--gfc-border);
}
.gfc__share-label {
    display: block;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--gfc-light);
    margin-bottom: 12px;
}
/* 4 cols desktop, 4 cols tablet, 4 cols mobile — always even */
.gfc__share-btns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}
.gfc__share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 6px 8px;
    border-radius: 6px;
    font-size: .65rem;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: none;
    transition: opacity .18s, transform .15s;
    color: #fff !important;
    line-height: 1;
    letter-spacing: .02em;
}
.gfc__share-btn:hover { opacity: .82; transform: translateY(-2px); }
.gfc__share-btn svg   { flex-shrink: 0; width: 18px; height: 18px; }

.gfc__share-btn--fb { background: #1877f2; }
.gfc__share-btn--tw { background: #111; }
.gfc__share-btn--rd { background: #ff4500; }
.gfc__share-btn--pi { background: #e60023; }
.gfc__share-btn--wa { background: #25d366; }
.gfc__share-btn--em { background: #607d8b; }
.gfc__share-btn--cp { background: #37474f; }

@media (max-width: 520px) {
    .gfc__share-btns { grid-template-columns: repeat(4, 1fr); gap: 5px; }
    .gfc__share-btn  { padding: 9px 4px 7px; font-size: .6rem; }
    .gfc__share-btn svg { width: 16px; height: 16px; }
}

/* ── Matched products ── */
.gfc__products-section { margin-bottom: 28px; }
.gfc__products-heading {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--gfc-light);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gfc-border);
}
.gfc__product-type-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--gfc-mid);
    margin: 16px 0 10px;
}
.gfc__product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.gfc__product-card {
    border: 1px solid var(--gfc-border);
    border-radius: var(--gfc-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color .2s;
}
.gfc__product-card:hover { border-color: var(--gfc-accent); }
.gfc__product-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}
.gfc__product-info { padding: 8px 10px; }
.gfc__product-name {
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gfc__product-price { font-size: .75rem; color: var(--gfc-accent); }

/* ── Restart ── */
.gfc__restart {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid var(--gfc-border);
}

/* ── Error ── */
.gfc__error {
    text-align: center;
    color: var(--gfc-accent);
    padding: 20px;
    border: 1px solid var(--gfc-accent);
    border-radius: var(--gfc-radius);
    font-size: .85rem;
}

/* ── Validation ── */
.gfc__input.is-invalid { border-color: var(--gfc-accent); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .gfc__title { font-size: 1.15rem; }
    .gfc__cards { grid-template-columns: 1fr 1fr; }
    .gfc__extra-cards { grid-template-columns: 1fr 1fr; }
    .gfc__product-grid { grid-template-columns: repeat(2, 1fr); }
    .gfc__radio-row--grid { grid-template-columns: repeat(3, 1fr); }
    .gfc__row { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
    .gfc__cards { grid-template-columns: 1fr; }
    .gfc__radio-row--grid { grid-template-columns: repeat(2, 1fr); }
}
