/**
 * Theme Name: Puroo Tokyo
 * Description: Tema personalizzato per Puroo Tokyo.
 * Version: 1.0.9
 *
 * Indice dei Contenuti:
 * -------------------------------------------------------------------------
 * 1.0 IMPOSTAZIONI GLOBALI E RESET
 * 1.1 Variabili CSS (:root)
 * 1.2 Stili di base (body, tipografia, link)
 *
 * 2.0 LAYOUT PRINCIPALE
 * 2.1 Contenitori (main-content, container)
 * 2.2 Header
 * 2.3 Footer
 * 2.4 Menu a scomparsa (Drawer)
 *
 * 3.0 BLOCCHI E COMPONENTI
 * 3.1 Blocchi generici (hero, text-block)
 * 3.2 Griglia personalizzata (grid-container)
 * 3.3 Card (product-card, adv-card, etc.)
 * 3.4 Pulsanti e Form
 *
 * 4.0 STILI SPECIFICI PER PAGINE
 * 4.1 Pagina Dettaglio Prodotto (PDP)
 * 4.2 Pagine Editoriali Strette (.content-narrow)
 *
 * 5.0 PLUGIN E INTEGRAZIONI
 * 5.1 WooCommerce (generale)
 * 5.2 WooCommerce Variation Swatches
 *
 * 6.0 MEDIA QUERIES (STILI RESPONSIVE)
 * 6.1 Regole per Mobile (max-width: 992px e 768px)
 *-------------------------------------------------------------------------
 */

/* ==========================================================================
   1.0 IMPOSTAZIONI GLOBALI E RESET
   ========================================================================== */

/* --------------------------------------------------------------------------
   1.1 Variabili CSS (:root)
   -------------------------------------------------------------------------- */
:root {
    --desktop-margin: 40px;
    --mobile-margin: 20px;
}

/* --------------------------------------------------------------------------
   1.2 Stili di base (body, tipografia, link)
   -------------------------------------------------------------------------- */
body {
    background-color: #fcfaf6;
    color: var(--colore-testo, #1a1a1a);
    font-family: 'Space Mono', monospace;
    font-size: var(--fs-body, 16px);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0 0 0.2em 0;
}

h1 { font-size: var(--fs-h1, 48px); }
h2 { font-size: var(--fs-h2, 36px); }
h3 { font-size: var(--fs-h3, 24px); }
p { font-size: var(--fs-p, 16px); }

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 100%;
}

a,
a:visited,
a:hover,
a:active {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

ul.menu, .menu ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* Forzatura globale per coerenza del font */
html, body, h1, h2, h3, h4, h5, h6, p, a, span, button, input, select, textarea {
    font-family: 'Space Mono', monospace !important;
}

/* ==========================================================================
   2.0 LAYOUT PRINCIPALE
   ========================================================================== */

/* --------------------------------------------------------------------------
   2.1 Contenitori (main-content, container)
   -------------------------------------------------------------------------- */
.header-inner,
.footer-inner,
.main-content {
    max-width: var(--container-width, 90%);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--desktop-margin);
    padding-right: var(--desktop-margin);
    box-sizing: border-box;
}

