/* Decometal B2B Frontend Styles */

/* ========================================
   Shared Button Style (matches Divi)
   ======================================== */

.dcmb2b-btn,
.ywraq-wrapper .yith-ywraq-mail-form-wrapper .raq-send-request,
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content button[type="submit"],
.woocommerce-MyAccount-content input[type="submit"],
.woocommerce-MyAccount-content table .woocommerce-button,
.woocommerce-MyAccount-content table .button,
.um .um-button {
    display: inline-block;
    padding: 14px 24px !important;
    background-color: #FF6600 !important;
    color: #0F0F0F !important;
    border-width: 0 !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    font-family: 'TASA Semibold', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none !important;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}

.dcmb2b-btn:hover,
.ywraq-wrapper .yith-ywraq-mail-form-wrapper .raq-send-request:hover,
.woocommerce-MyAccount-content .woocommerce-Button:hover,
.woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-MyAccount-content input[type="submit"]:hover,
.woocommerce-MyAccount-content table .woocommerce-button:hover,
.woocommerce-MyAccount-content table .button:hover,
.um .um-button:hover {
    background-color: #0F0F0F !important;
    color: #fff !important;
}

/* Secondary button (outline) */
.dcmb2b-btn-secondary,
.ywraq-wrapper .yith-ywraq-before-table a.wc-backward,
.ywraq-wrapper input.button[name="update_raq"],
.ywraq-wrapper button[name="update_raq"],
.um .um-button.um-alt {
    display: inline-block;
    padding: 14px 24px !important;
    background-color: transparent !important;
    color: #0F0F0F !important;
    border: 1px solid #0F0F0F !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    font-family: 'TASA Semibold', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none !important;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1.4;
}

.dcmb2b-btn-secondary:hover,
.ywraq-wrapper .yith-ywraq-before-table a.wc-backward:hover,
.ywraq-wrapper input.button[name="update_raq"]:hover,
.ywraq-wrapper button[name="update_raq"]:hover,
.um .um-button.um-alt:hover {
    background-color: #0F0F0F !important;
    color: #fff !important;
}

/* ========================================
   Shared Input Style (matches Divi)
   ======================================== */

.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="password"],
.woocommerce-MyAccount-content input[type="tel"],
.woocommerce-MyAccount-content select,
.um .um-field input[type="text"],
.um .um-field input[type="password"],
.um .um-field input[type="email"],
.um .um-field input[type="tel"],
.um .um-field input[type="number"],
.um .um-field select,
.ywraq-wrapper .yith-ywraq-mail-form-wrapper input[type="text"],
.ywraq-wrapper .yith-ywraq-mail-form-wrapper input[type="email"] {
    width: 100%;
    padding: 9px 0 !important;
    border: none !important;
    border-bottom: 1px solid #aaa !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    font-size: 0.95em;
    color: #333;
    box-shadow: none !important;
    -webkit-appearance: none;
    transition: border-color 0.2s ease;
}

.woocommerce-MyAccount-content input:focus,
.woocommerce-MyAccount-content select:focus,
.um .um-field input:focus,
.um .um-field select:focus,
.ywraq-wrapper .yith-ywraq-mail-form-wrapper input:focus {
    border-bottom-color: #FF6600 !important;
    outline: none;
    box-shadow: none !important;
}

/* Textarea (message) — similar but with subtle border */
.woocommerce-MyAccount-content textarea,
.um .um-field textarea,
.ywraq-wrapper .yith-ywraq-mail-form-wrapper textarea {
    width: 100%;
    padding: 9px 0 !important;
    border: none !important;
    border-bottom: 1px solid #aaa !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    font-size: 0.95em;
    color: #333;
    min-height: 60px;
    resize: vertical;
    box-shadow: none !important;
    transition: border-color 0.2s ease;
}

.woocommerce-MyAccount-content textarea:focus,
.um .um-field textarea:focus,
.ywraq-wrapper .yith-ywraq-mail-form-wrapper textarea:focus {
    border-bottom-color: #FF6600 !important;
    outline: none;
    box-shadow: none !important;
}

/* Labels — no uppercase, normal capitalization */
.woocommerce-MyAccount-content label,
.um .um-field-label label,
.ywraq-wrapper .yith-ywraq-mail-form-wrapper label {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: none !important;
    letter-spacing: 0;
    color: #333;
}

/* ========================================
   Custom Quantity Selector
   ======================================== */

