/**
 * Ana Delgar - Global Theme Styles
 * Estilos aplicados a todas las páginas del child theme
 * Incluye: checkout, mi cuenta, pedidos, devoluciones, etc.
 */

/* ============================================
   FUTURA LIGHT - CARGA LOCAL
   ============================================ */
@font-face {
    font-family: 'Futura Light';
    src: url('/font/Futura-Light.woff2') format('woff2'),
        url('/font/Futura-Light.woff') format('woff'),
        url('/font/Futura-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   OCULTAR ELEMENTOS NO DESEADOS
   ============================================ */
.blockreassurance_product,
.carrier-logo,
.col-sm-5.col-xs-12,
.material-icons,
.material-icons.checkbox-checked,
#psgdpr-link,
#wishlist-link {
    display: none !important;
}

/* Eliminar borders viejos del carrito/checkout */
.cart-summary .border-end,
.card-body.border-end,
.cart-item .border-end,
#js-checkout-summary .border-end {
    border-right: none !important;
    border-left: none !important;
    border-top: none !important;
    border-bottom: none !important;
}

/* Eliminar border-left de card-block en checkout */
body.page-order .card-block,
#checkout .card-block {
    border-left: none !important;
    padding-left: 1rem;
}

/* Padding-right 0 solo en carrito (no en checkout) */
body:not(.page-order) .cart-grid-body {
    padding-right: 0 !important;
}

/* ============================================
   MARGIN TOP - Evitar que navbar cubra contenido
   ============================================ */
/* #wrapper {
    margin-top: 4rem !important;
    padding-top: 2rem !important;
} */

#content-wrapper {
    margin-top: 4rem !important;
}

/* ============================================
   STICKY CART SUMMARY - Columna derecha
   ============================================ */
.cart-grid-right {
    position: sticky !important;
    top: 120px !important;
    align-self: flex-start !important;
    max-height: calc(100vh - 140px) !important;
    overflow-y: auto !important;
    padding-left: 2rem !important;
}

/* ============================================
   DIRECCIONES - Layout horizontal mejorado
   ============================================ */
.delivery-addresses,
#delivery-addresses {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 3rem !important;
}

.js-address-item,
.address-item {
    flex: 1 1 45% !important;
    min-width: 300px !important;
    margin-bottom: 1rem !important;
    border: none !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
}

.address-item hr {
    border: none !important;
}

/* Alinear contenido de dirección con título */
.address-item .radio-block {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem !important;
}

.address-item .custom-radio {
    flex-shrink: 0 !important;
    margin-top: 0.25rem !important;
}

.address-item .address-alias,
.address-item .address {
    margin-left: 0 !important;
}

/* Footer con modificar/eliminar */
.address-footer {
    display: flex !important;
    gap: 2rem !important;
    margin-top: auto !important;
}

.address-footer a {
    font-size: 0.9rem !important;
}

/* ============================================
   DATOS PERSONALES - P's horizontales
   ============================================ */
.identity,
p:has(a[href*="mylogout"]) {
    display: inline-block !important;
    margin-right: 2rem !important;
}

/* ============================================
   TEXTAREA - Ajustar ancho
   ============================================ */
#delivery_message {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================================
   CHECKBOX TÉRMINOS - Inline
   ============================================ */
#conditions-to-approve li,
#conditions-to-approve .form-group {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

#conditions-to-approve .float-xs-left {
    float: none !important;
    margin: 0 !important;
}

#conditions-to-approve .condition-label {
    flex: 1 !important;
    margin: 0 !important;
}

/* ============================================
   FUENTE - Futura Light Global
   ============================================ */
body,
h1,
h2,
h3,
h4,
h5,
h6,
.checkout-step,
.step-title,
.btn,
input,
select,
textarea,
label,
a,
p,
span {
    font-family: 'Futura Light', Arial, sans-serif !important;
}

/* ============================================
   OCULTAR ELEMENTOS
   ============================================ */
.step-number,
.form-control-comment {
    display: none !important;
}

/* ============================================
   BOTONES
   ============================================ */
.btn-primary,
button[name="confirm-addresses"],
button[name="confirmDeliveryOption"],
button[type="submit"].btn,
.continue.btn {
    background-color: white !important;
    border: 1px solid transparent !important;
    color: black !important;
    padding: 0.75rem 2rem !important;
    transition: all 0.3s ease !important;
}

