/* ===== STYLE LIBRARY PAGE (styles.html) — builds on custom.css ===== */

.styles-page main {
    padding-bottom: 40px;
}

/* Intro */
.st-hero {
    padding: 56px 0 40px;
    max-width: 860px;
}
.st-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 36px;
}
.st-back:hover {
    color: var(--teal-dark);
}
body.rtl .st-back i {
    transform: scaleX(-1);
}
.st-kicker {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal-dark);
    margin-bottom: 14px;
}
body.rtl .st-kicker {
    letter-spacing: 0;
    font-size: 0.9rem;
}
.st-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin-bottom: 22px;
}
.st-title .highlight {
    color: var(--teal);
    font-style: italic;
}
body.rtl .st-title {
    font-family: var(--serif-ar);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
}
body.rtl .st-title .highlight {
    font-style: normal;
}
.st-lead {
    font-size: 1.12rem;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 26px;
}
.st-points {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.st-points i {
    color: var(--teal);
    margin-inline-end: 8px;
}

/* Toolbar */
.st-toolbar {
    position: sticky;
    top: 74px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 0;
    margin-bottom: 26px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.st-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.st-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font: inherit;
    font-size: 0.86rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.st-filter small {
    min-width: 22px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--bg-light);
    font-size: 0.72rem;
    color: var(--text-muted);
}
.st-filter:hover {
    border-color: var(--text);
}
.st-filter.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.st-filter.active small {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.st-chosen {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--teal);
    background: var(--teal-pale);
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
}
.st-chosen[hidden] {
    display: none;
}
.st-chosen-dots {
    display: flex;
}
.st-chosen-dots i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--teal-pale);
    margin-inline-start: -7px;
}
.st-chosen-dots i:first-child {
    margin-inline-start: 0;
}
.st-chosen small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.2;
}
.st-chosen strong {
    font-weight: 600;
}
.st-chosen em {
    font-style: normal;
    font-weight: 600;
    color: var(--teal-dark);
}

/* Grid of style cards */
.st-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
.st-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    overflow: hidden;
    animation: stIn 0.4s ease both;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.st-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -36px rgba(15, 23, 42, 0.45);
}
.st-card.chosen {
    border-color: var(--teal);
    box-shadow: 0 0 0 2px var(--teal);
}
@keyframes stIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* Mini website (always left-to-right: it previews Latin fonts) */
.st-mock {
    margin: 12px 12px 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--k-bg);
    color: var(--k-ink);
    font-family: var(--k-body), sans-serif;
    direction: ltr;
    text-align: left;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.st-mock-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 0.68rem;
    color: #64748b;
}
.st-mock-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}
.st-mock-bar span {
    margin-left: 10px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fff;
}
.st-mock-hero {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    isolation: isolate;
}
.st-mock-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 0.8s ease;
}
.st-card:hover .st-mock-hero img {
    transform: scale(1.05);
}
.st-mock-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--k-ink) 0%, transparent 85%);
    opacity: 0.78;
    z-index: -1;
}
.st-mock-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--k-bg);
    font-size: 0.72rem;
}
.st-mock-nav strong {
    font-family: var(--k-head), serif;
    font-weight: 400;
    font-size: 1.05rem;
    margin-right: auto;
}
.st-mock-nav span {
    opacity: 0.8;
}
.st-mock-copy {
    position: absolute;
    left: 18px;
    bottom: 18px;
    max-width: 62%;
    color: var(--k-bg);
}
.st-mock-title {
    display: block;
    font-family: var(--k-head), serif;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1;
    margin-bottom: 8px;
}
.st-mock-text {
    display: block;
    font-size: 0.82rem;
    opacity: 0.9;
    margin-bottom: 12px;
}
.st-mock-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--k-acc);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
}
.st-mock-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 14px 16px 16px;
}
.st-mock-strip div {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}
.st-mock-strip b {
    display: block;
    font-family: var(--k-head), serif;
    font-weight: 400;
    font-size: 1.05rem;
    color: var(--k-acc);
    margin-bottom: 6px;
}
.st-mock-strip i {
    display: block;
    height: 4px;
    border-radius: 2px;
    background: var(--k-ink);
    opacity: 0.18;
    margin-bottom: 4px;
}
.st-mock-strip i:last-child {
    width: 60%;
}

