:root {
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --text-main: #002052;
    --text-muted: #2B2F36;
    --accent: #002052;
    --accent-soft: rgba(0, 32, 82, 0.10);
    --border: rgba(0, 32, 82, 0.14);
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(92%, var(--max-width));
    margin: 0 auto;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.brand-logo {
    display: block;
    width: 174px;
    max-width: 100%;
    height: auto;
    filter: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-main);
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    transition: width 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-toggle:hover span,
.mobile-menu-toggle.is-active span {
    background: var(--accent);
}

.mobile-menu-toggle.is-active span:nth-child(1),
.mobile-menu-toggle.is-active span:nth-child(3) {
    width: 18px;
}

.mobile-nav-cta {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(11, 92, 255, 0.25);
}

.btn-secondary {
    border-color: var(--border);
    color: var(--accent);
    background: #ffffff;
}

.btn-secondary:hover {
    background: #F3F5F8;
}

.hero {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    padding: 80px 0;
    background:
        radial-gradient(circle at top right, rgba(0, 32, 82, 0.12), transparent 36%),
        linear-gradient(135deg, #ffffff 0%, #F3F5F8 55%, #ffffff 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 52px;
    align-items: center;
}

.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 5.7rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
    margin-bottom: 24px;
}

.hero p {
    color: var(--text-muted);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    max-width: 650px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-card {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff, #F3F5F8);
    border-radius: 30px;
    padding: 28px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 30px 80px rgba(0, 32, 82, 0.12);
}

.mockup-box {
    min-height: 250px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(11, 92, 255, 0.22), rgba(255, 255, 255, 0.05)),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 22px;
}

.hero-card h2 {
    font-size: 1.6rem;
    margin-top: 24px;
    margin-bottom: 10px;
}

.hero-card p {
    color: var(--text-muted);
    margin: 0;
}

section {
    padding: 86px 0;
}

.section-title {
    max-width: 760px;
    margin-bottom: 34px;
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.04em;
    margin-bottom: 12px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 26px;
    min-height: 190px;
}

.service-card span {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
    margin-bottom: 18px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.96rem;
}

.process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.step {
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    background: #ffffff;
}

.step strong {
    color: var(--accent);
    display: block;
    margin-bottom: 10px;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.cta {
    background:
        radial-gradient(circle at center, rgba(201, 166, 70, 0.16), transparent 38%),
        #002052;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.cta h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.05em;
    margin-bottom: 16px;
}

.cta p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 28px;
}

.site-footer {
    padding: 34px 0;
    background: #ffffff;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: start;
    gap: 24px 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.site-footer__brand,
.site-footer__meta,
.site-footer__contact {
    min-width: 0;
}

.site-footer__brand p,
.site-footer__meta p {
    overflow-wrap: break-word;
}

.site-footer__meta {
    text-align: right;
}

.site-footer__contact {
    display: flex;
    justify-content: flex-end;
}

.site-footer__whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    padding: 12px 18px;
    border: 1px solid rgba(7, 18, 8, 0.16);
    border-radius: 999px;
    background: #25d366;
    color: #071208;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.22);
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.site-footer__whatsapp:hover {
    background: #20bd5a;
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.28);
}

.site-footer__whatsapp:focus-visible {
    outline: 3px solid rgba(0, 32, 82, 0.35);
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .site-footer__content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__contact {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .site-footer__content {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .site-footer__meta {
        text-align: left;
    }

    .site-footer__contact {
        grid-column: auto;
        width: 100%;
    }

    .site-footer__whatsapp {
        width: 100%;
    }
}



/* Home confianza */
.trust-list {
    display: grid;
    gap: 12px;
    width: 100%;
}

.trust-list span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-main);
    font-weight: 800;
    font-size: 0.94rem;
}

.section-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.quote-form,
.sg-product-form {
    border: 1px solid var(--border);
    background: #ffffff;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 30px 80px rgba(0, 32, 82, 0.12);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-main);
    font-weight: 800;
    font-size: 0.94rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    color: var(--text-main);
    padding: 15px 16px;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(183, 183, 183, 0.68);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-note {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 20px 0 16px;
}

.form-message {
    min-height: 24px;
    margin-bottom: 18px;
    font-weight: 800;
}

.form-message.is-error {
    color: #ff7a7a;
}

.form-message.is-success {
    color: #25d366;
}

@media (max-width: 900px) {
    .hero-grid,
    .services,
    .process {
        grid-template-columns: 1fr;
    }

    .nav {
        position: relative;
        gap: 16px;
    }

    .brand-logo {
        width: 150px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        order: 3;
    }

    .nav-cta {
        display: none;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 24px 60px rgba(0, 32, 82, 0.18);
        backdrop-filter: blur(14px);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 14px 16px;
        border-radius: 14px;
        color: var(--text-main);
    }

    .nav-links a:hover {
        background: #F3F5F8;
    }

    .mobile-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    background: var(--accent);
    color: #ffffff !important;
    font-weight: 800;
    border-radius: 14px;
    text-align: center;
}

    .hero {
        padding: 60px 0;
    }

    .hero-card {
        min-height: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .quote-form,
.sg-product-form {
    padding: 22px;
    }

}

/* SION Grafix public palette controlled override */
body {
    background: #ffffff;
    color: #2B2F36;
}

header {
    background: rgba(255, 255, 255, 0.94);
}

.hero h1,
.section-title h2,
.service-card h3,
.hero-card h2 {
    color: #002052;
}

.hero p,
.section-title p,
.service-card p,
.step p,
.hero-card p,
.cta p {
    color: rgba(43, 47, 54, 0.78);
}

.service-card,
.step,
.hero-card,
.quote-form,
.sg-product-form {
    box-shadow: 0 24px 60px rgba(0, 32, 82, 0.08);
}

.cta h2 {
    color: #ffffff;
}

.cta p {
    color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 900px) {
    .nav-links {
        background: rgba(255, 255, 255, 0.98);
    }

    .nav-links a {
        color: #002052;
    }
}

/* Business Cards - campos y seguridad */
.sg-field-label {
    color: var(--text-main);
    font-weight: 800;
    font-size: 0.94rem;
}

.sg-honeypot {
    position: fixed !important;
    top: -100vh !important;
    left: -100vw !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    user-select: none !important;
}

/* Navegación Productos - Blueprint Visual/UX */
.nav-products {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: inherit;
}

.nav-products-trigger {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font: inherit;
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: color 0.2s ease;
}

.nav-products-trigger::-webkit-details-marker {
    display: none;
}


.nav-products[open] .nav-products-trigger,
.nav-products-trigger:hover,
.nav-products-trigger:focus-visible {
    color: var(--text-main);
}


.nav-products-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 60;
    width: min(300px, 84vw);
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 70px rgba(0, 32, 82, 0.18);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
}

@media (min-width: 901px) {
    .nav-products:not([open]) .nav-products-panel {
        display: none;
    }

    .nav-products:hover .nav-products-panel,
    .nav-products:focus-within .nav-products-panel {
        display: block;
    }
}



.nav-products-panel a,
.nav-products-soon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.2;
}

.nav-products-panel a:hover,
.nav-products-panel a:focus-visible {
    background: var(--accent-soft);
    color: var(--accent);
    outline: none;
}

.nav-products-soon {
    color: rgba(43, 47, 54, 0.54);
    cursor: not-allowed;
}

.nav-products-soon small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #F3F5F8;
    color: rgba(43, 47, 54, 0.62);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .nav-products {
        display: block;
        width: 100%;
    }

    .nav-products-trigger {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
        border-radius: 14px;
        color: var(--text-main);
    }

    .nav-products-trigger:hover,
    .nav-products-trigger:focus-visible,
    .nav-products[open] .nav-products-trigger {
        background: #F3F5F8;
    }

    .nav-products-panel {
        position: static;
        width: 100%;
        margin: 2px 0 8px;
        padding: 8px;
        border-radius: 18px;
        background: #F8FAFC;
        box-shadow: none;
        transform: none;
        backdrop-filter: none;
    }

    .nav-products-panel::before {
        display: none;
    }

    .nav-products-panel a,
    .nav-products-soon {
        min-height: 44px;
        padding: 11px 12px;
        border-radius: 12px;
        font-size: 0.94rem;
    }

    .nav-products-soon small {
        font-size: 0.62rem;
    }
}