.btn-primary:hover,
button[name="confirm-addresses"]:hover,
button[name="confirmDeliveryOption"]:hover,
button[type="submit"].btn:hover,
.continue.btn:hover {
    background-color: #E9ECEF !important;
    border-color: transparent !important;
    color: black !important;
}

.btn-outline-dark,
.btn {
    border: none !important;
}

/* ============================================
   OPCIONES DE ENVÍO Y PAGO
   ============================================ */
.delivery-option,
.payment-option {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #eee !important;
    margin-bottom: 0 !important;
    padding: 1rem 0 !important;
}

.payment-options,
.delivery-options-list {
    border: none !important;
    background: transparent !important;
}

/* ============================================
   CHECKOUT STEPS
   ============================================ */
.checkout-step {
    border: none !important;
    border-bottom: 1px solid #eee !important;
    padding: 2rem 0 !important;
}

.checkout-step.-current {
    border-left: 3px solid #E9ECEF !important;
    padding-left: 1rem !important;
}

.step-title {
    font-weight: 400 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    font-size: 1.2rem !important;
    color: black !important;
}

.step-edit {
    font-size: 1rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    float: right !important;
    opacity: 0.7 !important;
}

.step-edit:hover {
    opacity: 1 !important;
    color: #E9ECEF !important;
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-group {
    padding-top: 1rem !important;
    margin-bottom: 0.25rem !important;
}

label {
    font-size: 0.9rem !important;
    color: black !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea,
.form-control {
    border: 1px solid #ddd !important;
    background-color: white !important;
    color: black !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: #E9ECEF !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(233, 236, 239, 0.15) !important;
}

/* ============================================
   RADIO Y CHECKBOXES
   ============================================ */
.custom-radio input[type="radio"]:checked+span,
.custom-checkbox input[type="checkbox"]:checked+span {
    border-color: #E9ECEF !important;
    background-color: #E9ECEF !important;
}

/* ============================================
   CART SUMMARY
   ============================================ */
.cart-summary {
    background-color: #f9f9f9 !important;
    border: none !important;
    padding: 1.5rem !important;
}

.cart-summary-line {
    color: black !important;
    padding: 0.5rem 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.cart-summary-line.cart-total {
    /* font-weight: 600 !important; */
    font-size: 1.1rem !important;
    border-bottom: none !important;
    padding-top: 1rem !important;
}

/* ============================================
   ENLACES
   ============================================ */
a {
    color: black !important;
    transition: color 0.3s ease !important;
}

a:hover {
    color: #E9ECEF !important;
    text-decoration: none !important;
}

.bs5-scope #footer a:hover {
    color: var(--black) !important;
    opacity: 1;
    text-decoration: underline !important;
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
    border-radius: 0 !important;
    border-left: 3px solid !important;
}

.alert-danger {
    background-color: #f8d7da !important;
    border-color: #d9534f !important;
    color: #721c24 !important;
}

.alert-success {
    background-color: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .checkout-step {
        padding: 1.5rem 0 !important;
    }

    .step-title {
        font-size: 1rem !important;
    }

    .btn {
        /* width: 100% !important; */
        margin-bottom: 0.75rem !important;
    }

    .cart-grid-right {
        position: relative !important;
        top: auto !important;
        /* margin-top: 2rem !important; */
        padding-left: 0 !important;
    }

    .js-address-item,
    .address-item {
        flex: 1 1 100% !important;
    }

    .identity,
    p:has(a[href*="mylogout"]) {
        display: block !important;
        margin-right: 0 !important;
    }
}

/* ============================================
   PÁGINAS DE CUENTA (MY ACCOUNT)
   ============================================ */

/* Page headers - títulos de páginas */
.page-header h1 {
    font-family: 'Futura Light', Arial, sans-serif !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    font-size: 1.5rem !important;
    color: black !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 1rem !important;
}

/* Account links (mi cuenta, pedidos, direcciones, etc.) */
.account-link,
.link-item {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    margin: 0 1rem !important;
    transition: all 0.3s ease !important;
    border-radius: 4px !important;
}

.account-link:hover,
.link-item:hover {
    background-color: #E9ECEF !important;
    color: black !important;
}

/* Tablas (pedidos, devoluciones, etc.) */
table.table,
.table-responsive table {
    border: none !important;
}

table.table thead {
    background-color: transparent !important;
    border-bottom: 2px solid #eee !important;
}

table.table th {
    font-family: 'Futura Light', Arial, sans-serif !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    color: black !important;
    font-weight: 500 !important;
    border: none !important;
}

table.table td {
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 1rem 0.75rem !important;
}

table.table tbody tr:hover {
    background-color: rgba(233, 236, 239, 0.05) !important;
}

/* Order history - historial de pedidos */
#order-history .table td,
#order-history .table th {
    vertical-align: middle !important;
}

body#history .page-header,
body.page-history .page-header {
    margin-top: 2rem !important;
}

/* Override Payment Accepted Blue Label */
.label.label-pill[style*="#3498D8"] {
    background-color: #E9ECEF !important;
}

/* Address book - libro de direcciones */
.address-tile {
    background: transparent !important;
    border: 1px solid #e0e0e0 !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
}

.address-tile:hover {
    border-color: #E9ECEF !important;
    box-shadow: 0 2px 8px rgba(233, 236, 239, 0.15) !important;
}

.address-tile .address-footer {
    margin-top: 1rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #f0f0f0 !important;
}

/* My account menu */
.account-list {
    list-style: none !important;
    padding: 0 !important;
}

.account-list li {
    border-bottom: 1px solid #eee !important;
}

.account-list a {
    display: block !important;
    padding: 1rem 0 !important;
    transition: all 0.3s ease !important;
}

.account-list a:hover {
    padding-left: 0.5rem !important;
    color: #E9ECEF !important;
}

/* Order details - detalles de pedido */
.order-items {
    border: none !important;
}

.order-item {
    border-bottom: 1px solid #eee !important;
    padding: 1.5rem 0 !important;
}

.order-item:last-child {
    border-bottom: none !important;
}

/* Return/Refund forms */
.order-return,
.order-slip {
    background: transparent !important;
    border: 1px solid #e0e0e0 !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

/* Cards generales */
.card {
    border-radius: 0 !important;
    background: transparent !important;
    border-color: transparent !important;
    padding: 1rem !important;
}

.card-block {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid #eee !important;
    font-family: 'Futura Light', Arial, sans-serif !important;
    letter-spacing: 1px !important;
}

/* Product listings en cuenta */
.product-line {
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 1rem 0 !important;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent !important;
    padding: 0.75rem 0 !important;
    font-size: 0.85rem !important;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: #999 !important;
}

.breadcrumb-item a {
    color: #666 !important;
}

.breadcrumb-item a:hover {
    color: #E9ECEF !important;
}

/* ============================================
   QUANTITY INPUT GROUP - HORIZONTAL LAYOUT
   ============================================ */
.input-group.quantity-input-group,
.quantity-input-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
}

.quantity-input-group .btn,
.quantity-input-group button {
    flex: 0 0 auto !important;
    min-width: 40px !important;
    border-radius: 0 !important;
}

.quantity-input-group input[type="number"] {
    flex: 1 !important;
    min-width: 60px !important;
    text-align: center !important;
    /* border-left: none !important;
    border-right: none !important; */
    border: none !important;
}

.quantity-input-group .btn:first-child {
    border-top-left-radius: 0.25rem !important;
    border-bottom-left-radius: 0.25rem !important;
}

.quantity-input-group .btn:last-child {
    border-top-right-radius: 0.25rem !important;
    border-bottom-right-radius: 0.25rem !important;
}

/* ============================================
   CART PAGE - ACTION BUTTONS
   ============================================ */
.cart-action-buttons .btn {
    font-size: 0.9rem !important;
    padding: 0.6rem 1rem !important;
}

/* ============================================
   CHECKOUT PAGE - MOBILE REORDERING
   ============================================ */
@media (max-width: 991px) {

    /* Make the checkout container use flexbox */
    body.page-order #content .row {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Cart summary appears first (on top) */
    body.page-order #content .cart-grid-right {
        order: 1 !important;
        margin-bottom: 2rem !important;
        padding-left: 0 !important;
    }

    /* Checkout steps appear second (below) */
    body.page-order #content .cart-grid-body {
        order: 2 !important;
    }

    /* Remove sticky behavior on mobile */
    body.page-order .cart-grid-right {
        position: relative !important;
        top: auto !important;
    }
}