.dcmb2b-qty-label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0;
    color: #333;
    margin-bottom: 6px;
    text-transform: none;
}

.dcmb2b-qty-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #c9c8c8;
    border-radius: 0;
    overflow: hidden;
}

.dcmb2b-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #333;
    padding: 0;
    line-height: 1;
    transition: background 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.dcmb2b-qty-btn:hover {
    background: #f0f0f0;
}

.dcmb2b-qty-btn:active {
    background: #e0e0e0;
}

.dcmb2b-qty-minus {
    border-right: 1px solid #c9c8c8;
}

.dcmb2b-qty-plus {
    border-left: 1px solid #c9c8c8;
}

.dcmb2b-qty-input,
.dcmb2b-qty-wrapper input[type="number"] {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none !important;
    font-size: 1em;
    font-weight: 600;
    color: #333;
    padding: 8px 4px !important;
    background: #fff !important;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none !important;
}

.dcmb2b-qty-input::-webkit-outer-spin-button,
.dcmb2b-qty-input::-webkit-inner-spin-button,
.dcmb2b-qty-wrapper input[type="number"]::-webkit-outer-spin-button,
.dcmb2b-qty-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity .dcmb2b-qty-wrapper {
    margin: 0;
}

/* ========================================
   Price & Discount Styles
   ======================================== */

.dcmb2b-login-to-see {
    color: #333;
    font-size: 0.9em;
    text-decoration: underline;
}

.dcmb2b-discount-badge {
    display: inline-block;
    background: #e8f7ee;
    color: #0f8a3d;
    font-size: 0.6em;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 999px;
    vertical-align: middle;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid #c7ecd5;
    margin-left: 6px;
}

.dcmb2b-package-info {
    margin: 10px 0;
    padding: 8px 12px;
    background: #f5f5f5;
    border-left: 3px solid #333;
    font-size: 0.9em;
    color: #555;
}

.dcmb2b-package-icon {
    margin-right: 4px;
}

.dcmb2b-promo-info {
    margin: 10px 0;
    padding: 10px 14px;
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    font-size: 0.9em;
}

.dcmb2b-promo-badge {
    display: inline-block;
    background: #ff9800;
    color: #fff;
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: none;
    font-weight: 700;
    margin-top: 4px;
}

.dcmb2b-minimum-order-notice {
    margin: 15px 0;
    padding: 12px 16px;
    background: #e3f2fd;
    border-left: 3px solid #1976d2;
    font-size: 0.95em;
}

/* Package qty reminder in quote table */
.dcmb2b-pkg-reminder {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
    font-weight: 400;
}

/* ========================================
   YITH Request a Quote — /cotizar/ page
   ======================================== */

/* Force vertical layout: table on top, form below */
.ywraq-wrapper .ywraq-form-table-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ywraq-wrapper .ywraq-form-table-wrapper > form,
.ywraq-wrapper .ywraq-form-table-wrapper > #yith-ywraq-form {
    width: 100% !important;
    float: none !important;
}

.ywraq-wrapper .ywraq-form-table-wrapper > .yith-ywraq-mail-form-wrapper {
    width: 100% !important;
    float: none !important;
}

/* --- Table --- */
.ywraq-wrapper table.shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    border: 1px solid #e8e8e8;
}

/* --- Header --- */
.ywraq-wrapper table.shop_table thead th {
    background: #f8f8f8;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    border-bottom: 2px solid #e8e8e8;
    vertical-align: middle;
}

.ywraq-wrapper table.shop_table thead th.product-price,
.ywraq-wrapper table.shop_table thead th.product-quantity,
.ywraq-wrapper table.shop_table thead th.product-subtotal {
    text-align: right;
}

.ywraq-wrapper table.shop_table thead th.product-remove {
    width: 36px;
}

/* --- Cells --- */
.ywraq-wrapper table.shop_table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}

.ywraq-wrapper table.shop_table tbody tr:hover td {
    background: #fafafa;
}

/* --- Remove button (first column) --- */
.ywraq-wrapper table.shop_table td.product-remove {
    width: 36px;
    text-align: center;
    padding: 12px 8px;
}

.ywraq-wrapper table.shop_table .product-remove a {
    color: #ccc;
    font-size: 1.3em;
    text-decoration: none;
    line-height: 1;
    transition: color 0.15s;
}

.ywraq-wrapper table.shop_table .product-remove a:hover {
    color: #ef4444;
}

