/*
Theme Name: Saren Child
Description: Child theme for the Saren. Child themes are the recommended way of making modifications to a theme. <a href="http://codex.wordpress.org/Child_Themes">Read More</a>
Author: PeThemes
Author URI: http://pethemes.com
Template: saren
*/


/* =Theme customization starts here
-------------------------------------------------------------- */

/* DIGITYZE MOD
-------------------------------------------------------------- */

.product-category-breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: block;
}

/* MARGINI PER I BLOCCHI (NON ELEMENTOR)
 * 

/* CSS più specifico per sovrascrivere il tema */
.pe-section .pe-wrapper {
    max-width: 1240px !important;
    margin: 0 auto !important;
}

/* Forza il blocco carrello WooCommerce */
.wp-block-woocommerce-cart.alignwide {
    width: 100% !important;
    max-width: none !important;
}

.wc-block-components-sidebar-layout.wc-block-cart {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive */
@media (max-width: 1024px) and (min-width: 768px) {
    .pe-section .pe-wrapper {
        max-width: 700px !important;
    }
}

@media (max-width: 767px) {
    .pe-section .pe-wrapper {
        max-width: 500px !important;
    }
}

/* Assicura che la tabella si adatti */
.wc-block-cart-items {
    width: 100% !important;
    table-layout: fixed !important;
}


/* ============================================
   STILE PAGINA LOGIN/REGISTRAZIONE
   ============================================ */

/* Container principale */
#customer_login.u-columns {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Colonne Login e Registrazione */
.u-column1, .u-column2 {
    flex: 1;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Titoli */
#customer_login h2 {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

/* Etichette form */
#customer_login label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.95em;
}

/* Campi input */
#customer_login input[type="text"],
#customer_login input[type="email"],
#customer_login input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

#customer_login input[type="text"]:focus,
#customer_login input[type="email"]:focus,
#customer_login input[type="password"]:focus {
    outline: none;
    border-color: #958e09;
}

/* Checkbox Ricordami */
#customer_login .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#customer_login input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Pulsanti */
#customer_login button[type="submit"] {
    width: 100%;
    background: #958e09;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 5px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

#customer_login button[type="submit"]:hover {
    background: #7a7207;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 142, 9, 0.3);
}

/* Link Password dimenticata - FIX VISIBILITÀ */
#customer_login .woocommerce-LostPassword {
    display: block !important;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
    opacity: 1 !important;
    visibility: visible !important;
}

#customer_login .woocommerce-LostPassword a {
    color: #958e09 !important;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-block;
}

#customer_login .woocommerce-LostPassword a:hover {
    text-decoration: underline;
    color: #7a7207 !important;
}

/* Privacy Policy text */
.woocommerce-privacy-policy-text {
    font-size: 0.85em;
    color: #666;
    margin: 20px 0;
    padding: 15px;
    background: #f8f8f8;
    border-left: 3px solid #958e09;
    border-radius: 4px;
}

.woocommerce-privacy-policy-text a {
    color: #958e09;
}

/* Nascondi campi attribution WooCommerce */
wc-order-attribution-inputs {
    display: none;
}

/* Asterisco obbligatorio */
.required {
    color: #d32f2f;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    left: -9999px;
}

/* Form rows */
.form-row {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    #customer_login.u-columns {
        flex-direction: column;
        gap: 30px;
    }
    
    .u-column1, .u-column2 {
        padding: 30px 20px;
    }
    
    #customer_login h2 {
        font-size: 1.5em;
    }
}

/* ============================================
   FIX DASHBOARD UTENTE LOGGATO
   ============================================ */

/* Nascondi menu duplicati nel dashboard */
.saren--account--dashboard--nav {
    display: none !important;
}

.saren--account--nav--top {
    display: none !important;
}

/* Nascondi voce Download (backup nel caso il filtro PHP fallisca) */
.woocommerce-MyAccount-navigation-link--downloads {
    display: none !important;
}

/* Layout dashboard principale */
.saren--account--dashboard {
    width: 100%;
}