/* ============================================
   ORDER CONFIRMATION PAGE
   ============================================ */

/* Hide featured products section */
#content-hook-order-confirmation-footer {
    display: none !important;
}

/* Restore card styles for order confirmation */
/* Restore card styles for order confirmation */
/* 
body.page-order-confirmation .card {
    background: transparent !important;
    padding: 1rem !important; 
    border-color: transparent !important;
} 
*/


/* Order details list - add spacing between items */
#order-details ul {
    list-style: none !important;
    padding: 0 !important;
}

#order-details ul li {
    margin-bottom: 1rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

#order-details ul li:last-child {
    border-bottom: none !important;
}

/* Order confirmation table - image and summary side by side */
.order-confirmation-table .order-line {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 2rem !important;
}

.order-confirmation-table .order-line .image {
    display: block !important;
    width: 100% !important;
}

.order-confirmation-table .order-line .image img {
    width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
}

/* Order summary table styling */
.order-summary-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.order-summary-table tr {
    border-bottom: 1px solid #f0f0f0 !important;
}

.order-summary-table td {
    padding: 0.75rem 1rem !important;
    font-family: 'Futura Light', Arial, sans-serif !important;
}

.order-summary-table td:first-child {
    text-align: left !important;
    color: #666 !important;
}

.order-summary-table td:last-child {
    text-align: right !important;
    font-weight: 500 !important;
}