/* --- Thumbnail --- */
.ywraq-wrapper table.shop_table td.product-thumbnail {
    width: 60px;
    padding: 10px 8px 10px 0;
}

.ywraq-wrapper table.shop_table .product-thumbnail img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border: 1px solid #eee;
    display: block;
}

/* --- Product name --- */
.ywraq-wrapper table.shop_table td.product-name {
    line-height: 1.4;
}

/* Product title link */
.ywraq-wrapper table.shop_table .product-name > a {
    font-weight: 600;
    color: #0F0F0F;
    text-decoration: none;
    font-size: 0.95em;
}

.ywraq-wrapper table.shop_table .product-name > a:hover {
    color: #FF6600;
}

/* SKU — smaller and muted, appended inside the <a> as <small> */
.ywraq-wrapper table.shop_table .product-name a small,
.ywraq-wrapper table.shop_table .product-name .sku {
    font-size: 0.78em;
    font-weight: 400;
    color: #aaa;
    letter-spacing: 0.02em;
}

/* Package reminder */
.ywraq-wrapper table.shop_table .product-name .dcmb2b-pkg-reminder {
    font-size: 0.78em;
    color: #999;
    margin-top: 2px;
}

/* Variations list — YITH outputs <br><ul><li>...<br></li></ul> */
.ywraq-wrapper table.shop_table .product-name ul {
    margin: 3px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ywraq-wrapper table.shop_table .product-name ul li {
    font-size: 0.8em;
    color: #777;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

/* Kill the <br> tags YITH injects after each <li> */
.ywraq-wrapper table.shop_table .product-name ul br {
    display: none;
}

/* Also kill the <br> before the <ul> */
.ywraq-wrapper table.shop_table .product-name > br {
    display: none;
}

/* Mobile price (hidden on desktop) */
.ywraq-wrapper table.shop_table .product-name .mobile-price {
    display: none;
}

/* --- Price / Subtotal --- */
.ywraq-wrapper table.shop_table td.product-price,
.ywraq-wrapper table.shop_table td.product-subtotal {
    text-align: right;
    white-space: nowrap;
    font-size: 0.9em;
}

.ywraq-wrapper table.shop_table td.product-price {
    color: #555;
}

.ywraq-wrapper table.shop_table td.product-subtotal {
    font-weight: 700;
    color: #0F0F0F;
}

/* --- Quantity in quote table --- */
.ywraq-wrapper table.shop_table td.product-quantity {
    text-align: center;
    vertical-align: middle;
    min-width: 140px;
    overflow: visible !important;
}

.ywraq-wrapper table.shop_table .product-quantity .quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
}

/* Hide "Cantidad" label inside the table — column header already says it */
.ywraq-wrapper table.shop_table .product-quantity .dcmb2b-qty-label {
    display: none !important;
}

/* Custom qty wrapper inside quote table — full size, no clipping */
.ywraq-wrapper table.shop_table .product-quantity .dcmb2b-qty-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #d5d5d5 !important;
    overflow: visible !important;
    flex-shrink: 0;
}

.ywraq-wrapper table.shop_table .product-quantity .dcmb2b-qty-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    font-size: 1.1em !important;
    flex-shrink: 0;
    padding: 0 !important;
}

.ywraq-wrapper table.shop_table .product-quantity .dcmb2b-qty-input,
.ywraq-wrapper table.shop_table .product-quantity .dcmb2b-qty-wrapper input[type="number"] {
    width: 52px !important;
    height: 36px !important;
    min-height: 36px !important;
    font-size: 0.9em !important;
    padding: 4px 2px !important;
    text-align: center !important;
    border: none !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: none !important;
}

/* Fallback: plain WooCommerce input without custom wrapper */
.ywraq-wrapper table.shop_table .product-quantity > .quantity > input[type="number"] {
    width: 64px !important;
    height: 38px !important;
    padding: 6px 4px !important;
    text-align: center;
    border: 1px solid #d5d5d5 !important;
    border-radius: 0 !important;
    background: #fff !important;
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    vertical-align: middle;
}

.ywraq-wrapper table.shop_table .product-quantity input[type="number"]::-webkit-outer-spin-button,
.ywraq-wrapper table.shop_table .product-quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* --- Totals row --- */
.ywraq-wrapper table.shop_table .raq-totals-row {
    border: none !important;
    padding: 8px 14px;
}