/* Menú de cuenta — padre navegable + panel */
.nav-account {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-account:hover .nav-account-trigger,
.nav-account:focus-within .nav-account-trigger {
    color: var(--text-main);
}

.nav-account-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    min-width: 176px;
    max-width: 84vw;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 70px rgba(0, 32, 82, 0.18);
    backdrop-filter: blur(16px);
}

.nav-account-panel a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.2;
}

.nav-account-panel a:hover,
.nav-account-panel a:focus-visible {
    background: var(--accent-soft);
    color: var(--accent);
    outline: none;
}

@media (min-width: 901px) {
    .nav-account .nav-account-panel {
        display: none;
    }
    .nav-account:hover .nav-account-panel,
    .nav-account:focus-within .nav-account-panel {
        display: block;
    }
    .nav-account-mobile {
        display: none;
    }
}

@media (max-width: 900px) {
    .nav-account {
        display: none;
    }
    .nav-account-mobile {
        display: block;
        width: 100%;
    }
    .nav-account-mobile[open] .nav-products-trigger {
        background: #F3F5F8;
    }
}

/* Business Cards - SaaS Enterprise Product Layout */
.sg-product-order-shell {
    padding: 74px 0 92px;
    background:
        radial-gradient(circle at 12% 8%, rgba(0, 32, 82, 0.10), transparent 26%),
        linear-gradient(180deg, #F8FAFC 0%, #ffffff 42%, #F8FAFC 100%);
}

.sg-product-order-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.72fr);
    gap: 34px;
    align-items: start;
}

.sg-product-showcase {
    position: sticky;
    top: 104px;
    min-height: 620px;
    padding: 34px;
    border: 1px solid rgba(0, 32, 82, 0.12);
    border-radius: 34px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(243, 245, 248, 0.88)),
        radial-gradient(circle at top right, rgba(0, 32, 82, 0.12), transparent 38%);
    box-shadow: 0 30px 90px rgba(0, 32, 82, 0.10);
    overflow: hidden;
}

.sg-product-showcase::before {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: rgba(0, 32, 82, 0.08);
    pointer-events: none;
}

.sg-product-showcase .eyebrow {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.sg-product-showcase h1 {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin-bottom: 18px;
    color: var(--text-main);
    font-size: clamp(2rem, 3.2vw, 3.25rem);
    line-height: 1.04;
    letter-spacing: -0.052em;
}

.sg-product-showcase p {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin-bottom: 28px;
    color: rgba(43, 47, 54, 0.78);
    font-size: clamp(1.02rem, 1.4vw, 1.18rem);
}

.sg-bc-mockup {
    position: relative;
    z-index: 1;
    min-height: 315px;
    margin: 26px 0 26px;
    border: 1px solid rgba(0, 32, 82, 0.11);
    border-radius: 30px;
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.82), transparent 30%),
        linear-gradient(145deg, #EAF0FA 0%, #ffffff 46%, #DDE8F8 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 26px 65px rgba(0, 32, 82, 0.13);
    overflow: hidden;
}

.sg-bc-mockup::before {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 24px;
    border: 1px dashed rgba(0, 32, 82, 0.15);
    pointer-events: none;
}

.sg-bc-card {
    position: absolute;
    width: min(72%, 420px);
    aspect-ratio: 1.75 / 1;
    border-radius: 22px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(0, 32, 82, 0.13);
    box-shadow: 0 28px 60px rgba(0, 32, 82, 0.20);
}

.sg-bc-card span,
.sg-bc-card strong,
.sg-bc-card small {
    position: relative;
    z-index: 1;
}