.container {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* --------------------------------------------------------------------------
   2.2 Header
   -------------------------------------------------------------------------- */
.site-header {
    width: 100%;
    z-index: 1000;
    transition: all .3s ease-in-out;
    position: sticky;
    top: 0;
    background-color: #fcfaf6;
}

body.scrolled .site-header {
    background-color: rgba(252, 250, 246, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--header-v-padding-desktop, 30px);
    padding-bottom: var(--header-v-padding-desktop, 30px);
    transition: padding 0.3s ease-in-out;
}

body.scrolled .site-header .header-inner {
    padding-top: 15px;
    padding-bottom: 15px;
}

/* Layout simmetrico e definitivo per l'header */
.header-left,
.header-right {
    flex: 0 0 50px; /* Base fissa per simmetria */
}

.header-left {
    display: flex;
    justify-content: flex-start;
}

.header-center {
    flex: 1 1 auto; /* Occupa tutto lo spazio rimanente */
    text-align: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

.menu-toggle {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.hamburger-icon rect {
    fill: var(--colore-testo, #1a1a1a);
}

.site-header .logo-scroll {
    display: none;
}

body.scrolled .logo-main {
    display: none;
}

body.scrolled .logo-scroll {
    display: block;
}

/* --------------------------------------------------------------------------
   2.3 Footer
   -------------------------------------------------------------------------- */
.pre-footer-logo {
    text-align: center;
    padding: 100px 0;
}

.pre-footer-logo img {
    width: 100%;
    max-width: 80%;
    min-width: 250px;
    height: auto;
}

.site-footer .footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 50px 0;
}

.site-footer .footer-column {
    flex: 1;
}

.site-footer .social-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
}

.site-footer .social-links .social-icon {
    width: 20px;
    height: 20px;
}

.site-footer .site-info {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   2.4 Menu a scomparsa (Drawer)
   -------------------------------------------------------------------------- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.drawer-open .drawer-overlay {
    opacity: 1;
    visibility: visible;
}

.drawer-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background-color: #fcfaf6;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    padding: 30px;
    box-sizing: border-box;
}

body.drawer-open .drawer-menu-container {
    transform: translateX(0);
}

.close-drawer-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.drawer-menu-content {
    padding-top: 40px;
    overflow-y: auto;
}

.drawer-main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.drawer-main-menu .menu-item {
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.drawer-main-menu .menu-item a {
    display: block;
    padding: 20px 0;
    font-size: var(--fs-h3, 24px);
    text-transform: uppercase;
    text-decoration: none;
}

.drawer-main-menu .sub-menu {
    list-style: none;
    padding-left: 20px;
    display: none;
}

.drawer-main-menu .sub-menu .menu-item a {
    font-size: 1rem;
    text-transform: none;
    font-weight: 400;
    padding: 15px 0;
}

.submenu-toggle {
    position: absolute;
    right: 0;
    top: 18px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
}


/* ==========================================================================
   3.0 BLOCCHI E COMPONENTI
   ========================================================================== */

/* --------------------------------------------------------------------------
   3.1 Blocchi generici (hero, text-block)
   -------------------------------------------------------------------------- */
.hero-block {
    width: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin-bottom: 80px;
}

.text-block.container {
    padding-bottom: 30px;
}

.text-block h2 {
    font-size: var(--fs-h2, 36px);
}

.subtitle {
    font-weight: 400;
    line-height: 1.5;
    color: inherit;
}
.subtitle.size-small { font-size: var(--fs-subtitle-small, 18px); }
.subtitle.size-medium { font-size: var(--fs-subtitle-medium, 24px); }
.subtitle.size-large { font-size: var(--fs-subtitle-large, 32px); }

.text-align-left { text-align: left; }
.text-align-center { text-align: center; }
.text-align-right { text-align: right; }

.text-align-left .subtitle, .text-align-right .subtitle {
    margin-left: 0;
    margin-right: 0;
}
.text-align-center .subtitle {
    margin-left: auto;
    margin-right: auto;
}

.decorative-logo-block img {
    max-width: 80px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* --------------------------------------------------------------------------
   3.2 Griglia personalizzata (grid-container)
   -------------------------------------------------------------------------- */
.custom-grid-block.container {
    padding-top: 0;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(100px, auto);
    gap: 30px;
    width: 100%;
}

.grid-item {
    box-sizing: border-box;
}
.grid-item.col-4 { grid-column: span 1; grid-row: span 1; }
.grid-item.col-8 { grid-column: span 2; grid-row: span 1; }
.grid-item.col-8:has(.adv-card) { grid-row: span 2; }
.grid-item.col-12 { grid-column: span 3; grid-row: span 1; height: fit-content; }

/* --------------------------------------------------------------------------
   3.3 Card (product-card, adv-card, etc.)
   -------------------------------------------------------------------------- */
/* Stile comune per il bordo arrotondato */
.hero-block, .product-card, .placeholder-image, .adv-card, .menu-toggle, .text-card, .logo-card, .pdp-images img, .details-image img, .packaging-image img, .find-store-btn, .search-form .search-submit {
    border-radius: var(--image-radius, 12px);
}

.product-card, .adv-card, .placeholder-image, .text-card, .logo-card {
    display: block;
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.adv-card { aspect-ratio: 2 / 2.5; }
.product-card, .grid-item.col-4 .text-card { aspect-ratio: 4 / 5; }

.product-card .card-image-wrapper, .adv-card .card-image-wrapper {
    height: 100%;
}

.product-card img, .adv-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.product-card .card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 9%;
    box-sizing: border-box;
    color: var(--colore-testo, #1a1a1a);
    text-align: center;
}

.product-card .card-title-overlay h3 {
    margin: 0;
    font-size: var(--fs-h3, 24px);
    font-weight: 500;
    line-height: 100%;
    text-transform: uppercase;
}

.placeholder-image {
    width: 100%;
    background-color: #eee;
}

.text-card {
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.text-card-inner {
    overflow-wrap: break-word;
}

.logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.logo-card img {
    max-width: 80px;
}

/* --------------------------------------------------------------------------
   3.4 Pulsanti e Form
   -------------------------------------------------------------------------- */
/* Pulsante Find a Store e simili */
.find-store-btn {
    background-color: #1a1a1a;
    color: #fcfaf6;
    display: block;
    text-align: center;
    padding: 15px;
    text-transform: uppercase;
    box-sizing: border-box;
	display: none!important; /* IMPORTANTE -> NASCONDE IL PULSANTE DALLA PDP - TEMPORANEO */
}

a.find-store-btn {
    color: #fcfaf6;
}

/* Modulo di ricerca */
.search-field {
    width: 100%;
    border: none;
    border-bottom: 1px solid #1a1a1a;
    background: transparent;
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    padding: 10px 0;
    margin-bottom: 40px;
}

.search-field:focus {
    outline: none;
}

.search-form .search-submit {
    -webkit-appearance: none;
    appearance: none;
    background-color: #1a1a1a;
    color: #fcfaf6;
    border: none;
    padding: 15px 30px;
    margin-left: 10px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
}

.search-form .search-submit:hover {
    background-color: #333;
}


/* ==========================================================================
   4.0 STILI SPECIFICI PER PAGINE
   ========================================================================== */

/* --------------------------------------------------------------------------
   4.1 Pagina Dettaglio Prodotto (PDP)
   -------------------------------------------------------------------------- */
.pdp-grid {
    display: grid;
    grid-template-columns: 25% 1fr 25%;
    gap: 40px;
    align-items: start;
}

.pdp-column {
    padding-top: 60px;
}

/* Colonne Sinistra (Info) e Centrale (Immagini) per gestione z-index */
.pdp-info,
.pdp-images {
    position: relative;
}

.pdp-info {
    z-index: 2; /* Sta sopra */
}

.pdp-images {
    z-index: 1; /* Sta sotto */
}

.pdp-info .product_title {
    margin-bottom: 0;
    overflow-wrap: break-word; /* Evita sovrapposizione su schermi stretti */
    word-wrap: normal;
}

.pdp-color-name {
    font-size: 36px;
    margin-top: 10px;
    margin-bottom: 2em;
    text-transform: uppercase;
}

.pdp-images img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 30px;
}

.pdp-actions {
    position: sticky;
    top: 150px;
}

.pdp-actions .find-store-btn {
    width: 100%;
    margin-top: 20px;
}

.pdp-details-nav {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-transform: uppercase;
}

/* Sezioni Details e Packaging */
.pdp-section {
    padding-top: 100px;
    padding-bottom: 100px;
}

.pdp-section .section-title {
    text-align: left;
    text-transform: uppercase;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: center;
    text-transform: uppercase;
}

.details-column h4 {
    text-transform: uppercase;
    margin-bottom: 1em;
    font-weight: 600;
}

.details-column.details-measurements {
	text-align: right;
}

.measurements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-transform: uppercase;
}

.measurements-list li {
    display: block;
    margin-bottom: 0.5em;
	text-align: right;
}

.packaging-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.packaging-description {
    text-transform: uppercase;
}

/*
  Stile per la linea di separazione nella pagina prodotto
*/
.pdp-divider, .pdp-divider-packaging {
    /* Stile della linea */
    border: none;
    height: 1.5px;
    background-color: #000; /* Colore nero */

    /* Allineamento e spaziatura */
    display: block;
    max-width: var(--container-width, 90%); /* Usa la stessa larghezza del tuo .main-content */
    margin-left: var(--desktop-margin);
    margin-right: var(--desktop-margin);
    margin-bottom: 0;
}

.pdp-divider {
    margin-top: 100px; /* Spazio sopra la linea */
}

/* --------------------------------------------------------------------------
   4.2 Pagine Editoriali Strette (.content-narrow)
   -------------------------------------------------------------------------- */
.content-narrow {
    max-width: 1000px;
    margin-top: 100px;
    margin-bottom: 100px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   5.0 PLUGIN E INTEGRAZIONI
   ========================================================================== */

/* --------------------------------------------------------------------------
   5.1 WooCommerce (generale)
   -------------------------------------------------------------------------- */
/* Nasconde elementi non desiderati */
.variations_form .quantity, .variations_form .single_add_to_cart_button,
.reset_variations {
    display: none !important;
}

/* Fix di layout per la pagina prodotto */
body.single-product div.product {
    width: 100%;
    float: none;
    margin: 0;
}

.woocommerce div.product div.images {
    width: 100%;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image:nth-child(n+2) {
    width: 100%;
}

/* Stili generici per pulsanti WooCommerce */
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button {
    padding: 0.8em 1em;
    font-weight: 600;
    border-radius: 10px;
    color: #fff;
    background-color: #000;
    margin-top: 30px;
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button:hover {
    background-color: #111111;
    color: #fff;
}

/* --------------------------------------------------------------------------
   5.2 WooCommerce Variation Swatches
   -------------------------------------------------------------------------- */
.woo-variation-swatches.wvs-show-label .variations th label {
	margin: 0 10px 0px 3px;
}

.woo-variation-swatches .variable-items-wrapper {
    gap: 2px
}

.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item) {
    padding: 0 !important;
    box-shadow: none !important;
}

.woo-variation-swatches .wvs-style-squared.variable-items-wrapper .variable-item:not(.radio-variable-item) {
    border-radius: 8px;
}

.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item .variable-item-span-color {
    border-radius: 8px;
}

.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).selected {
    box-shadow: var(--wvs-selected-item-box-shadow, 0 0 0 1px #000) !important;
}


/* ==========================================================================
   6.0 MEDIA QUERIES (STILI RESPONSIVE)
   ========================================================================== */

/* --------------------------------------------------------------------------
   6.1 Regole per Mobile (max-width: 992px e 768px)
   -------------------------------------------------------------------------- */

/* Responsive per la PDP (Tablet e inferiori) */
@media (max-width: 992px) {
    .pdp-grid {
        grid-template-columns: 1fr;
    }

    .pdp-column {
        padding-top: 40px;
    }

    .pdp-images {
        order: -1; /* Sposta le immagini in cima */
    }

    .pdp-actions {
        position: static;
        order: 0;
    }

    .details-grid, .packaging-grid {
        grid-template-columns: 1fr;
    }
}

/* Regole generali per mobile (Smartphone) */
@media (max-width: 768px) {
    /* Layout */
    .header-inner,
    .footer-inner,
    .main-content {
        max-width: 100%;
        padding-left: var(--mobile-margin);
        padding-right: var(--mobile-margin);
    }

    .container {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    /* Tipografia */
    body { font-size: var(--fs-body-mobile, 14px); }
    h1 { font-size: var(--fs-h1-mobile, 34px); }
    h2, .text-block h2 { font-size: var(--fs-h2-mobile, 25px); }
    h3, .product-card .card-title-overlay h3 { font-size: var(--fs-h3-mobile, 18px); }
    p { font-size: var(--fs-p-mobile, 14px); }
    .subtitle.size-small { font-size: var(--fs-subtitle-small-mobile, 16px); }
    .subtitle.size-medium { font-size: var(--fs-subtitle-medium-mobile, 18px); }
    .subtitle.size-large { font-size: var(--fs-subtitle-large-mobile, 22px); }

    /* Header mobile */
    .logo-main img {
        width: 220px !important;
    }
    
    /* Griglia mobile */
    .grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }
    .grid-item.col-4:has(.product-card),
    .grid-item.col-4:has(.adv-card) {
        grid-column: span 1;
    }
    .grid-item.col-8,
    .grid-item.col-12,
    .grid-item.col-4:has(.text-card),
    .grid-item.col-4:has(.logo-card) {
        grid-column: span 2;
    }

    .adv-card, .product-card {
        aspect-ratio: 4 / 5;
    }
    
    /* Footer mobile */
    .site-footer .footer-grid {
        flex-wrap: wrap;
        gap: 20px 30px;
    }
    .site-footer .footer-column-left {
        flex-basis: calc(30% - 15px);
        min-width: 100px;
    }
    .site-footer .footer-column-center {
        flex-basis: calc(70% - 15px);
        min-width: 200px;
    }
    .site-footer .footer-column-right {
        flex-basis: 100%;
        text-align: left;
    }

    .search-field {
        width: 100%;
        margin-top: 0;
    }
	.details-column.details-measurements {
	text-align: left;
	}

	.measurements-list li {
		display: flex;
		justify-content: space-between;
		text-align: left;
	}
}