.ywraq-wrapper table.shop_table .raq-totals-label {
    text-align: right;
    padding: 12px 14px;
    font-size: 0.85em;
    font-weight: 700;
    color: #555;
    border-top: 2px solid #e8e8e8;
}

.ywraq-wrapper table.shop_table .raq-totals {
    text-align: right;
    padding: 12px 14px;
    font-size: 1em;
    font-weight: 800;
    color: #0F0F0F;
    border-top: 2px solid #e8e8e8;
}

/* --- Buttons below table (Update / Clear / PDF) --- */
.ywraq-wrapper .update-list-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

/* "Volver al catálogo" */
.ywraq-wrapper .ywraq-before-form {
    margin-bottom: 16px;
}

/* --- Form wrapper --- */
.ywraq-wrapper .yith-ywraq-mail-form-wrapper {
    margin-top: 30px;
    padding: 28px 32px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
}

.ywraq-wrapper .yith-ywraq-mail-form-wrapper h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: #0F0F0F;
    margin: 0 0 20px;
    text-transform: none;
}

/* Hide redundant fields for logged-in users */
body.logged-in .yith-ywraq-mail-form-wrapper #first_name_field,
body.logged-in .yith-ywraq-mail-form-wrapper #last_name_field,
body.logged-in .yith-ywraq-mail-form-wrapper #email_field {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.ywraq-wrapper .yith-ywraq-mail-form-wrapper form {
    position: relative;
}

/* Quotes actions button on My Account */
.dcmb2b-quotes-actions {
    margin-bottom: 24px;
}

/* ========================================
   Mobile Header Icons
   Relocated into #main-header via JS so they
   scroll with the header (no position:fixed).
   ======================================== */

.dcmb2b-mobile-icons {
    display: none;
}

@media (max-width: 980px) {
    .dcmb2b-mobile-icons {
        display: flex;
        align-items: center;
        gap: 4px;
        position: absolute;
        top: 50%;
        right: 70px;
        transform: translateY(-50%);
        z-index: 99;
    }

    .dcmb2b-mobile-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        text-decoration: none;
        transition: background 0.15s ease;
    }

    .dcmb2b-mobile-icon:hover,
    .dcmb2b-mobile-icon:active {
        background: rgba(255, 255, 255, 0.2);
    }

    .dcmb2b-mobile-icon svg {
        width: 18px;
        height: 18px;
        fill: #f8f6f6;
        stroke: none;
    }

    /* The quote list icon uses stroke instead of fill */
    .dcmb2b-mobile-icon:last-child svg {
        fill: none;
        stroke: #f8f6f6;
    }
}

@media (max-width: 767px) {
    .dcmb2b-mobile-icons {
        right: 60px;
    }

    .dcmb2b-mobile-icon {
        width: 32px;
        height: 32px;
    }

    .dcmb2b-mobile-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ========================================
   Marquee ([dcmb2b_marquee])
   ======================================== */

.dcmb2b-marquee {
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: none;
}

.dcmb2b-marquee-track {
    display: inline-flex;
    animation: dcmb2b-scroll linear infinite;
    will-change: transform;
}

.dcmb2b-marquee:hover .dcmb2b-marquee-track {
    animation-play-state: paused;
}

.dcmb2b-marquee-content {
    flex-shrink: 0;
}

.dcmb2b-marquee-sep {
    opacity: 0.35;
}

@keyframes dcmb2b-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   Category Links ([dcmb2b_categories])
   ======================================== */

/* Toggle button — hidden on desktop, visible on mobile */
.dcmb2b-categories-toggle {
    display: none;
}

.dcmb2b-categories {
    column-gap: 28px;
}

.dcmb2b-cat-group {
    break-inside: avoid;
    margin-bottom: 8px;
}

.dcmb2b-cat-parent {
    display: block;
    color: #0F0F0F !important;
    text-decoration: none !important;
    font-family: 'TASA Regular', Helvetica, Arial, Lucida, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    padding: 3px 0;
    transition: color 0.15s ease;
}

.dcmb2b-cat-parent:hover {
    color: #FF6600 !important;
}

.dcmb2b-cat-parent.is-active {
    color: #FF6600 !important;
}

.dcmb2b-cat-subs {
    display: flex;
    flex-direction: column;
    padding-left: 12px;
    border-left: 2px solid #e8e8e8;
    margin: 1px 0 0 4px;
}

.dcmb2b-cat-sub {
    color: #666 !important;
    text-decoration: none !important;
    font-size: 13px;
    padding: 3px 0;
    line-height: 1.3;
    transition: color 0.15s ease;
}

.dcmb2b-cat-sub:hover {
    color: #FF6600 !important;
}

.dcmb2b-cat-sub.is-active {
    color: #FF6600 !important;
    font-weight: 600;
}

/* Tablet */
@media (min-width: 769px) and (max-width: 980px) {
    .dcmb2b-categories {
        column-count: 2 !important;
    }
}

/* Mobile — collapsible, 2 columns, smaller */
@media (max-width: 768px) {
    .dcmb2b-categories-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        background: #f5f5f5;
        border: 1px solid #e8e8e8;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        color: #0F0F0F;
        cursor: pointer;
        -webkit-appearance: none;
        text-transform: none;
    }

    .dcmb2b-categories-toggle:active {
        background: #eee;
    }

    .dcmb2b-categories-chevron {
        margin-left: auto;
        transition: transform 0.2s ease;
    }

    .dcmb2b-categories-toggle.is-open .dcmb2b-categories-chevron {
        transform: rotate(180deg);
    }

    .dcmb2b-categories {
        display: none;
        column-count: 2 !important;
        column-gap: 20px;
        padding: 12px 0 0;
    }

    .dcmb2b-categories.is-open {
        display: block;
    }

    .dcmb2b-cat-group {
        margin-bottom: 6px;
    }

    .dcmb2b-cat-parent {
        font-size: 13px;
        padding: 3px 0;
    }

    .dcmb2b-cat-subs {
        padding-left: 10px;
    }

    .dcmb2b-cat-sub {
        font-size: 12px;
        padding: 2px 0;
    }
}