.sg-bc-card span {
    color: rgba(0, 32, 82, 0.70);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sg-bc-card strong {
    color: #002052;
    font-size: clamp(1.55rem, 2.8vw, 2.45rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.sg-bc-card small {
    color: rgba(43, 47, 54, 0.70);
    font-weight: 800;
}

.sg-bc-card-front {
    right: 8%;
    bottom: 36px;
    z-index: 2;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 252, 0.96)),
        linear-gradient(90deg, rgba(0, 32, 82, 0.08), transparent);
    transform: rotate(-2.5deg);
}

.sg-bc-card-front::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 24px;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background:
        linear-gradient(45deg, #002052 0 34%, transparent 34% 46%, #002052 46% 64%, transparent 64%),
        rgba(0, 32, 82, 0.07);
    opacity: 0.92;
}

.sg-bc-card-back {
    left: 9%;
    top: 34px;
    z-index: 1;
    background:
        linear-gradient(135deg, #002052, #0B2F6E),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 44%);
    transform: rotate(4deg);
}

.sg-bc-card-back span,
.sg-bc-card-back small {
    color: rgba(255, 255, 255, 0.88);
}

.sg-bc-card-back::after {
    content: "";
    position: absolute;
    right: 28px;
    bottom: 28px;
    width: 74px;
    height: 74px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.10);
}

.sg-product-spec-list {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sg-product-spec-list div {
    min-height: 86px;
    padding: 16px;
    border: 1px solid rgba(0, 32, 82, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 36px rgba(0, 32, 82, 0.06);
}

.sg-product-spec-list strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sg-product-spec-list span {
    display: block;
    color: rgba(43, 47, 54, 0.78);
    font-weight: 800;
    line-height: 1.35;
}

.sg-price-order-card {
    padding: 0;
    overflow: hidden;
}

.sg-price-calculator {
    padding: 26px;
}

.sg-price-calculator {
    border-bottom: 1px solid rgba(0, 32, 82, 0.12);
    background:
        radial-gradient(circle at top right, rgba(0, 32, 82, 0.08), transparent 36%),
        linear-gradient(180deg, #ffffff 0%, #F8FAFC 100%);
}

.sg-calculator-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.sg-calculator-heading span {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sg-calculator-heading strong {
    color: var(--text-main);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.sg-price-calculator .form-group {
    margin-bottom: 16px;
}

.sg-price-calculator .form-group:last-of-type {
    margin-bottom: 0;
}

.sg-price-order-card select,
.sg-price-order-card input,
.sg-price-order-card textarea {
    border-radius: 16px;
}

.sg-price-order-card select {
    min-height: 54px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--accent) 50%),
        linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position:
        calc(100% - 22px) 50%,
        calc(100% - 16px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 46px;
    font-weight: 800;
}

.sg-calculator-total {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 12px;
    margin-top: 22px;
}

.sg-calculator-total div {
    min-height: 96px;
    padding: 18px;
    border: 1px solid rgba(0, 32, 82, 0.12);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(0, 32, 82, 0.08);
}

.sg-calculator-total span {
    display: block;
    margin-bottom: 6px;
    color: rgba(43, 47, 54, 0.70);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sg-calculator-total strong {
    display: block;
    color: var(--accent);
    font-size: clamp(1.85rem, 3vw, 2.75rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.sg-calculator-total div:nth-child(2) strong {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.sg-price-order-card .form-note {
    margin: 0 26px 18px;
}

.sg-price-order-card > .hero-actions {
    padding: 0 26px 28px;
}

.sg-price-order-card .btn-primary {
    min-height: 56px;
    padding: 15px 24px;
    font-size: 1rem;
}

@media (max-width: 1100px) {
    .sg-product-order-grid {
        grid-template-columns: 1fr;
    }

    .sg-product-showcase {
        position: relative;
        top: auto;
        min-height: auto;
    }
}

@media (max-width: 900px) {
    .sg-product-order-shell {
        padding: 42px 0 70px;
    }

    .sg-product-order-grid {
        gap: 22px;
    }

    .sg-product-showcase {
        padding: 24px;
        border-radius: 28px;
    }

    .sg-product-showcase h1 {
        font-size: clamp(1.9rem, 8vw, 2.65rem);
        line-height: 1.05;
        letter-spacing: -0.05em;
    }

    .sg-bc-mockup {
        min-height: 260px;
        margin: 22px 0;
    }

    .sg-bc-card {
        width: 74%;
        border-radius: 18px;
        padding: 22px;
    }

    .sg-bc-card-front {
        right: 6%;
        bottom: 34px;
    }

    .sg-bc-card-back {
        left: 6%;
        top: 36px;
    }

    .sg-product-spec-list,
    .sg-calculator-total {
        grid-template-columns: 1fr;
    }

    .sg-price-calculator {
        padding: 22px;
    }

    .sg-price-order-card .form-note {
        margin: 0 22px 16px;
    }

    .sg-price-order-card > .hero-actions {
        padding: 0 22px 24px;
    }
}

@media (max-width: 520px) {
    .sg-product-showcase {
        padding: 20px;
        border-radius: 24px;
    }

    .sg-bc-mockup {
        min-height: 230px;
        border-radius: 24px;
    }

    .sg-bc-card {
        width: 82%;
        padding: 18px;
    }

    .sg-bc-card strong {
        font-size: 1.55rem;
    }

    .sg-bc-card-front::after {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .sg-product-spec-list div,
    .sg-calculator-total div {
        min-height: auto;
    }

    .sg-price-order-card .btn-primary {
        width: 100%;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   Upload post-pago — sg-upload-*
   Clases aisladas. No modificar clases globales existentes.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Shell: contenedor raíz de la página */
.sg-upload-shell {
    padding: 64px 0 96px;
    background:
        radial-gradient(circle at 8% 12%, rgba(0, 32, 82, 0.06), transparent 32%),
        linear-gradient(180deg, #F8FAFC 0%, #ffffff 48%);
    min-height: calc(100vh - 76px);
}

/* Wrap: columna estrecha centrada para formulario de tarea */
.sg-upload-wrap {
    max-width: 580px;
}

/* ─── Badge de orden ─────────────────────────────────────────────────────────── */

.sg-upload-order-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    margin-bottom: 36px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(0, 32, 82, 0.08);
}

.sg-upload-order-badge__icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.sg-upload-order-badge__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sg-upload-order-badge__label {
    font-size: 0.70rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(43, 47, 54, 0.54);
}

.sg-upload-order-badge__number {
    display: block;
    font-size: 1rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.025em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-upload-order-badge__detail {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
}

.sg-upload-order-badge__paid {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(37, 211, 102, 0.10);
    color: #1a8e45;
    font-size: 0.70rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ─── Encabezado de sección ──────────────────────────────────────────────────── */

.sg-upload-title {
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    letter-spacing: -0.04em;
    line-height: 1.04;
    color: var(--text-main);
    margin-bottom: 10px;
}

.sg-upload-subtitle {
    color: rgba(43, 47, 54, 0.68);
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 30px;
}

/* ─── Alertas ────────────────────────────────────────────────────────────────── */

.sg-upload-alert {
    padding: 16px 20px;
    border-radius: 18px;
    border-left: 3px solid transparent;
    margin-bottom: 24px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.5;
}

.sg-upload-alert p {
    margin: 0;
}

.sg-upload-alert--success {
    background: rgba(37, 211, 102, 0.08);
    border-left-color: #25d366;
    color: #176636;
}

.sg-upload-alert--error {
    background: rgba(220, 53, 69, 0.07);
    border-left-color: #dc3545;
    color: #9b1c28;
}

/* ─── Formulario ─────────────────────────────────────────────────────────────── */

/* Arrow custom del select, alineado al sistema del sitio */
.sg-upload-form select {
    min-height: 52px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--accent) 50%),
        linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position:
        calc(100% - 22px) 50%,
        calc(100% - 16px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 46px;
    font-weight: 800;
    cursor: pointer;
}

/* File input: área de depósito con borde dashed */
.sg-upload-file-group input[type="file"] {
    padding: 20px 16px;
    border-style: dashed;
    border-width: 2px;
    background: rgba(0, 32, 82, 0.025);
    cursor: pointer;
    font-size: 0.94rem;
    color: var(--text-muted);
}

.sg-upload-file-group input[type="file"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    background: #ffffff;
}

/* Botón submit: ancho completo */
.sg-upload-submit {
    width: 100%;
    min-height: 54px;
    font-size: 1rem;
    justify-content: center;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .sg-upload-shell {
        padding: 40px 0 72px;
    }

    .sg-upload-order-badge {
        padding: 14px 16px;
        gap: 12px;
    }

    .sg-upload-order-badge__icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .sg-upload-order-badge__paid {
        display: none;
    }

    .sg-upload-title {
        font-size: 1.85rem;
    }

    .sg-upload-submit {
        min-height: 50px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   Confirmación post-pago — sg-confirmation-*
   Clases aisladas. No modificar clases globales existentes.
   ═══════════════════════════════════════════════════════════════════════════════ */

.sg-confirmation-section {
    padding: 4rem 0;
}

.sg-confirmation-card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
    text-align: center;
}

.sg-confirmation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #d1fae5;
    color: #065f46;
    font-size: 2rem;
    line-height: 1;
    margin: 0 auto 1.25rem;
}

.sg-confirmation-card h1 {
    font-size: 1.6rem;
    margin-bottom: .5rem;
}

.sg-confirmation-subtitle {
    color: #6b7280;
    margin-bottom: 2rem;
}

.sg-confirmation-order-summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

.sg-confirmation-order-summary h2 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    margin-bottom: .75rem;
}

.sg-confirmation-order-summary dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem .75rem;
    margin: 0;
}

.sg-confirmation-order-summary dt {
    font-size: .875rem;
    color: #6b7280;
}

.sg-confirmation-order-summary dd {
    font-size: .875rem;
    font-weight: 600;
    margin: 0;
    text-align: right;
}

.sg-confirmation-next-steps {
    text-align: left;
    margin-bottom: 2rem;
}

.sg-confirmation-next-steps h2 {
    font-size: 1rem;
    margin-bottom: .75rem;
}

.sg-confirmation-next-steps ol {
    padding-left: 1.25rem;
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
}

.sg-confirmation-next-steps ol li {
    margin-bottom: .35rem;
}

@media (max-width: 640px) {
    .sg-confirmation-section {
        padding: 2rem 0;
    }

    .sg-confirmation-card {
        padding: 1.75rem 1.25rem;
    }

    .sg-confirmation-order-summary dl {
        grid-template-columns: 1fr;
    }

    .sg-confirmation-order-summary dd {
        text-align: left;
        margin-bottom: .25rem;
        font-size: .8rem;
    }
}

/* ============================================================================
   Módulo: mis-pedidos — sg-orders-*
   Listado SaaS responsive por orden e ítem. Estructura única para todos los
   tamaños de pantalla, sin tabla ni desplazamiento horizontal.
   ============================================================================ */

.sg-orders-shell {
    padding: 64px 0 96px;
    background: linear-gradient(180deg, #F8FAFC 0%, #ffffff 50%, #F8FAFC 100%);
}

.sg-orders-heading {
    margin-bottom: 1.75rem;
}

.sg-orders-heading h1 {
    color: var(--text-main);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.sg-orders-empty {
    padding: 3rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 32, 82, 0.07);
}

.sg-orders-empty p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.sg-orders-empty__actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.sg-orders-list {
    display: grid;
    gap: 1.5rem;
}

.sg-orders-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: 0 18px 48px rgba(0, 32, 82, 0.08);
}

.sg-orders-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(0, 32, 82, 0.07), rgba(255, 255, 255, 0.92));
    border-radius: 24px 24px 0 0;
}

.sg-orders-card__identity {
    min-width: 0;
}

.sg-orders-card__label,
.sg-orders-card__summary-item span,
.sg-orders-product__folio span,
.sg-orders-product__quantity span,
.sg-orders-product__meta-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sg-orders-card__identity h2 {
    color: var(--text-main);
    font-size: clamp(1.2rem, 2.4vw, 1.65rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

.sg-orders-card__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 1rem;
    flex-shrink: 0;
}

.sg-orders-card__summary-item {
    min-width: 0;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.sg-orders-card__summary-item strong {
    display: block;
    color: var(--text-main);
    font-size: 0.98rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.sg-orders-card__items {
    display: grid;
}

.sg-orders-product {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(120px, 0.45fr) minmax(190px, 0.65fr) minmax(190px, 0.7fr);
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
}

.sg-orders-product:last-child {
    border-bottom: 0;
}

.sg-orders-product__main,
.sg-orders-product__identity,
.sg-orders-product__quantity,
.sg-orders-product__status,
.sg-orders-product__actions {
    min-width: 0;
}

.sg-orders-product__identity {
    display: flex;
    flex-direction: column;
}

.sg-orders-product__title {
    order: 1;
    margin: 0;
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sg-orders-product__folio {
    order: 2;
    margin-top: 0.8rem;
}

.sg-orders-product__folio strong {
    display: block;
    color: var(--text-main);
    font-size: 0.94rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.sg-orders-product-variant {
    order: 3;
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sg-orders-product__quantity strong {
    display: block;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.sg-orders-product__status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sg-orders-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.sg-orders-product__status .sg-orders-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    max-width: 100%;
    line-height: 1.2;
    white-space: normal;
}

.sg-orders-badge--pending,
.sg-orders-badge--paid { background: #DCFCE7; color: #166534; }
.sg-orders-badge--designing { background: #DBEAFE; color: #1D4ED8; }
.sg-orders-badge--proof-sent,
.sg-orders-badge--review { background: #FEF3C7; color: #92400E; }
.sg-orders-badge--proof-approved,
.sg-orders-badge--approved { background: #CCFBF1; color: #0F766E; }
.sg-orders-badge--in-production { background: #EDE9FE; color: #6D28D9; }
.sg-orders-badge--ready { background: #D1FAE5; color: #047857; }
.sg-orders-badge--shipped { background: #E0E7FF; color: #4338CA; }
.sg-orders-badge--cancelled { background: #FEE2E2; color: #B91C1C; }
.sg-orders-badge--partial { background: #FFEDD5; color: #C2410C; }
.sg-orders-badge--no-items,
.sg-orders-badge--unknown { background: #F3F4F6; color: #4B5563; }

.sg-orders-step {
    display: block;
    margin-top: 0.55rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sg-orders-progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    max-width: 180px;
    margin-top: 0.55rem;
}

.sg-orders-progress__segment {
    height: 6px;
    border-radius: 999px;
    background: #E5E7EB;
}

.sg-orders-progress__segment.is-complete {
    background: var(--accent);
}

.sg-orders-product__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.sg-orders-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.sg-orders-product__actions .sg-orders-btn {
    min-height: 42px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

.sg-orders-btn--primary {
    background: var(--accent);
    color: #ffffff;
}

.sg-orders-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(11, 92, 255, 0.22);
}

.sg-orders-btn--secondary {
    border-color: var(--border);
    color: var(--accent);
    background: #ffffff;
}

.sg-orders-btn--secondary:hover {
    background: #F3F5F8;
}

.sg-orders-shell .sg-orders-btn:focus-visible,
.sg-orders-folio-track:focus-visible,
.sg-orders-order-detail:focus-visible {
    outline: 3px solid rgba(11, 92, 255, 0.35);
    outline-offset: 3px;
}

.sg-orders-folio-track {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sg-orders-folio-track:hover,
.sg-orders-folio-track:focus-visible {
    text-decoration: none;
}

.sg-orders-unavailable {
    margin: 0;
    padding: 1.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.sg-orders-card__footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--border);
    background: #F8FAFC;
    border-radius: 0 0 24px 24px;
}

.sg-orders-order-detail {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sg-orders-order-detail:hover,
.sg-orders-order-detail:focus-visible {
    text-decoration: none;
}

@media (max-width: 1023px) {
    .sg-orders-card__header {
        align-items: flex-start;
    }

    .sg-orders-product {
        grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
        align-items: start;
    }

    .sg-orders-product__main {
        grid-column: 1 / -1;
    }

    .sg-orders-product__actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 220px) minmax(0, 180px);
        align-items: center;
        justify-content: end;
    }
}

@media (max-width: 640px) {
    .sg-orders-shell {
        padding: 40px 0 112px;
    }

    .sg-orders-heading {
        margin-bottom: 1.25rem;
    }

    .sg-orders-empty {
        padding: 2rem 1.25rem;
        border-radius: 18px;
    }

    .sg-orders-list {
        gap: 1.25rem;
    }

    .sg-orders-card {
        border-radius: 18px;
    }

    .sg-orders-card__header {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.25rem;
        border-radius: 18px 18px 0 0;
    }

    .sg-orders-card__summary {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .sg-orders-card__summary-item {
        padding: 0.85rem;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.84);
    }

    .sg-orders-product {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .sg-orders-product__main,
    .sg-orders-product__actions {
        grid-column: auto;
    }

    .sg-orders-product__title {
        order: 1;
    }

    .sg-orders-product-variant {
        order: 2;
        margin-top: 0.4rem;
    }

    .sg-orders-product__folio {
        order: 3;
        margin-top: 0.9rem;
    }

    .sg-orders-product__actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .sg-orders-product__actions .sg-orders-btn,
    .sg-orders-product__actions .sg-orders-folio-track {
        width: 100%;
        min-height: 44px;
    }

    .sg-orders-card__footer {
        justify-content: stretch;
        padding: 1rem 1.25rem 1.25rem;
        border-radius: 0 0 18px 18px;
    }

    .sg-orders-order-detail {
        justify-content: center;
        width: 100%;
        min-height: 44px;
        text-align: center;
    }

    .sg-orders-unavailable {
        padding: 1.5rem 1.25rem;
    }
}

/* ============================================================================
   Módulo: mi-cuenta — sg-account-*
   Dashboard operativo SaaS responsive del cliente autenticado.
   ============================================================================ */

.sg-account-shell {
    min-width: 0;
    min-height: calc(100vh - 76px);
    padding: 64px 0 96px;
    background:
        radial-gradient(circle at 8% 8%, rgba(0, 32, 82, 0.10), transparent 30%),
        linear-gradient(180deg, #F8FAFC 0%, #ffffff 46%, #F8FAFC 100%);
}

.sg-account-shell *,
.sg-account-shell *::before,
.sg-account-shell *::after {
    box-sizing: border-box;
}

.sg-account-container {
    width: min(92%, 1120px);
    min-width: 0;
}

.sg-account-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    min-width: 0;
    margin-bottom: 22px;
    padding: 30px;
    border: 1px solid rgba(0, 32, 82, 0.14);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(0, 32, 82, 0.14), transparent 38%),
        linear-gradient(145deg, #ffffff 0%, #F3F6FA 100%);
    box-shadow: 0 22px 58px rgba(0, 32, 82, 0.09);
}

.sg-account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 22px;
    background: var(--accent);
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 34px rgba(0, 32, 82, 0.20);
}

.sg-account-hero__content,
.sg-account-section,
.sg-account-priority,
.sg-account-recent-item,
.sg-account-recent-item__identity,
.sg-account-access {
    min-width: 0;
}

.sg-account-eyebrow {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sg-account-hero h1 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.sg-account-email,
.sg-account-since {
    margin: 7px 0 0;
    color: var(--text-muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sg-account-since {
    font-size: 0.88rem;
    font-weight: 750;
}

.sg-account-edit,
.sg-account-priority__cta,
.sg-account-recent-item__cta,
.sg-account-signout__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.sg-account-edit {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.sg-account-edit:hover,
.sg-account-priority__cta:hover,
.sg-account-recent-item__cta:hover {
    background: #0B2F6E;
    color: #ffffff;
    transform: translateY(-1px);
}

.sg-account-edit:focus-visible,
.sg-account-profile-alert:focus-visible,
.sg-account-priority__cta:focus-visible,
.sg-account-recent-item__cta:focus-visible,
.sg-account-section__heading > a:focus-visible,
.sg-account-access:focus-visible,
.sg-account-signout__button:focus-visible {
    outline: 3px solid rgba(11, 92, 255, 0.38);
    outline-offset: 3px;
}

.sg-account-profile-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-width: 0;
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid rgba(180, 113, 0, 0.26);
    border-radius: 20px;
    background: #FFF9EC;
    color: #6D4600;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(88, 57, 0, 0.07);
}

.sg-account-profile-alert__icon,
.sg-account-profile-alert__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sg-account-profile-alert__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(180, 113, 0, 0.12);
    font-weight: 900;
}

.sg-account-profile-alert strong,
.sg-account-profile-alert span {
    overflow-wrap: anywhere;
}

.sg-account-profile-alert strong {
    display: block;
    margin-bottom: 2px;
    font-size: 1rem;
}

.sg-account-profile-alert span span {
    display: block;
    color: rgba(109, 70, 0, 0.78);
    font-size: 0.92rem;
}

.sg-account-profile-alert__arrow {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(180, 113, 0, 0.12);
    font-weight: 900;
}

.sg-account-profile-alert:hover {
    border-color: rgba(180, 113, 0, 0.52);
    box-shadow: 0 15px 34px rgba(88, 57, 0, 0.10);
}

.sg-account-unavailable,
.sg-account-empty {
    margin-bottom: 22px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    color: var(--text-muted);
    font-weight: 750;
    box-shadow: 0 12px 32px rgba(0, 32, 82, 0.06);
}

.sg-account-section {
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(0, 32, 82, 0.07);
}

.sg-account-section__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.sg-account-section__heading h2,
.sg-account-priority h2 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(1.35rem, 2.7vw, 1.85rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.sg-account-section__heading > a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.sg-account-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.sg-account-metric {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(0, 32, 82, 0.12);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #F8FAFC 100%);
}

.sg-account-metric span {
    display: block;
    min-height: 42px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
}

.sg-account-metric strong {
    display: block;
    margin-top: 10px;
    color: var(--accent);
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.sg-account-priority {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid rgba(0, 32, 82, 0.20);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 42%),
        var(--accent);
    color: #ffffff;
    box-shadow: 0 18px 44px rgba(0, 32, 82, 0.16);
}

.sg-account-priority .sg-account-eyebrow,
.sg-account-priority h2 {
    color: #ffffff;
}

.sg-account-priority p:not(.sg-account-eyebrow) {
    max-width: 720px;
    margin: 9px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
}

.sg-account-priority__cta {
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: #ffffff;
    color: var(--accent);
}

.sg-account-recent-list {
    display: grid;
    gap: 12px;
}

.sg-account-recent-item {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr) auto;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
}

.sg-account-recent-item__folio {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.sg-account-recent-item h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sg-account-recent-item__identity p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sg-account-recent-item__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.sg-account-recent-item__meta div {
    min-width: 0;
}

.sg-account-recent-item__meta dt {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sg-account-recent-item__meta dd {
    margin: 0;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.sg-account-recent-item__cta {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.sg-account-empty {
    margin: 0;
    box-shadow: none;
}

.sg-account-access-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.sg-account-access {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 138px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    color: var(--text-main);
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.sg-account-access strong,
.sg-account-access span {
    overflow-wrap: anywhere;
}

.sg-account-access strong {
    font-size: 1rem;
}

.sg-account-access span {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.sg-account-access:hover {
    border-color: var(--accent);
    background: #F8FAFC;
    box-shadow: 0 12px 28px rgba(0, 32, 82, 0.09);
    transform: translateY(-2px);
}

.sg-account-signout {
    display: flex;
    justify-content: flex-end;
}

.sg-account-signout form {
    margin: 0;
}

.sg-account-signout__button {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-main);
}

.sg-account-signout__button:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

@media (max-width: 980px) {
    .sg-account-metrics,
    .sg-account-access-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-account-recent-item {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 0.75fr);
    }

    .sg-account-recent-item__cta {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 700px) {
    .sg-account-shell {
        padding: 40px 0 72px;
    }

    .sg-account-hero {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 22px;
        border-radius: 22px;
    }

    .sg-account-edit {
        grid-column: 1 / -1;
        width: 100%;
    }

    .sg-account-priority,
    .sg-account-recent-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-account-priority__cta,
    .sg-account-recent-item__cta {
        width: 100%;
        justify-self: stretch;
    }

    .sg-account-recent-item__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-account-section__heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .sg-account-container {
        width: min(94%, 1120px);
    }

    .sg-account-hero,
    .sg-account-section,
    .sg-account-priority {
        padding: 20px;
        border-radius: 20px;
    }

    .sg-account-avatar {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        font-size: 1.15rem;
    }

    .sg-account-profile-alert {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .sg-account-profile-alert__arrow {
        display: none;
    }

    .sg-account-metrics,
    .sg-account-access-grid,
    .sg-account-recent-item__meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-account-metric span {
        min-height: auto;
    }

    .sg-account-signout,
    .sg-account-signout form,
    .sg-account-signout__button {
        width: 100%;
    }
}

/* ============================================================================
   Módulo: mi-perfil — sg-profile-*
   Perfil editable y cambio seguro de contraseña.
   ============================================================================ */

.sg-profile-shell {
    min-width: 0;
    min-height: calc(100vh - 76px);
    padding: 64px 0 96px;
    background:
        radial-gradient(circle at 92% 8%, rgba(0, 32, 82, 0.09), transparent 30%),
        linear-gradient(180deg, #F8FAFC 0%, #ffffff 48%, #F8FAFC 100%);
}

.sg-profile-shell *,
.sg-profile-shell *::before,
.sg-profile-shell *::after {
    box-sizing: border-box;
}

.sg-profile-container {
    width: min(92%, 1120px);
    min-width: 0;
}

.sg-profile-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    min-width: 0;
    margin-bottom: 24px;
}

.sg-profile-heading h1 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(2rem, 4.5vw, 3.3rem);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.sg-profile-heading p:not(.sg-profile-eyebrow) {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.sg-profile-eyebrow {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sg-profile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 850;
    text-decoration: none;
}

.sg-profile-back:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.sg-profile-back:focus-visible,
.sg-profile-field input:focus-visible,
.sg-profile-submit:focus-visible {
    outline: 3px solid rgba(11, 92, 255, 0.38);
    outline-offset: 3px;
}

.sg-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.65fr);
    align-items: start;
    gap: 24px;
    min-width: 0;
}

.sg-profile-card {
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(0, 32, 82, 0.07);
}

.sg-profile-card__heading {
    margin-bottom: 22px;
}

.sg-profile-card__heading h2 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(1.35rem, 2.7vw, 1.85rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.sg-profile-card__heading p:not(.sg-profile-eyebrow) {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.sg-profile-alert {
    margin-bottom: 20px;
    padding: 16px 18px;
    border: 1px solid transparent;
    border-radius: 16px;
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sg-profile-alert ul {
    margin: 0;
    padding-left: 1.2rem;
}

.sg-profile-alert li + li {
    margin-top: 5px;
}

.sg-profile-alert--success {
    border-color: rgba(37, 211, 102, 0.28);
    background: rgba(37, 211, 102, 0.09);
    color: #176636;
}

.sg-profile-alert--error {
    border-color: rgba(220, 53, 69, 0.24);
    background: rgba(220, 53, 69, 0.07);
    color: #8E1C28;
}

.sg-profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.sg-profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.sg-profile-field--full {
    grid-column: 1 / -1;
}

.sg-profile-field label {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 850;
}

.sg-profile-field input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text-main);
    font: inherit;
    line-height: 1.3;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.sg-profile-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.sg-profile-field input[readonly] {
    background: #F3F5F8;
    color: var(--text-muted);
    cursor: default;
}

.sg-profile-field small {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.sg-profile-section-heading {
    margin: 28px 0 18px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.sg-profile-section-heading h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.12rem;
}

.sg-profile-section-heading p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.sg-profile-password-fields {
    display: grid;
    gap: 16px;
}

.sg-profile-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 24px;
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 850;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.sg-profile-submit:hover {
    background: #0B2F6E;
    box-shadow: 0 12px 28px rgba(0, 32, 82, 0.16);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .sg-profile-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-profile-card--password {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .sg-profile-shell {
        padding: 40px 0 72px;
    }

    .sg-profile-container {
        width: min(94%, 1120px);
    }

    .sg-profile-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sg-profile-back,
    .sg-profile-submit {
        width: 100%;
    }

    .sg-profile-card {
        padding: 20px;
        border-radius: 20px;
    }

    .sg-profile-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-profile-field--full {
        grid-column: auto;
    }
}

/* ── Ícono carrito en header — Aditivo, scoped .nav-cart-* ───────────────────
   Append al final de public_html/assets/css/style.css.
   No depende de ninguna clase fuera de este bloque salvo variables globales
   (--accent, --text-main). No modifica reglas globales del .nav.
   En móvil ≤900px se usa order:2 + margin-left:auto para colocar el ícono
   entre brand y mobile-menu-toggle (que ya tiene order:3 en el CSS base).
   ────────────────────────────────────────────────────────────────────────── */
.nav-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-main);
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-cart:hover,
.nav-cart:focus-visible {
    color: var(--accent);
    background: #F3F5F8;
    transform: translateY(-1px);
}

.nav-cart:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-cart-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.nav-cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 0 0 2px #ffffff;
    pointer-events: none;
}

@media (max-width: 900px) {
    .nav-cart {
        order: 2;
        margin-left: auto;
        width: 40px;
        height: 40px;
    }

    .nav-cart-icon {
        width: 20px;
        height: 20px;
    }
}


.sg-pedido-tpl-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    height: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.sg-pedido-tpl-card:hover { border-color: var(--accent); }
/* Preview — aspect-ratio fijo: Business Card 3.5"x2" = 7/4.
   Proactivo: dimensiones garantizadas independientemente del estado del img. */
.sg-pedido-tpl-preview {
    aspect-ratio: 7 / 4;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    border-bottom: 1px solid var(--border);
}
/* Fallback estructural compartido por consumidores externos del componente. */
.sg-pedido-tpl-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #aaa;
    text-align: center;
    padding: 0.5rem;
}
.sg-template-preview-set {
    width: 100%;
}

.sg-template-preview-assets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f5f5f5;
    border-bottom: 1px solid var(--border);
}

.sg-template-preview-asset {
    min-width: 0;
    margin: 0;
}

.sg-template-preview-asset:only-child {
    grid-column: 1 / -1;
}

.sg-template-preview-asset img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1350 / 1725;
    object-fit: contain;
    background: #fff;
}

.sg-template-preview-caption {
    padding-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.sg-template-preview-message {
    margin: 0;
    padding: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 640px) {
    .sg-template-preview-assets {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-template-preview-asset:only-child {
        grid-column: auto;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Frente G-R1: detalle global SaaS de la orden cliente.
   Bloque único scoped .sg-order-detail-*.
   ────────────────────────────────────────────────────────────────────────── */
.sg-order-detail-shell {
    padding: 48px 0 80px;
}

.sg-order-detail-shell *,
.sg-order-detail-shell *::before,
.sg-order-detail-shell *::after {
    box-sizing: border-box;
}

.sg-order-detail-shell a:focus-visible,
.sg-order-detail-shell summary:focus-visible {
    outline: 3px solid rgba(11, 92, 255, 0.35);
    outline-offset: 3px;
}

.sg-order-detail-breadcrumb {
    margin-bottom: 18px;
}

.sg-order-detail-breadcrumb a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.sg-order-detail-breadcrumb a:hover {
    text-decoration: underline;
}

.sg-order-detail-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--bg-card);
}

.sg-order-detail-hero-main {
    min-width: 0;
}

.sg-order-detail-eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.sg-order-detail-hero h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.sg-order-detail-hero-meta {
    margin: 8px 0 14px;
    color: var(--text-muted);
}

.sg-order-detail-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.sg-order-detail-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.sg-order-detail-metric {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-card);
}

.sg-order-detail-metric span,
.sg-order-detail-shipping-grid span,
.sg-order-detail-item-meta span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sg-order-detail-metric strong,
.sg-order-detail-shipping-grid strong,
.sg-order-detail-item-meta strong {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.sg-order-detail-shipping,
.sg-order-detail-section {
    padding: 26px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--bg-card);
}

.sg-order-detail-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.sg-order-detail-section-head h2,
.sg-order-detail-shipping h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.sg-order-detail-shipping-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.sg-order-detail-shipping-grid > div {
    min-width: 0;
    padding: 16px;
    border-radius: 14px;
    background: var(--accent-soft);
}

.sg-order-detail-items {
    display: grid;
    gap: 18px;
}

.sg-order-detail-item {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
}

.sg-order-detail-item-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 18px;
}

.sg-order-detail-item-head > .sg-order-detail-event-folio {
    grid-column: 1 / -1;
}

.sg-order-detail-item-title {
    min-width: 0;
}

.sg-order-detail-item-title h3 {
    margin: 0;
    font-size: 1.2rem;
    overflow-wrap: anywhere;
}

.sg-order-detail-item-title p {
    margin: 5px 0 0;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.sg-order-detail-item-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.sg-order-detail-item-meta > div {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.sg-order-detail-progress {
    margin-top: 18px;
}

.sg-order-detail-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.84rem;
}

.sg-order-detail-progress-label span {
    color: var(--text-muted);
}

.sg-order-detail-progress-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}

.sg-order-detail-progress-value {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: #E5E7EB;
}

.sg-order-detail-progress-value.is-complete {
    background: var(--accent);
}

.sg-order-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.sg-order-detail-actions .sg-orders-btn,
.sg-order-detail-hero-actions .sg-orders-btn,
.sg-order-detail-asset-row .sg-orders-btn,
.sg-order-detail-final-nav .sg-orders-btn {
    min-height: 42px;
}

.sg-order-detail-disclosure {
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.sg-order-detail-disclosure summary {
    padding: 18px 0;
    color: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.sg-order-detail-disclosure-body {
    display: grid;
    gap: 20px;
    padding-bottom: 4px;
}

.sg-order-detail-disclosure-body section {
    min-width: 0;
}

.sg-order-detail-disclosure-body h4,
.sg-order-detail-asset-group h4 {
    margin: 0 0 12px;
    font-size: 0.98rem;
}

.sg-order-detail-purchase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.sg-order-detail-purchase > div {
    min-width: 0;
    padding: 13px 14px;
    border-radius: 12px;
    background: #F8FAFC;
}

.sg-order-detail-purchase dt {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.sg-order-detail-purchase dd {
    margin: 4px 0 0;
    color: var(--text-main);
    overflow-wrap: anywhere;
}

.sg-order-detail-assets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.sg-order-detail-asset-group {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #F8FAFC;
}

.sg-order-detail-asset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.sg-order-detail-asset-row:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.sg-order-detail-asset-row > div {
    min-width: 0;
}

.sg-order-detail-asset-name {
    display: block;
    margin-top: 4px;
    color: var(--text-main);
    overflow-wrap: anywhere;
}

.sg-order-detail-asset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.sg-order-detail-timeline {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sg-order-detail-event {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding-bottom: 22px;
}

.sg-order-detail-event:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 0;
    left: 6px;
    width: 2px;
    background: var(--border);
}

.sg-order-detail-event-dot {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    margin-top: 3px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.sg-order-detail-event-body {
    min-width: 0;
}

.sg-order-detail-event-body > strong {
    display: block;
}

.sg-order-detail-event-body p {
    margin: 8px 0 0;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.sg-order-detail-event-folio {
    margin: 0;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
}

.sg-order-detail-empty {
    margin: 10px 0 0;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.sg-order-detail-assets > .sg-order-detail-empty {
    grid-column: 1 / -1;
}

.sg-order-detail-final-nav {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

@media (max-width: 1024px) {
    .sg-order-detail-hero {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .sg-order-detail-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .sg-order-detail-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-order-detail-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .sg-order-detail-shell {
        padding: 32px 0 56px;
    }

    .sg-order-detail-hero,
    .sg-order-detail-shipping,
    .sg-order-detail-section {
        padding: 18px;
        border-radius: 16px;
    }

    .sg-order-detail-metrics,
    .sg-order-detail-shipping-grid,
    .sg-order-detail-item-meta,
    .sg-order-detail-purchase,
    .sg-order-detail-assets {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-order-detail-metric,
    .sg-order-detail-item {
        padding: 16px;
    }

    .sg-order-detail-item-head {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .sg-order-detail-item-head > .sg-order-detail-event-folio {
        grid-column: auto;
    }

    .sg-order-detail-item-head .sg-orders-badge {
        justify-self: start;
    }

    .sg-order-detail-progress-label {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .sg-order-detail-actions,
    .sg-order-detail-hero-actions,
    .sg-order-detail-final-nav {
        align-items: stretch;
        flex-direction: column;
    }

    .sg-order-detail-actions .sg-orders-btn,
    .sg-order-detail-hero-actions .sg-orders-btn,
    .sg-order-detail-asset-row .sg-orders-btn,
    .sg-order-detail-final-nav .sg-orders-btn {
        width: 100%;
    }

    .sg-order-detail-asset-row {
        align-items: stretch;
        flex-direction: column;
    }

    .sg-order-detail-item,
    .sg-order-detail-item-title,
    .sg-order-detail-asset-row,
    .sg-order-detail-asset-name,
    .sg-order-detail-shipping-grid strong {
        overflow-wrap: anywhere;
    }
}

/* PRD-03 · Catálogo unificado */
.sg-catalog-shell,
.sg-catalog-product-shell {
    padding: 3.5rem 0 5rem;
}

.sg-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.sg-catalog-card,
.sg-catalog-configurator {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.sg-catalog-card h2,
.sg-catalog-configurator h2 {
    margin-top: 0;
}

.sg-catalog-attributes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.sg-catalog-field {
    display: grid;
    gap: 0.45rem;
}

.sg-catalog-field select,
.sg-catalog-field input,
.sg-catalog-field textarea {
    width: 100%;
}

.sg-catalog-price {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin: 1.25rem 0;
    font-size: 1.05rem;
}

.sg-catalog-price strong {
    font-size: 2rem;
}

.sg-catalog-message {
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .sg-catalog-shell,
    .sg-catalog-product-shell {
        padding-top: 2rem;
    }

    .sg-catalog-card,
    .sg-catalog-configurator {
        padding: 1.1rem;
    }
}


.sg-catalog-templates {
    margin: 2rem 0;
}

.sg-catalog-templates .sg-pedido-tpl-card {
    display: grid;
    gap: 0.5rem;
}

/* ============================================================================
   Frente G-R3-C1: mi-pedido por order_item
   Módulo autónomo .sg-item-detail-*
   ============================================================================ */
.sg-item-detail-shell {
    min-width: 0;
    padding: 48px 0 96px;
    background:
        radial-gradient(circle at 10% 8%, rgba(0, 32, 82, 0.08), transparent 30%),
        linear-gradient(180deg, #F8FAFC 0%, #ffffff 48%, #F8FAFC 100%);
}

.sg-item-detail-shell *,
.sg-item-detail-shell *::before,
.sg-item-detail-shell *::after {
    box-sizing: border-box;
}


.sg-item-detail-shell a:focus-visible,
.sg-item-detail-shell button:focus-visible,
.sg-item-detail-shell input:focus-visible,
.sg-item-detail-shell textarea:focus-visible {
    outline: 3px solid rgba(11, 92, 255, 0.38);
    outline-offset: 3px;
}

.sg-item-detail-container {
    width: min(92%, 1080px);
    min-width: 0;
    margin: 0 auto;
}

.sg-item-detail-back {
    margin-bottom: 18px;
}

.sg-item-detail-back a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--accent);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sg-item-detail-back a:hover,
.sg-item-detail-back a:focus-visible {
    text-decoration: none;
}

.sg-item-detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    min-width: 0;
    margin-bottom: 24px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(0, 32, 82, 0.10), transparent 38%),
        #ffffff;
    box-shadow: 0 22px 58px rgba(0, 32, 82, 0.09);
}

.sg-item-detail-hero__identity,
.sg-item-detail-hero__status {
    min-width: 0;
}

.sg-item-detail-eyebrow,
.sg-item-detail-action__eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sg-item-detail-hero h1 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.sg-item-detail-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.sg-item-detail-hero__meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sg-item-detail-hero__status {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}


.sg-item-detail-alerts {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.sg-item-detail-alert {
    padding: 16px 18px;
    border: 1px solid transparent;
    border-radius: 18px;
    font-weight: 750;
    line-height: 1.5;
}

.sg-item-detail-alert p {
    margin: 0;
    overflow-wrap: anywhere;
}

.sg-item-detail-alert p + p {
    margin-top: 8px;
}

.sg-item-detail-alert--error {
    border-color: rgba(185, 28, 28, 0.22);
    background: #FEF2F2;
    color: #991B1B;
}

.sg-item-detail-alert--success {
    border-color: rgba(22, 101, 52, 0.20);
    background: #F0FDF4;
    color: #166534;
}

.sg-item-detail-action,
.sg-item-detail-timeline,
.sg-item-detail-specs,
.sg-item-detail-information,
.sg-item-detail-shipping {
    min-width: 0;
    margin-bottom: 24px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(0, 32, 82, 0.07);
}

.sg-item-detail-action {
    display: grid;
    gap: 24px;
    border-color: rgba(0, 32, 82, 0.20);
    background:
        radial-gradient(circle at top right, rgba(0, 32, 82, 0.08), transparent 36%),
        #ffffff;
}

.sg-item-detail-action--proof {
    border-color: rgba(146, 64, 14, 0.26);
    background:
        radial-gradient(circle at top right, rgba(254, 243, 199, 0.86), transparent 42%),
        #ffffff;
}

.sg-item-detail-action__content {
    min-width: 0;
}

.sg-item-detail-action__content h2,
.sg-item-detail-timeline h2,
.sg-item-detail-specs h2,
.sg-item-detail-information h2,
.sg-item-detail-shipping h2 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(1.35rem, 2.7vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
}

.sg-item-detail-action__content p:not(.sg-item-detail-action__eyebrow) {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.sg-item-detail-template-selected {
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.sg-item-detail-action__buttons,
.sg-item-detail-proof-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.sg-item-detail-action__buttons .btn,
.sg-item-detail-proof-actions .btn,
.sg-item-detail-primary-submit {
    min-height: 44px;
}

.sg-item-detail-proof-actions form {
    margin: 0;
}

.sg-item-detail-proof-notice {
    margin: -8px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.sg-item-detail-template-form,
.sg-item-detail-brief-form {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.sg-item-detail-template-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.sg-item-detail-template-fieldset legend {
    margin-bottom: 14px;
    color: var(--text-main);
    font-weight: 900;
}

.sg-item-detail-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
    min-width: 0;
}

.sg-item-detail-template-option {
    position: relative;
    min-width: 0;
}

.sg-item-detail-template-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
}

.sg-item-detail-template-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sg-item-detail-template-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.sg-item-detail-template-radio:checked + .sg-item-detail-template-card {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.sg-item-detail-template-radio:focus-visible + .sg-item-detail-template-card {
    outline: 3px solid rgba(11, 92, 255, 0.42);
    outline-offset: 3px;
    border-color: var(--accent);
}

.sg-item-detail-template-previews {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: #F8FAFC;
}

.sg-item-detail-template-preview {
    min-width: 0;
    margin: 0;
}

.sg-item-detail-template-preview:only-child {
    grid-column: 1 / -1;
}

.sg-item-detail-template-preview img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    background: #ffffff;
    object-fit: contain;
}

.sg-item-detail-template-preview figcaption {
    padding-top: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
    overflow-wrap: anywhere;
}

.sg-item-detail-template-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(135deg, rgba(0, 32, 82, 0.05), rgba(255, 255, 255, 0.88)),
        #F8FAFC;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 800;
    text-align: center;
}

.sg-item-detail-template-card__body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 16px;
}

.sg-item-detail-template-card__body strong {
    color: var(--text-main);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.sg-item-detail-template-card__body span {
    color: var(--text-muted);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.sg-item-detail-primary-submit {
    justify-self: start;
}

.sg-item-detail-brief-fields {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.sg-item-detail-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.sg-item-detail-field label {
    color: var(--text-main);
    font-size: 0.94rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.sg-item-detail-field input,
.sg-item-detail-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text-main);
    padding: 14px 16px;
    font: inherit;
}

.sg-item-detail-field textarea {
    min-height: 140px;
    resize: vertical;
}

.sg-item-detail-field input:focus,
.sg-item-detail-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.sg-item-detail-field small {
    color: var(--text-muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sg-item-detail-timeline h2,
.sg-item-detail-specs h2,
.sg-item-detail-information h2,
.sg-item-detail-shipping h2 {
    margin-bottom: 20px;
}

.sg-item-detail-timeline__list {
    list-style: none;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.sg-item-detail-timeline__list--rail {
    display: flex;
    align-items: flex-start;
}

.sg-item-detail-timeline__list--vertical {
    display: grid;
    gap: 0;
}

.sg-item-detail-timeline__item {
    min-width: 0;
    position: relative;
}

.sg-item-detail-timeline__list--rail .sg-item-detail-timeline__item {
    display: grid;
    flex: 1 1 0;
    justify-items: center;
    gap: 10px;
    padding: 0 8px;
    text-align: center;
}

.sg-item-detail-timeline__list--rail .sg-item-detail-timeline__item::after {
    content: "";
    position: absolute;
    top: 7px;
    left: calc(50% + 7px);
    width: calc(100% - 14px);
    height: 2px;
    background: #D7DEE8;
}

.sg-item-detail-timeline__list--rail .sg-item-detail-timeline__item:last-child::after {
    content: none;
}

.sg-item-detail-timeline__list--vertical .sg-item-detail-timeline__item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 22px;
}

.sg-item-detail-timeline__list--vertical .sg-item-detail-timeline__item::after {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 0;
    left: 6px;
    width: 2px;
    background: #D7DEE8;
}

.sg-item-detail-timeline__list--vertical .sg-item-detail-timeline__item:last-child {
    padding-bottom: 0;
}

.sg-item-detail-timeline__list--vertical .sg-item-detail-timeline__item:last-child::after {
    content: none;
}

.sg-item-detail-timeline__marker {
    position: relative;
    z-index: 1;
    display: block;
    width: 14px;
    height: 14px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.sg-item-detail-timeline__body {
    min-width: 0;
}

.sg-item-detail-timeline__body strong,
.sg-item-detail-timeline__body time {
    display: block;
    overflow-wrap: anywhere;
}

.sg-item-detail-timeline__body strong {
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.35;
}

.sg-item-detail-timeline__body time {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.sg-item-detail-timeline__note,
.sg-item-detail-timeline__tracking {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sg-item-detail-timeline__tracking a,
.sg-item-detail-shipping a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.sg-item-detail-timeline__tracking a:hover,
.sg-item-detail-timeline__tracking a:focus-visible,
.sg-item-detail-shipping a:hover,
.sg-item-detail-shipping a:focus-visible {
    text-decoration: none;
}

.sg-item-detail-specs__grid,
.sg-item-detail-summary,
.sg-item-detail-shipping__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 14px;
    min-width: 0;
    margin: 0;
}

.sg-item-detail-specs__grid > div,
.sg-item-detail-summary > div,
.sg-item-detail-shipping__grid > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #F8FAFC;
}

.sg-item-detail-specs__grid dt,
.sg-item-detail-summary dt,
.sg-item-detail-shipping__grid dt {
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sg-item-detail-specs__grid dd,
.sg-item-detail-summary dd,
.sg-item-detail-shipping__grid dd {
    margin: 0;
    color: var(--text-main);
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.sg-item-detail-information__template {
    margin: 0 0 18px;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.sg-item-detail-shipping__empty {
    margin: 16px 0 0;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.sg-item-detail-final-nav {
    display: flex;
    justify-content: flex-start;
    padding-top: 4px;
}

.sg-item-detail-final-nav .btn {
    min-height: 44px;
    border-color: var(--border);
    background: #ffffff;
    color: var(--accent);
}

@media (max-width: 700px) {
    .sg-item-detail-shell {
        padding: 32px 0 112px;
    }

    .sg-item-detail-hero {
        flex-direction: column;
        gap: 18px;
        padding: 22px;
        border-radius: 22px;
    }

    .sg-item-detail-hero__status {
        justify-content: flex-start;
        width: 100%;
    }

    .sg-item-detail-action,
    .sg-item-detail-timeline,
    .sg-item-detail-specs,
    .sg-item-detail-information,
    .sg-item-detail-shipping {
        padding: 22px;
        border-radius: 20px;
    }

    .sg-item-detail-template-previews {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-item-detail-template-preview:only-child {
        grid-column: auto;
    }

    .sg-item-detail-primary-submit,
    .sg-item-detail-action__buttons,
    .sg-item-detail-proof-actions,
    .sg-item-detail-proof-actions form,
    .sg-item-detail-action__buttons .btn,
    .sg-item-detail-proof-actions .btn,
    .sg-item-detail-final-nav,
    .sg-item-detail-final-nav .btn {
        width: 100%;
    }

    .sg-item-detail-action__buttons,
    .sg-item-detail-proof-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sg-item-detail-timeline__list--rail {
        display: grid;
    }

    .sg-item-detail-timeline__list--rail .sg-item-detail-timeline__item {
        display: grid;
        grid-template-columns: 18px minmax(0, 1fr);
        justify-items: stretch;
        gap: 12px;
        padding: 0 0 22px;
        text-align: left;
    }

    .sg-item-detail-timeline__list--rail .sg-item-detail-timeline__item::after {
        top: 14px;
        bottom: 0;
        left: 6px;
        width: 2px;
        height: auto;
    }

    .sg-item-detail-timeline__list--rail .sg-item-detail-timeline__item:last-child {
        padding-bottom: 0;
    }

    .sg-item-detail-specs__grid,
    .sg-item-detail-summary,
    .sg-item-detail-shipping__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 380px) {
    .sg-item-detail-container {
        width: min(94%, 1080px);
    }

    .sg-item-detail-hero,
    .sg-item-detail-action,
    .sg-item-detail-timeline,
    .sg-item-detail-specs,
    .sg-item-detail-information,
    .sg-item-detail-shipping {
        padding: 18px;
    }
}

.sg-house-credit-summary {
    display: grid;
    gap: 0;
    overflow: hidden;
}

.sg-house-credit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.sg-house-credit-row span {
    color: var(--text-muted);
    font-weight: 700;
}

.sg-house-credit-row strong {
    color: var(--text-main);
    text-align: right;
}

.sg-house-credit-row--total {
    padding-top: 0;
    font-size: 1.08rem;
}

.sg-house-credit-row--stripe strong {
    color: var(--accent);
}

.sg-house-credit-row--remaining {
    border-bottom: 0;
}

.sg-house-credit-note {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.sg-house-credit-admin {
    display: grid;
    gap: 16px;
}

.sg-house-credit-admin p {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .sg-house-credit-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .sg-house-credit-row strong {
        text-align: left;
    }
}

/* H7 — Libreta de direcciones y snapshot de envío */
.sg-address-book-shell {
    padding: 52px 0 72px;
    background: #f6f8fb;
}

.sg-address-book-container,
.sg-address-book-hero,
.sg-address-editor,
.sg-address-search,
.sg-address-empty,
.sg-address-refine,
.sg-checkout-address,
.sg-confirmation-address {
    display: grid;
    gap: 18px;
}

.sg-address-book-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
}

.sg-address-book-hero p,
.sg-address-empty p,
.sg-address-refine,
.sg-checkout-address-frozen p,
.sg-confirmation-address p {
    color: var(--text-muted);
}

.sg-address-book-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sg-address-book-tabs a {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    font-weight: 700;
}

.sg-address-book-tabs a.is-active {
    background: var(--accent);
    color: #ffffff;
}

.sg-address-search,
.sg-address-editor,
.sg-address-empty,
.sg-address-refine {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
}

.sg-address-search__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.sg-address-search input,
.sg-address-form input,
.sg-address-form select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text-main);
    font: inherit;
}

.sg-address-card-grid,
.sg-checkout-address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.sg-address-card,
.sg-checkout-address-option,
.sg-checkout-address-frozen,
.sg-confirmation-address {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
}

.sg-address-card {
    display: grid;
    gap: 12px;
    padding: 22px;
}

.sg-address-card.is-default {
    box-shadow: inset 0 0 0 2px var(--accent-soft);
}

.sg-address-card__head,
.sg-address-editor__head,
.sg-checkout-address-option__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sg-address-card__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.sg-address-card__badges span,
.sg-address-card__badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
}

.sg-address-card address,
.sg-checkout-address-frozen,
.sg-confirmation-address address,
.sg-shipping-address-lines {
    font-style: normal;
    color: var(--text-muted);
}

.sg-address-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.sg-address-card__actions form {
    margin: 0;
}

.sg-address-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.sg-address-form-grid__wide,
.sg-address-default-check {
    grid-column: 1 / -1;
}

.sg-address-default-check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
}

.sg-address-default-check input {
    width: auto;
    min-height: 0;
}

.sg-address-fieldset {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.sg-address-fieldset legend {
    padding: 0 8px;
    font-weight: 800;
}

.sg-checkout-address {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
}

.sg-checkout-address-option {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    cursor: pointer;
}

.sg-checkout-address-option:has(input:checked) {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.sg-checkout-address-option input {
    margin-top: 5px;
}

.sg-checkout-address-option__body,
.sg-checkout-address-frozen,
.sg-confirmation-address address,
.sg-shipping-address-lines {
    display: grid;
    gap: 5px;
}

.sg-checkout-address-option__head small {
    color: var(--text-muted);
    font-weight: 700;
}

.sg-checkout-address-frozen,
.sg-confirmation-address {
    padding: 20px;
}

.sg-confirmation-address {
    margin-top: 22px;
}

.sg-shipping-address-lines span,
.sg-confirmation-address address span {
    display: block;
}

@media (max-width: 760px) {
    .sg-address-book-hero,
    .sg-address-card-grid,
    .sg-checkout-address-grid,
    .sg-address-form-grid,
    .sg-address-search__row {
        grid-template-columns: 1fr;
    }

    .sg-address-book-hero .btn,
    .sg-address-search__row .btn,
    .sg-address-card__actions .btn {
        width: 100%;
    }

    .sg-address-card__head,
    .sg-address-editor__head,
    .sg-checkout-address-option__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .sg-address-card__badges {
        justify-content: flex-start;
    }
}
