/**
 * Gems & Gold — main.css
 * Foglio di stile principale del tema.
 */

:root {
    --1: #141210;
    --2: #C5A47E;
    --w: #FFFFFF;
    --lg-text: #7A756E;
    --text: #6E6A66;
    --bg: #D6D4CF;
    --dec: #F5F1E8;
    --ff1: 'DM Sans', sans-serif;
    --ff2: 'Prata', serif;
    --ff3: 'Italiana', serif;
}

body,
* {
    font-family: var(--ff1);
    box-sizing: border-box;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 1360px;
    max-width: calc(100% - 40px);
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    position: relative;
}

.l-container {
    width: 100%;
    max-width: calc(100% - 100px);
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    position: relative;
}

@media screen and (max-width: 1500px) {
    .l-container {
        max-width: calc(100% - 40px);
    }
}

#wpadminbar ~ #page header#masthead {
    top: 32px;
}

header#masthead {
    padding: 20px 0;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
}

header#masthead .gemsgold-nav-toggle {
    display: none;
}

header#masthead .gemsgold-header__inner {
    justify-content: space-between;
    align-items: center;
}

header#masthead .gemsgold-header__inner .gemsgold-header__brand {
    flex: 0 0 180px;
}

header#masthead .gemsgold-header__nav {
    flex: 0 0 calc(100% - 360px);
}

header#masthead .gemsgold-header__nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 40px;
}

header#masthead .gemsgold-header__nav ul li {
    padding: 10px 0;
}

header#masthead .gemsgold-header__nav ul li a {
    text-decoration: none;
    letter-spacing: 3.6px;
    text-transform: uppercase;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
}

header#masthead .gemsgold-header__inner .header-icons {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    gap: 25px;
    justify-content: flex-end;
}

header#masthead .gemsgold-header__inner .header-icons a,
header#masthead .gemsgold-header__inner .header-icons button {
    display: flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    position: relative;
    background: none;
    border: none;
    text-decoration: none;
    padding: 0;
    cursor: pointer;
}

header#masthead .gemsgold-header__inner .header-icons a img,
header#masthead .gemsgold-header__inner .header-icons button img {
    width: auto;
    height: 18px;
}

header#masthead .gemsgold-header__inner .header-icons a .cart-counter {
    width: 12px;
    height: 12px;
    position: absolute;
    right: -9px;
    top: -5px;
    background-color: var(--w);
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--1);
    font-size: 9px;
    font-weight: bold;
}

header #gemsgold-search-form {
    position: absolute;
    width: 100%;
    top: 100%;
    border: 1px solid var(--w);
    border-width: 1px 0;
    padding: 30px 0;
}

header #gemsgold-search-form form {
    width: 100%;
    display: flex;
    align-items: center;
    flex: 0 0 100%;
    position: relative;
}

header #gemsgold-search-form form #gemsgold-search-input {
    flex: 0 0 100%;
    border: none;
    background: none;
    color: var(--w);
    font-size: 16px;
    letter-spacing: 0.32px;
    outline: none;
}

header #gemsgold-search-form form #gemsgold-search-input:focus-visible {
    box-shadow: 0 2px 0 var(--w);
}

header #gemsgold-search-form form #gemsgold-search-input::placeholder {
    color: var(--w);
    font-size: 16px;
    letter-spacing: 0.32px;
}

header #gemsgold-search-form form button[type="submit"] {
    position: absolute;
    right: 40px;
    font-weight: 600;
    color: var(--w);
    border: none;
    background: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-decoration: underline;
    text-underline-offset: 5px;
    cursor: pointer;
}

header #gemsgold-search-form form .gemsgold-search__close {
    border: none;
    background: none;
    color: var(--w);
    font-size: 30px;
    cursor: pointer;
    position: absolute;
    right: 0;
    width: 30px;
    z-index: 3;
    font-weight: 200;
}

.light-header{
    filter: invert(1);
}

#page {
    padding-top: 120px;
}

body.home #page {
    padding-top: 0;
}

.woocommerce .woocommerce-breadcrumb {
    margin: 0 0 30px;
}

.woocommerce .woocommerce-breadcrumb a {
    color: var(--1);
    text-decoration: none;
}

section {
    padding: 100px 0 0;
    position: relative;
}

section .text-image-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

section .text-image-block .text {
    flex: 0 0 40%;
}

section .text-image-block .image {
    flex: 0 0 40%;
    display: flex;
    align-items: flex-end;
    gap: 50px;
}

section .cappello {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text);
    font-weight: bold;
    display: block;
    margin: 0 0 30px;
}

section h2 {
    font-size: 52px;
    font-family: var(--ff2);
    font-weight: 400;
    margin: 0 0 30px;
}

section .descrizione {
    font-size: 16px;
    line-height: 1.5;
    color: var(--lg-text);
    opacity: .85;
    margin-bottom: 40px;
}

a.cta,
.cta {
    color: var(--1);
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 3.6px;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid var(--1);
    padding-bottom: 4px;
}