/* ========================================
   Mobile Category Panel (≤980px)
   ======================================== */

/* Hidden on desktop */
@media (min-width: 981px) {
    .dcmb2b-mobile-cats {
        display: none !important;
    }
}

.dcmb2b-mobile-cats {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: #0F0F0F;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    visibility: hidden;
}

.dcmb2b-mobile-cats.is-open {
    transform: translateX(0);
    visibility: visible;
}

/* Sticky header */
.dcmb2b-mobile-cats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    background: #0F0F0F;
    z-index: 1;
}

.dcmb2b-mobile-cats-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    -webkit-appearance: none;
}

.dcmb2b-mobile-cats-back:active {
    color: #fff;
}

.dcmb2b-mobile-cats-back svg {
    flex-shrink: 0;
}

.dcmb2b-mobile-cats-viewall {
    color: #FF6600;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    padding: 8px 0;
}

.dcmb2b-mobile-cats-viewall:active {
    opacity: 0.7;
}

/* Two-column grid */
.dcmb2b-mobile-cats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px 20px 60px;
    gap: 0 16px;
}

/* Category item */
.dcmb2b-mobile-cat-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dcmb2b-mobile-cat-row {
    display: flex;
    align-items: center;
    min-height: 44px;
}

.dcmb2b-mobile-cat-link {
    flex: 1;
    color: #fff;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    padding: 12px 0;
    line-height: 1.3;
}

.dcmb2b-mobile-cat-link:active {
    color: #FF6600;
}

/* Toggle chevron */
.dcmb2b-mobile-cat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.dcmb2b-mobile-cat-toggle.is-expanded {
    transform: rotate(180deg);
    color: #FF6600;
}

/* Children (collapsed by default) */
.dcmb2b-mobile-cat-children {
    display: none;
    padding: 0 0 8px;
}

.dcmb2b-mobile-cat-child {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.8em;
    padding: 9px 0 9px 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    margin-left: 4px;
    line-height: 1.3;
}

.dcmb2b-mobile-cat-child:active {
    color: #FF6600;
    border-left-color: #FF6600;
}

/* Phone: single column */
@media (max-width: 480px) {
    .dcmb2b-mobile-cats-grid {
        grid-template-columns: 1fr;
        padding: 8px 16px 60px;
    }
}

/* ========================================
   Megamenu ([dcmb2b_megamenu])
   Dark bg (#0F0F0F) — white text — orange hover
   High specificity to override Divi Engine megamenu
   ======================================== */