.saren--account--dashboard--head {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.saren--account--dashboard--head > div {
    flex: 1;
    min-width: 200px;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.user--num {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    color: #958e09;
    margin-bottom: 10px;
}

.saren--account--dashboard--head span:not(.user--num) {
    font-size: 0.95em;
    color: #666;
}

/* Dashboard footer */
.saren--account--dashboard--foot {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.user--latest--orders,
.user--favorite--item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.user--latest--orders .p-large {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
}

.user--latest--orders .p-large a {
    font-size: 0.85em;
    color: #958e09;
    text-decoration: none;
}

.user--latest--orders .p-large a:hover {
    text-decoration: underline;
}

/* Sidebar sinistra - Mantieni visibile */
.saren--account--nav {
    position: sticky;
    top: 20px;
}

.saren--account--details {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    margin-bottom: 20px;
}

.saren--user--avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.saren--user--display--name {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
}

.saren--logout--button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #958e09;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.saren--logout--button:hover {
    background: #7a7207;
}

/* Navigation menu sidebar */
.saren--account--nav .woocommerce-MyAccount-navigation {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.saren--account--nav .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.saren--account--nav .woocommerce-MyAccount-navigation li {
    border-bottom: 1px solid #f0f0f0;
}

.saren--account--nav .woocommerce-MyAccount-navigation li:last-child {
    border-bottom: none;
}

.saren--account--nav .woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.saren--account--nav .woocommerce-MyAccount-navigation a:hover,
.saren--account--nav .woocommerce-MyAccount-navigation .is-active a {
    background: #f8f8f8;
    color: #958e09;
}

.saren--account--nav .acc--nav--icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.saren--account--nav .acc--nav--icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Active order box */
.saren--user--active--order {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .saren--account--dashboard--foot {
        grid-template-columns: 1fr;
    }
    
    .saren--account--dashboard--head {
        flex-direction: column;
    }
}

/* ============================================
   FORM RESET PASSWORD - STILE PULITO
   ============================================ */

.woocommerce-ResetPassword,
form.woocommerce-ResetPassword,
form.lost_reset_password {
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

form.lost_reset_password p {
    margin-bottom: 20px;
    line-height: 1.6;
}

form.lost_reset_password label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

/* Password input container */
form.lost_reset_password .password-input {
    position: relative;
    display: block;
}

form.lost_reset_password input[type="text"],
form.lost_reset_password input[type="password"] {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

form.lost_reset_password input[type="text"]:focus,
form.lost_reset_password input[type="password"]:focus {
    outline: none;
    border-color: #958e09;
}

/* Pulsante mostra/nascondi password */
form.lost_reset_password .show-password-input {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 30px;
    height: 30px;
}

form.lost_reset_password .show-password-input::before {
    content: "👁";
    font-size: 18px;
}

form.lost_reset_password .show-password-input.display-password::before {
    content: "👁";
    opacity: 0.5;
}

/* Pulsante Salva */
form.lost_reset_password button[type="submit"] {
    width: 100%;
    background: #958e09;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 5px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

form.lost_reset_password button[type="submit"]:hover {
    background: #7a7207;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 142, 9, 0.3);
}

/* Clear fix */
form.lost_reset_password .clear {
    clear: both;
}

/* Asterisco required */
form.lost_reset_password .required {
    color: #d32f2f;
}

/* Screen reader text */
form.lost_reset_password .screen-reader-text {
    position: absolute;
    left: -9999px;
}

/* Row styling */
form.lost_reset_password .form-row-first,
form.lost_reset_password .form-row-last {
    width: 100%;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce-ResetPassword,
    form.woocommerce-ResetPassword,
    form.lost_reset_password {
        padding: 30px 20px;
        margin: 20px;
    }
}

/* ============================================
   NASCONDI PAGAMENTO RAPIDO IN CHECKOUT
   ============================================ */

/* Nascondi completamente sezione Pagamento Rapido */
.wc-block-components-express-payment {
  display: none !important;
}

.wc-block-components-express-payment__title-container {
  display: none !important;
}

.wc-block-components-express-payment-continue-rule {
  display: none !important;
}

/* Backup: se usa altre classi */
[data-block-name="woocommerce/checkout-express-payment-block"] {
  display: none !important;
}