a.cta.cta-white,
.cta.cta-white {
    color: var(--w);
    border-color: var(--w);
}

.text-image-block .image img {
    width: 285px;
    border-radius: 300px 300px 0 0;
    object-fit: cover;
}

.text-image-block .image img.small {
    width: 210px;
    height: 310px;
}

.text-image-block .image img.big {
    width: 365px;
    height: 550px;
}

section .decorative-title {
    position: absolute;
    bottom: -240px;
    left: 0;
    color: var(--w);
    font-size: 120px;
    font-family: var(--ff3);
    font-weight: 400;
    text-transform: uppercase;
    line-height: 1;
    opacity: .54;
}

.main-footer-content {
    border-bottom: 1px solid #eaeaea;
}

.main-footer-content .container {
    justify-content: center;
}

body.archive:not(.tax-pa_pietra) .main-footer-content {
    margin-top: 40px;
    border-top: 1px solid #eaeaea;
}

.gemsgold-footer .col {
    padding: 100px 0 50px;
    flex: 0 0 calc(22% - 30px);
}

.gemsgold-footer .col .title {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text);
    letter-spacing: 3px;
    font-weight: bold;
    display: block;
    margin-bottom: 20px;
}

.gemsgold-footer .col ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
}

.gemsgold-footer .col ul li {
    flex: 0 0 100%;
}

.gemsgold-footer .col ul li,
.gemsgold-footer .col ul li a {
    font-size: 12px;
    color: #7a756e;
    text-decoration: none;
    font-weight: 500;
}

.gemsgold-footer .col.col--newsletter {
    padding-left: 90px;
    flex: 0 0 33%;
    border-left: 1px solid #eaeaea;
}

.gemsgold-footer .col.col--newsletter .newsletter__lead {
    font-size: 24px;
    font-family: var(--ff2);
    line-height: 1;
    display: block;
    margin-bottom: 10px;
}

.gemsgold-footer .col.col--newsletter  .newsletter__desc {
    font-size: 12px;
    color: #7a756e;
}

.gemsgold-footer__subfooter {
    padding: 50px 0 25px;
    text-align: center;
    color: #7a756e;
    font-size: 12px;
}

.gemsgold-footer__subfooter .container {
    justify-content: center;
}

.gemsgold-footer__legal,
.gemsgold-footer__copyright{
    flex: 0 0 100%;
    margin: 0;
    line-height: 1.8;
}

.gemsgold-footer__subfooter .legal-links {
    color: var(--1);
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.gemsgold-footer__subfooter .legal-links a {
    color: var(--1);
}

.gemsgold-footer__subfooter img {
    width: 150px;
    height: auto;
    margin-bottom: 25px;
}

.gemsgold-ecommerce-disabled .cappello {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text);
    font-weight: bold;
    display: block;
    margin: 0 0 30px;
    flex: 0 0 100%;
}

.gemsgold-ecommerce-disabled h2 {
    font-size: 52px;
    font-family: var(--ff2);
    font-weight: 400;
    margin: 0 0 30px;
}

.gemsgold-ecommerce-disabled .descrizione p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--lg-text);
    opacity: .85;
    margin-bottom: 40px;
}

