
/* =========================
   1. TOKENS / VARIABLES
========================= */
:root {
    /* Colors */
    --bg: #f6f1ea;
    --bg-hero: #f7f7f6;
    --surface: #ffffff;
    --surface-soft: #f3ede5;

    --text-main: #111827;
    --text-soft: #6b7280;
    --text-muted: #9ca3af;

    --primary: #C69214;
    --primary-text: #8B6A0F;
    --secondary: #AB2328;

    --border: rgba(17, 24, 39, 0.08);
    --border-strong: rgba(17, 24, 39, 0.12);

    /* Effects */
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 25px rgba(171, 35, 40, 0.25);
    --focus-ring: 0 0 0 2px rgba(171, 35, 40, 0.15);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Layout */
    --shell-max: 1280px;
    --shell-padding: 24px;
    --section-y: 3.5rem;

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.35s ease;
}


/* =========================
   2. BASE / RESET
========================= */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text-main);
}

section[id] {
    scroll-margin-top: 110px;
}

#divQuoteForm {
    scroll-margin-top: 90px;
}

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

input[type="number"] {
    appearance: textfield;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

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

button {
    border: 0;
}


/* =========================
   3. TYPOGRAPHY
========================= */
.text-primary {
    color: var(--primary);
}

.eyebrow {
    display: block;
    margin-bottom: 1rem;
    color: var(--primary-text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.heading-hero {
    margin-bottom: 1.25rem;
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
}

.heading-section {
    margin-bottom: 1rem;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.12;
}

.heading-sub {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.heading-card {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.text-body {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.6;
}


/* =========================
   4. LAYOUT
========================= */
.section-shell {
    width: 100%;
    max-width: var(--shell-max);
    margin-inline: auto;
    padding-inline: var(--shell-padding);
}

.section-spacing {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.section-header {
    max-width: 720px;
    margin-inline: auto;
    margin-bottom: 2rem;
    text-align: center;
}


/* =========================
   5. COMPONENTS: CARDS
========================= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card > * + * {
    margin-top: 1rem;
}

.card-soft {
    background: var(--surface-soft);
    border-radius: var(--radius-lg);
}


/* =========================
   6. COMPONENTS: FORMS
========================= */
.label {
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}

.input,
#trackingInput,
#trackingInputModal,
#trackingRetryInput {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.05);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.input:hover,
#trackingInput:hover,
#trackingInputModal:hover,
#trackingRetryInput:hover {
    border-color: var(--border-strong);
}

.input::placeholder,
#trackingInput::placeholder,
#trackingInputModal::placeholder,
#trackingRetryInput::placeholder {
    color: var(--text-muted);
}

.input:focus,
#trackingInput:focus,
#trackingInputModal:focus,
#trackingRetryInput:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: var(--focus-ring);
}

.input.invalid,
.input-error,
.input-helper {
    color: var(--secondary);
}

.input.invalid {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(171, 35, 40, 0.12);
}

.input-error,
.input-helper {
    font-size: 12px;
}

.input-error {
    margin-top: 4px;
}

.input-helper {
    margin-top: 6px;
}


/* =========================
   7. COMPONENTS: BUTTONS
========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), color var(--transition), filter var(--transition), box-shadow var(--transition);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--secondary);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-main);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
}

.btn-sm {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.btn-md {
    height: 44px;
    padding: 0 18px;
    font-size: 14px;
}

.btn-lg {
    height: 52px;
    padding: 0 22px;
    font-size: 16px;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.9;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#trackingBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================
   8. COMPONENTS: HERO
========================= */
.hero-mobile {
    background-color: var(--bg-hero);
}

.hero-overlay {
    background: linear-gradient(
        90deg,
        var(--bg-hero) 0%,
        var(--bg-hero) 40%,
        rgba(247, 247, 246, 0.5) 65%,
        transparent 85%
    );
}

/* =========================
   WATERMARK ADN
========================= */

.watermark {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;

    z-index: 0;

    overflow: hidden;
}

.watermark img {

    width: 700px;
    max-width: 75%;

    opacity: 0.035;

    object-fit: contain;

    user-select: none;
}

/* contenido encima */
.section-shell {
    position: relative;
    z-index: 1;
}


/* =========================
   9. COMPONENTS: SHIPPING TYPE
========================= */
.tipo-btn {
    padding: 12px;
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.tipo-btn:hover {
    color: var(--text-main);
    border-color: var(--primary);
}

.tipo-btn.active {
    color: var(--text-main);
    background: rgba(198, 146, 20, 0.1);
    border-color: var(--primary);
}


/* =========================
   10. COMPONENTS: RESULTS
========================= */
.result-card {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.result-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.result-row:last-child {
    border-bottom: 0;
}

.result-muted {
    color: var(--text-soft);
}

.result-price {
    color: var(--primary);
    font-size: 32px;
    font-weight: 800;
}

.result-logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.result-logo-badge img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.error-card {
    padding: 16px;
    color: var(--text-main);
    background: rgba(171, 35, 40, 0.08);
    border: 1px solid rgba(171, 35, 40, 0.3);
    border-radius: var(--radius-md);
}


/* =========================
   11. COMPONENTS: LOGOS
========================= */
.logo-pro {
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-slow);
}

.logos-carousel {
    position: relative;
    width: 100%;
    margin-top: 4.2rem;
    overflow: hidden;
}

.logos-track {
    display: flex;
    align-items: center;
    gap: 5rem;
    width: max-content;
    animation: scrollLogos 28s linear infinite;
    will-change: transform;
}

.logo-item {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}

.logo-strip {
    width: auto;
    height: 42px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.65;
    transition: all var(--transition-slow);
}

.logo-strip:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.04);
}

@keyframes scrollLogos {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* =========================
    TRACKING 
    ========================= */
/* Desktop */
.desktop-tracking {
    display: none;
}

/* =========================
   12. MOBILE GLOBAL
   Único breakpoint responsive del archivo.
========================= */
@media (max-width: 768px) {
    :root {
        --shell-padding: 20px;
        --section-y: 3rem;
    }

    section[id] {
        scroll-margin-top: 90px;
    }

    .section-header {
        margin-bottom: 1.75rem;
    }

    .heading-hero {
        font-size: 2.2rem;
        line-height: 1.1;
        text-align: center;
    }

    .heading-section {
        font-size: 2rem;
        line-height: 1.15;
    }

    #integraciones {
        padding-top: 5rem;
        padding-bottom: 5rem;
        overflow: hidden;
    }

    #integraciones .heading-section {
        font-size: 2rem;
        line-height: 1.15;
        padding: 0 10px;
    }

    .logos-carousel {
        overflow: hidden;
        width: 100%;
        margin-top: 3rem;
    }

    .logos-track {
        gap: 3.5rem;
        width: max-content;
    }

    .logo-item {
        min-width: 160px;
    }

    .logo-strip {
        height: 46px;
        width: auto;
    }

    .text-slate-600 {
        max-width: 90%;
        margin: 1rem auto;
        text-align: center;
    }

    .card {
        padding: 1.25rem;
        margin-inline: 4px;
    }

    .flex-col {
        gap: 16px;
    }

    .btn,
    #trackingBtn {
        width: 100%;
        min-height: 52px;
    }

    .input,
    #trackingInput,
    #trackingInputModal,
    #trackingRetryInput {
        height: 56px;
        font-size: 16px;
        background-color: #fff;
        border-color: #e2e8f0;
    }

    #trackingInput {
        flex: none;
    }

    
    .mobile-tracking {
        display: flex;
    }


    .hero-mobile {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 2rem;
        background-color: var(--bg-hero);
    }

    .hero-mobile .absolute.inset-0,
    .absolute.inset-0 {
        position: relative;
        order: 2;
        height: 40vh;
        margin-top: auto;
    }

    .hero-mobile .relative.z-10,
    .relative.z-10 {
        order: 1;
        padding-bottom: 2rem;
    }

    .hero-overlay {
        background: linear-gradient(
            180deg,
            var(--bg-hero) 0%,
            rgba(247, 247, 246, 0) 20%
        );
    }

    .logo-pro {
        width: auto;
        height: 340px;
        max-width: 340px;
    }
}

/* Desktop behavior */
@media (min-width: 768px) {

    .desktop-tracking {
        display: inline-flex;
    }

    .mobile-tracking {
        display: none;
    }

}

@media (min-width: 650px) and (max-width: 770px) {
    header .btn-primary {
        width: auto;
        min-width: 96px;
        height: 48px;
        padding-inline: 18px;
        white-space: nowrap;
        font-size: 14px;
    }

    header .btn-primary span:first-child {
        display: none;
    }

    header .btn-primary span:last-child {
        display: inline;
    }
}