.de-mega-menu .dcmb2b-mega,
.et_pb_section .dcmb2b-mega,
.dcmb2b-mega {
    display: grid !important;
    gap: 0 40px !important;
    padding: 32px 36px 20px !important;
    background: transparent !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.dcmb2b-mega[data-cols="2"] { grid-template-columns: repeat(2, 1fr) !important; }
.dcmb2b-mega[data-cols="3"] { grid-template-columns: repeat(3, 1fr) !important; }
.dcmb2b-mega[data-cols="4"] { grid-template-columns: repeat(4, 1fr) !important; }
.dcmb2b-mega[data-cols="5"] { grid-template-columns: repeat(5, 1fr) !important; }

.de-mega-menu .dcmb2b-mega-col,
.dcmb2b-mega-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.de-mega-menu .dcmb2b-mega-group,
.dcmb2b-mega-group {
    padding: 0 0 16px !important;
    margin-bottom: 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.de-mega-menu .dcmb2b-mega-group:last-child,
.dcmb2b-mega-group:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Parent category links — white */
.de-mega-menu .dcmb2b-mega-parent,
.de-mega-menu a.dcmb2b-mega-parent,
.et_pb_section .dcmb2b-mega-parent,
.dcmb2b-mega a.dcmb2b-mega-parent,
a.dcmb2b-mega-parent {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #fff !important;
    text-decoration: none !important;
    font-family: 'TASA Semibold', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    padding: 4px 0 !important;
    transition: color 0.15s ease !important;
    letter-spacing: 0.01em !important;
    background: none !important;
    border: none !important;
    text-transform: none !important;
}

.de-mega-menu .dcmb2b-mega-parent:hover,
.de-mega-menu a.dcmb2b-mega-parent:hover,
.dcmb2b-mega a.dcmb2b-mega-parent:hover,
a.dcmb2b-mega-parent:hover {
    color: #FF6600 !important;
}

.de-mega-menu .dcmb2b-mega-count,
.dcmb2b-mega-count {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.3) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Subcategory list */
.de-mega-menu .dcmb2b-mega-subs,
.dcmb2b-mega-subs {
    list-style: none !important;
    margin: 6px 0 0 !important;
    padding: 0 0 0 12px !important;
    border-left: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.de-mega-menu .dcmb2b-mega-subs li,
.dcmb2b-mega-subs li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Subcategory links — light gray */
.de-mega-menu .dcmb2b-mega-sub,
.de-mega-menu a.dcmb2b-mega-sub,
.et_pb_section .dcmb2b-mega-sub,
.dcmb2b-mega a.dcmb2b-mega-sub,
a.dcmb2b-mega-sub {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: rgba(255, 255, 255, 0.55) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    padding: 4px 0 !important;
    line-height: 1.3 !important;
    transition: color 0.15s ease !important;
    background: none !important;
    border: none !important;
    text-transform: none !important;
}

.de-mega-menu .dcmb2b-mega-sub:hover,
.de-mega-menu a.dcmb2b-mega-sub:hover,
.dcmb2b-mega a.dcmb2b-mega-sub:hover,
a.dcmb2b-mega-sub:hover {
    color: #FF6600 !important;
}

/* Footer: ver todo el catálogo */
.de-mega-menu .dcmb2b-mega-footer,
.dcmb2b-mega-footer {
    grid-column: 1 / -1 !important;
    padding: 16px 0 4px !important;
    margin-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-align: right !important;
}

.de-mega-menu .dcmb2b-mega-viewall,
.de-mega-menu a.dcmb2b-mega-viewall,
.dcmb2b-mega a.dcmb2b-mega-viewall,
a.dcmb2b-mega-viewall {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #FF6600 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    transition: opacity 0.15s ease !important;
    background: none !important;
    border: none !important;
    text-transform: none !important;
}

.de-mega-menu .dcmb2b-mega-viewall:hover,
.de-mega-menu a.dcmb2b-mega-viewall:hover,
a.dcmb2b-mega-viewall:hover {
    opacity: 0.75 !important;
}

/* Tablet: 2 columns */
@media (max-width: 980px) {
    .de-mega-menu .dcmb2b-mega,
    .dcmb2b-mega {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 24px 20px 16px !important;
        gap: 0 24px !important;
    }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .de-mega-menu .dcmb2b-mega,
    .dcmb2b-mega {
        grid-template-columns: 1fr !important;
        padding: 16px !important;
    }

    .dcmb2b-mega-group {
        padding-bottom: 12px !important;
        margin-bottom: 12px !important;
    }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {

    /* Quote page */
    .ywraq-wrapper .yith-ywraq-mail-form-wrapper {
        padding: 20px 16px;
        margin-top: 20px;
    }

    .ywraq-wrapper table.shop_table {
        font-size: 0.85em;
        border: none;
    }

    .ywraq-wrapper table.shop_table thead {
        display: none;
    }

    .ywraq-wrapper table.shop_table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #e8e8e8;
        gap: 0 8px;
    }

    .ywraq-wrapper table.shop_table tbody td {
        display: block;
        padding: 4px 0;
        border-bottom: none;
    }

    /* Remove: top-right */
    .ywraq-wrapper table.shop_table td.product-remove {
        order: 1;
        width: auto;
        padding: 0;
    }

    .ywraq-wrapper table.shop_table td.product-remove::before {
        display: none;
    }

    /* Thumbnail */
    .ywraq-wrapper table.shop_table td.product-thumbnail {
        order: 2;
        width: 50px;
        padding: 4px 8px 4px 0;
    }

    .ywraq-wrapper table.shop_table td.product-thumbnail::before {
        display: none;
    }

    .ywraq-wrapper table.shop_table td.product-thumbnail img {
        width: 44px;
        height: 44px;
    }

    /* Name: takes remaining width */
    .ywraq-wrapper table.shop_table td.product-name {
        order: 3;
        flex: 1;
        min-width: 0;
    }

    .ywraq-wrapper table.shop_table td.product-name::before {
        display: none;
    }

    /* Show mobile price */
    .ywraq-wrapper table.shop_table .product-name .mobile-price {
        display: inline;
        font-weight: 700;
        color: #0F0F0F;
        font-size: 0.9em;
    }

    /* Hide desktop price/subtotal on mobile */
    .ywraq-wrapper table.shop_table td.product-price,
    .ywraq-wrapper table.shop_table td.product-subtotal {
        display: none;
    }

    /* Quantity: full width row */
    .ywraq-wrapper table.shop_table td.product-quantity {
        order: 4;
        width: 100%;
        text-align: left;
        padding: 6px 0 0;
    }

    .ywraq-wrapper table.shop_table td.product-quantity::before {
        content: attr(data-title) ": ";
        font-weight: 600;
        font-size: 0.8em;
        color: #888;
    }

    .ywraq-wrapper table.shop_table .product-quantity .quantity {
        display: inline-flex;
        overflow: visible !important;
    }

    .ywraq-wrapper table.shop_table .product-quantity .dcmb2b-qty-wrapper {
        overflow: visible !important;
    }

    /* Buttons full width on mobile */
    .dcmb2b-btn,
    .ywraq-wrapper .yith-ywraq-mail-form-wrapper .raq-send-request,
    .woocommerce-MyAccount-content .woocommerce-Button,
    .woocommerce-MyAccount-content button[type="submit"],
    .woocommerce-MyAccount-content input[type="submit"] {
        width: 100%;
        text-align: center;
    }

    .dcmb2b-btn-secondary,
    .ywraq-wrapper .yith-ywraq-before-table a.wc-backward,
    .ywraq-wrapper input.button[name="update_raq"],
    .ywraq-wrapper button[name="update_raq"] {
        width: 100%;
        text-align: center;
    }

    /* Quantity selector on mobile */
    .dcmb2b-qty-wrapper {
        width: 100%;
        justify-content: center;
    }

    .dcmb2b-qty-input,
    .dcmb2b-qty-wrapper input[type="number"] {
        flex: 1;
        max-width: 100px;
    }

    .dcmb2b-package-info {
        font-size: 0.85em;
    }

    .dcmb2b-promo-info,
    .dcmb2b-minimum-order-notice {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .ywraq-wrapper .yith-ywraq-mail-form-wrapper {
        padding: 16px 12px;
    }

    .ywraq-wrapper table.shop_table tbody td {
        padding: 4px 10px;
        font-size: 0.85em;
    }
}

/* ========================================
   Single Product: Qty + Add-to-Quote Layout
   Stack vertically for clean alignment.
   ======================================== */

.single-product .woocommerce-variation-add-to-cart {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.single-product .quantity {
    margin-bottom: 4px;
}

.single-product .yith-ywraq-add-to-quote {
    margin-top: 16px;
    clear: both;
}

/* ========================================
   BodyCommerce Swatch Tooltip
   ======================================== */

.variation-tooltip-cont {
    background: #0F0F0F !important;
    color: #fff !important;
    padding: 8px 14px !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    font-family: 'TASA Regular', Helvetica, Arial, Lucida, sans-serif !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    white-space: nowrap !important;
    letter-spacing: 0.01em !important;
    line-height: 1.4 !important;
}

.variation-tooltip-cont::after {
    border-top-color: #0F0F0F !important;
}

.variation-tooltip-title {
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 767px) {
    .variation-tooltip-cont {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
}

/* ========================================
   Hide #fichatec when no ficha tecnica
   ======================================== */

body.no-ficha-tecnica #fichatec {
    display: none !important;
}

/* ========================================
   Quote form: logged-in user info
   ======================================== */

.dcmb2b-quote-user-info {
    font-family: 'TASA Semibold', Helvetica, Arial, Lucida, sans-serif;
    font-size: 14px;
    color: #4a4a4a;
    background: #f8f8f8;
    border-left: 3px solid #FF6600;
    padding: 12px 16px;
    margin: 0 0 20px;
    border-radius: 0 4px 4px 0;
}

.dcmb2b-quote-user-info strong {
    color: #0F0F0F;
}

/* ========================================
   WooCommerce / YITH notices
   ======================================== */

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-error li,
.ywraq-wrapper .woocommerce-message,
.ywraq-wrapper .woocommerce-info,
.ywraq-wrapper .woocommerce-error,
.ywraq-wrapper .woocommerce-error li,
.yith-ywraq-mail-form-wrapper .woocommerce-error,
.yith-ywraq-mail-form-wrapper .woocommerce-error li {
    font-family: 'TASA Semibold', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.woocommerce-notices-wrapper .woocommerce-message,
.ywraq-wrapper .woocommerce-message {
    background: #f0fdf4 !important;
    border-color: #10b981 !important;
    color: #166534 !important;
    border-width: 0 0 0 3px !important;
    border-style: solid !important;
    padding: 14px 18px !important;
    margin: 0 0 20px !important;
    border-radius: 0 4px 4px 0 !important;
}

.woocommerce-notices-wrapper .woocommerce-message::before,
.ywraq-wrapper .woocommerce-message::before {
    color: #10b981 !important;
}

.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-error li,
.ywraq-wrapper .woocommerce-error,
.ywraq-wrapper .woocommerce-error li,
.yith-ywraq-mail-form-wrapper .woocommerce-error,
.yith-ywraq-mail-form-wrapper .woocommerce-error li {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
    border-width: 0 0 0 3px !important;
    border-style: solid !important;
    padding: 14px 18px !important;
    margin: 0 0 20px !important;
    border-radius: 0 4px 4px 0 !important;
    list-style: none !important;
}

.woocommerce-notices-wrapper .woocommerce-error::before,
.ywraq-wrapper .woocommerce-error::before {
    color: #ef4444 !important;
}

.woocommerce-notices-wrapper .woocommerce-info,
.ywraq-wrapper .woocommerce-info {
    background: #f8f8f8 !important;
    border-color: #FF6600 !important;
    color: #4a4a4a !important;
    border-width: 0 0 0 3px !important;
    border-style: solid !important;
    padding: 14px 18px !important;
    margin: 0 0 20px !important;
    border-radius: 0 4px 4px 0 !important;
}

.woocommerce-notices-wrapper .woocommerce-info::before,
.ywraq-wrapper .woocommerce-info::before {
    color: #FF6600 !important;
}

/* YITH RAQ inline validation errors */
.yith-ywraq-mail-form-wrapper .woocommerce-error {
    background: #fef2f2 !important;
    padding: 14px 18px !important;
}

/* UM form notices (registration pending, etc.) */
.um .um-notice {
    font-family: 'TASA Semibold', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 14px !important;
    border-radius: 0 4px 4px 0 !important;
}

.um .um-notice.success {
    background: #f0fdf4 !important;
    border-color: #10b981 !important;
    color: #166534 !important;
}

.um .um-notice.err {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

/* ========================================
   IVA Display on /cotizar/ table
   ======================================== */

.dcmb2b-iva-row .raq-totals-label,
.dcmb2b-total-iva-row .raq-totals-label {
    font-family: 'TASA Semibold', Helvetica, Arial, Lucida, sans-serif !important;
}

.dcmb2b-iva-row .raq-totals {
    font-size: 14px;
}

.dcmb2b-total-iva-row .raq-totals {
    color: #FF6600 !important;
    font-weight: bold !important;
    font-size: 1.1em !important;
}

.dcmb2b-total-iva-row .raq-totals-label {
    font-weight: bold !important;
    font-size: 1.1em !important;
    color: #0F0F0F !important;
}