.gemsgold-ecommerce-disabled .descrizione a {
    text-decoration: underline;
    color: var(--1)
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   Breakpoint: 1199px (solo header/menu) · 991px (tablet) · 767px (mobile) · 575px (mobile stretto)
   ══════════════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 1199px) {

    /* ── Header: logo | icone | hamburger, menu a schermo intero ─────────────
       (1199px: sotto questa larghezza la nav desktop non entra più) */

    header#masthead {
        padding: 16px 0;
    }

    /* Il pannello nav si posiziona rispetto all'header (a tutta larghezza),
       non rispetto al container interno. */
    header#masthead .gemsgold-header__inner {
        position: static;
    }

    header#masthead .gemsgold-header__inner .gemsgold-header__brand {
        flex: 0 0 auto;
        order: 1;
    }

    header#masthead .gemsgold-header__brand img {
        display: block;
        width: 130px;
        max-width: 100%;
        height: auto;
    }

    header#masthead .gemsgold-header__inner .header-icons {
        flex: 0 0 auto;
        order: 2;
        margin-left: auto;
        gap: 20px;
    }

    header#masthead .gemsgold-header__inner .header-icons a,
    header#masthead .gemsgold-header__inner .header-icons button {
        width: 24px;
        height: 24px;
    }

    header#masthead .gemsgold-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        flex: 0 0 auto;
        order: 3;
        width: 40px;
        height: 40px;
        margin-left: 8px;
        padding: 0;
        border: none;
        background: none;
        cursor: pointer;
    }

    header#masthead .gemsgold-nav-toggle:focus-visible {
        outline: 2px solid var(--w);
        outline-offset: 2px;
    }

    header#masthead .gemsgold-nav-toggle__bar {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--w);
        transition: transform .3s, opacity .3s;
    }

    header#masthead .gemsgold-nav-toggle[aria-expanded="true"] .gemsgold-nav-toggle__bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    header#masthead .gemsgold-nav-toggle[aria-expanded="true"] .gemsgold-nav-toggle__bar:nth-child(2) {
        opacity: 0;
    }

    header#masthead .gemsgold-nav-toggle[aria-expanded="true"] .gemsgold-nav-toggle__bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Menu aperto: schermo intero — resta visibile solo la riga dell'header
       (72px = padding 16 + riga 40 + padding 16) e sotto la lista di voci. */
    header#masthead.is-nav-open {
        position: fixed;
        height: 100vh;
        height: 100dvh;
        background-color: var(--1);
    }

    html.has-nav-open,
    html.has-nav-open body {
        overflow: hidden;
    }

    header#masthead .gemsgold-header__nav {
        display: none;
        order: 4;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        flex: none;
        width: auto;
        padding: 8px 20px 40px;
        overflow-y: auto;
        background-color: var(--1);
    }

    header#masthead.is-nav-open .gemsgold-header__nav {
        display: block;
    }

    header#masthead .gemsgold-header__nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    header#masthead .gemsgold-header__nav ul li {
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    header#masthead .gemsgold-header__nav ul li:last-child {
        border-bottom: none;
    }

    header#masthead .gemsgold-header__nav ul li a {
        display: block;
        padding: 20px 0;
        font-size: 14px;
    }

    /* Ricerca: barra a tutta larghezza con sfondo, input ≥16px (no zoom iOS). */
    header #gemsgold-search-form {
        padding: 20px 0;
        background-color: var(--1);
    }

    header #gemsgold-search-form form #gemsgold-search-input {
        padding-right: 130px;
        font-size: 16px;
    }

    header #gemsgold-search-form form button[type="submit"] {
        right: 34px;
    }

    /* text-image-block: le immagini scalano in proporzione (a larghezza fissa
       il blocco misura 625px e andrebbe a capo sotto il testo). */
    section .text-image-block .text,
    section .text-image-block .image {
        flex: 0 0 46%;
    }

    section .text-image-block .image {
        gap: 30px;
    }

    .text-image-block .image img.small {
        width: calc(37% - 15px);
        height: auto;
        aspect-ratio: 210 / 310;
    }

    .text-image-block .image img.big {
        width: calc(63% - 15px);
        height: auto;
        aspect-ratio: 365 / 550;
    }
}

@media screen and (max-width: 991px) {

    #page {
        padding-top: 90px;
    }

    /* ── Sezioni ─────────────────────────────────────────────────────────── */
    section {
        padding-top: 80px;
    }

    section h2,
    .gemsgold-ecommerce-disabled h2 {
        font-size: 40px;
    }

    /* text-image-block: testo sopra, immagini sotto (in proporzione) */
    section .text-image-block .text {
        flex: 0 0 100%;
    }

    section .text-image-block .image {
        flex: 0 0 100%;
        justify-content: center;
        gap: 20px;
        width: 100%;
        max-width: 520px;
        margin-top: 50px;
        margin-left: auto;
        margin-right: auto;
    }

    .text-image-block .image img.small {
        width: calc(38% - 10px);
        height: auto;
        aspect-ratio: 210 / 310;
    }

    .text-image-block .image img.big {
        width: calc(62% - 10px);
        height: auto;
        aspect-ratio: 365 / 550;
    }

    /* Titoli decorativi giganti: coprirebbero immagini/testi in colonna singola */
    section .decorative-title {
        display: none;
    }

    /* ── Footer: 2 colonne + newsletter a tutta larghezza ────────────────── */
    .gemsgold-footer .col {
        flex: 0 0 50%;
        padding: 50px 20px 20px 0;
    }

    .gemsgold-footer .col.col--newsletter {
        flex: 0 0 100%;
        padding: 40px 0 20px;
        border-left: none;
        border-top: 1px solid #eaeaea;
    }
}

@media screen and (max-width: 782px) {
    /* Admin bar mobile (46px invece di 32px) */
    #wpadminbar ~ #page header#masthead {
        top: 46px;
    }
}

@media screen and (max-width: 767px) {

    #page {
        padding-top: 80px;
    }

    section {
        padding-top: 60px;
    }

    section h2,
    .gemsgold-ecommerce-disabled h2 {
        font-size: 32px;
        margin-bottom: 20px;
    }

    section .descrizione {
        margin-bottom: 30px;
    }

    section .text-image-block .image {
        margin-top: 40px;
    }

    .gemsgold-ecommerce-disabled .descrizione p {
        margin-bottom: 30px;
    }

    /* Footer */
    .gemsgold-footer__subfooter {
        padding: 40px 0 20px;
    }

    .gemsgold-footer__subfooter .legal-links {
        flex: 0 0 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 575px) {

    /* Footer: colonna singola */
    .gemsgold-footer .col {
        flex: 0 0 100%;
        padding: 30px 0 10px;
    }

    .gemsgold-footer .col.col--newsletter {
        padding: 30px 0 30px;
    }
}