.order-summary-table .total-value td {
    font-size: 1.1rem !important;
    padding-top: 1rem !important;
    border-top: 2px solid #E9ECEF !important;
}

/* Responsive adjustments for order confirmation */
@media (max-width: 768px) {
    .order-confirmation-table .order-line {
        flex-direction: column !important;
    }

    #order-details ul li {
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .legal a {
        font-size: smaller;
    }
}

/* ============================================
   ORDER DETAIL PAGE - SIMPLIFIED VIEW
   ============================================ */
/* Hide history, items and totals as requested */
body#order-detail #order-history,
body.page-order-detail #order-history,
body#order-detail #order-products,
body.page-order-detail #order-products,
body#order-detail .order-items,
body.page-order-detail .order-items,
body#order-detail .order-totals,
body.page-order-detail .order-totals {
    display: none !important;
}

/* Fix addresses layout to be side-by-side */
body#order-detail .addresses,
body.page-order-detail .addresses {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -15px;
    margin-left: -15px;
}

body#order-detail .addresses .col-lg-6,
body.page-order-detail .addresses .col-lg-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    float: none !important;
    padding-right: 15px;
    padding-left: 15px;
}

/* ============================================
   REGLAS IMPORTADAS DE CUSTOM.CSS
   ============================================ */
.sticky-cart-summary {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.form-group.row {
    margin-bottom: 0.25rem;
}

.page-header {
    margin-top: 2.5rem;
}

/* ============================================
   KLARO COOKIE CONSENT STYLES
   ============================================ */
/* Klaro! Variables */
:root {
    --klaro-green: var(--green1, #1a936f);
    --klaro-blue: var(--color-text);
    --klaro-font: var(--font-futura-light, 'Futura-Light', sans-serif);
}

.klaro {
    font-family: var(--klaro-font) !important;
    color: black !important;
}

/* The Overlay / Backdrop */
.klaro .cookie-modal {
    background-color: rgba(0, 0, 0, 0.5) !important;
    /* Transparent Gray Dimming */
    z-index: 9999 !important;
}

/* The Inner Modal Box */
.klaro .cookie-modal .cm-modal {
    background-color: #ffffff !important;
    /* White Background */
    color: #000000 !important;
    /* Black Text */
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modal Title */
.klaro .cookie-modal .cm-title {
    color: #000000 !important;
}

/* Primary Button (Accept/Save) */
.klaro .cookie-modal .cm-btn.cm-btn-success,
.klaro .cookie-modal .cm-btn.cm-btn-info {
    background-color: var(--green1, #1a936f) !important;
    border-color: var(--green1, #1a936f) !important;
    color: white !important;
}

/* Notice Bar (Bottom Banner) */
.klaro .cookie-notice {
    background-color: var(--color-nav) !important;
    border-top: 1px solid var(--color-gold);
}

/* Links */
.klaro .cookie-notice .cn-learn-more,
.klaro .cookie-modal a {
    color: var(--green1, #1a936f) !important;
}

/* Text Colors inside Modal - Universal Override */
.klaro .cookie-modal .cm-body,
.klaro .cookie-modal .cm-header,
.klaro .cookie-modal .cm-footer,
.klaro .cookie-modal * {
    color: #000000 !important;
}

/* Hide Powered by Klaro */
.klaro .cookie-modal .cm-powered-by {
    display: none !important;
}

.hide svg {
    stroke: black !important;
}