/* Details */
.st-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}
.st-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.st-name {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.75rem;
    letter-spacing: -0.015em;
}
body.rtl .st-name {
    font-family: var(--serif-ar);
    font-weight: 600;
    font-size: 1.5rem;
}
.st-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.st-tags span {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-light);
    border: 1px solid var(--line);
    font-size: 0.74rem;
    color: var(--text-muted);
}
.st-desc {
    color: var(--text-muted);
    font-size: 0.93rem;
    margin-bottom: 18px;
}
.st-fonts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.st-font {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-light);
    border: 1px solid var(--line);
    min-width: 0;
}
.st-font small {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}
body.rtl .st-font small {
    letter-spacing: 0;
}
.st-font span {
    display: block;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: start;
}
.st-font-head span {
    font-size: 1.35rem;
    line-height: 1.2;
}
.st-font-body span {
    font-size: 1rem;
    line-height: 1.5;
}
.st-palette {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.st-swatch {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
    cursor: copy;
    font: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.st-swatch:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -12px rgba(15, 23, 42, 0.4);
}
.st-swatch i {
    height: 44px;
    background: var(--sw);
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.06);
}
.st-swatch span {
    padding: 6px 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    direction: ltr;
}
.st-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.st-example {
    font-size: 0.85rem;
    color: var(--teal-dark);
    text-decoration: none;
}
.st-example:hover {
    text-decoration: underline;
}
.st-example i {
    font-size: 0.68rem;
}
.st-choose {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.2s ease;
}
.st-choose:hover {
    background: var(--teal-dark);
}
.st-choose i {
    display: none;
}
.st-card.chosen .st-choose {
    background: var(--teal);
}
.st-card.chosen .st-choose i {
    display: inline;
}

/* Custom style call to action */
.st-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding: 40px 44px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 90% 0%, rgba(20, 184, 166, 0.3), transparent 50%),
        var(--navy);
    color: rgba(255, 255, 255, 0.75);
}
.st-custom h2 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 6px;
}
body.rtl .st-custom h2 {
    font-family: var(--serif-ar);
    font-weight: 600;
}
.st-custom p {
    max-width: 560px;
}
.styles-page .site-footer {
    margin-top: 40px;
}

/* Copy feedback */
.st-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 300;
    transform: translate(-50%, 20px);
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: 0.88rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.st-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .st-grid {
        grid-template-columns: 1fr;
        max-width: 680px;
        margin: 0 auto;
    }
}

@media (max-width: 820px) {
    .st-toolbar {
        top: 62px;
    }
}

@media (max-width: 640px) {
    .st-hero {
        padding: 32px 0 28px;
    }
    .st-back {
        margin-bottom: 24px;
    }
    .st-toolbar {
        margin-inline: -20px;
        padding: 10px 20px;
    }
    .st-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        width: 100%;
    }
    .st-filter {
        flex-shrink: 0;
    }
    .st-chosen {
        width: 100%;
    }
    .st-mock {
        margin: 8px 8px 0;
    }
    .st-mock-nav span {
        display: none;
    }
    .st-mock-copy {
        max-width: 80%;
        left: 14px;
        bottom: 14px;
    }
    .st-mock-text {
        display: none;
    }
    .st-body {
        padding: 16px;
    }
    .st-name {
        font-size: 1.45rem;
    }
    .st-font-head span {
        font-size: 1.1rem;
    }
    .st-swatch i {
        height: 34px;
    }
    .st-swatch span {
        font-size: 0.64rem;
    }
    .st-choose {
        width: 100%;
        justify-content: center;
    }
    .st-custom {
        padding: 30px 22px;
    }
    .st-custom .btn-whatsapp {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-card {
        animation: none;
    }
}
