:root {
    --bs-primary: #6D28D9;
    --bs-primary-rgb: 109, 40, 217;
    --bs-secondary: #2563EB;
    --bs-secondary-rgb: 37, 99, 235;
    --bs-body-color: #1E1B4B;
    --bs-body-bg: #F8FAFC;
    --bs-link-color: #6D28D9;
    --bs-link-color-rgb: 109, 40, 217;
    --bs-link-hover-color: #5B21B6;
    --rb-surface: #F5F3FF;
    --rb-border: #E9D5FF;
    --rb-accent: #22D3EE;
}

.btn-primary {
    --bs-btn-bg: #6D28D9;
    --bs-btn-border-color: #6D28D9;
    --bs-btn-hover-bg: #5B21B6;
    --bs-btn-hover-border-color: #5B21B6;
    --bs-btn-active-bg: #4C1D95;
    --bs-btn-active-border-color: #4C1D95;
    --bs-btn-disabled-bg: #8b5cf6;
    --bs-btn-disabled-border-color: #8b5cf6;
}
.btn-outline-primary {
    --bs-btn-color: #6D28D9;
    --bs-btn-border-color: #6D28D9;
    --bs-btn-hover-bg: #6D28D9;
    --bs-btn-hover-border-color: #6D28D9;
    --bs-btn-active-bg: #4C1D95;
    --bs-btn-active-border-color: #4C1D95;
}
.btn-outline-secondary:hover {
    background: var(--rb-surface);
    color: #6D28D9;
}
.text-primary { color: #6D28D9 !important; }
.bg-primary { background-color: #6D28D9 !important; }

body { color: var(--bs-body-color); }

:focus-visible {
    outline: 3px solid rgba(109, 40, 217, .45);
    outline-offset: 2px;
    border-radius: .25rem;
}

.navbar-brand .brand-accent { color: #A5F3FC; }
.navbar-logo {
    height: 38px;
    width: auto;
    display: block;
}
.cart-badge-wrap { position: relative; }
.cart-fab{display:none}
@media (max-width: 991.98px){
    .cart-fab{position:fixed;right:14px;bottom:14px;z-index:1050;display:flex;align-items:center;gap:.4rem;border-radius:999px;padding:.6rem .9rem;box-shadow:0 .5rem 1rem rgba(0,0,0,.2)}
    main{padding-bottom:5rem}
}

.hero {
    background: linear-gradient(135deg, #6D28D9 0%, #4C1D95 55%, #2563EB 100%);
    border-radius: 1rem;
}
.hero-search input {
    border-radius: 999px 0 0 999px;
    border: 0;
    min-height: 48px;
}
.hero-search button {
    border-radius: 0 999px 999px 0;
    background: var(--rb-accent);
    border: 0;
    color: #083344;
    font-weight: 600;
}

.chip {
    border-radius: 999px !important;
    padding-inline: 1rem !important;
}
.chip-active {
    background: #6D28D9 !important;
    color: #fff !important;
}

.product-card {
    position: relative;
    isolation: isolate;
    transition: transform .12s ease, box-shadow .12s ease;
    border-color: var(--rb-border);
    --glow: #6D28D9;
    --glow-shadow: rgba(109, 40, 217, .28);
}
/* Color del halo por posición: morado → cian → azul → violeta */
.product-grid > .col:nth-child(4n+1) .product-card { --glow: #6D28D9; --glow-shadow: rgba(109, 40, 217, .28); }
.product-grid > .col:nth-child(4n+2) .product-card { --glow: #22D3EE; --glow-shadow: rgba(34, 211, 238, .32); }
.product-grid > .col:nth-child(4n+3) .product-card { --glow: #2563EB; --glow-shadow: rgba(37, 99, 235, .30); }
.product-grid > .col:nth-child(4n) .product-card { --glow: #8B5CF6; --glow-shadow: rgba(139, 92, 246, .30); }

.product-card::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(120deg, var(--glow), var(--glow-shadow));
    filter: blur(12px);
    opacity: 0;
    z-index: -1;
    transition: opacity .25s ease;
}
.product-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--bs-card-bg, #fff);
    z-index: -1;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .75rem 1.5rem var(--glow-shadow) !important;
}
.product-card:hover::before {
    opacity: .75;
}
.product-card:focus-within::before {
    opacity: .6;
}
.product-img-wrap {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rb-surface);
    border-radius: calc(.375rem - 1px) calc(.375rem - 1px) 0 0;
    overflow: hidden;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .75rem;
}
.placeholder-icon { font-size: 3rem; opacity: .85; }

.price-tag {
    color: #6D28D9;
    font-weight: 700;
}

.quick-add {
    position: relative;
    z-index: 2;
}
.quick-add .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: #64748B;
}

.steps {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2.25rem;
    padding: 0;
    margin-bottom: 2rem;
}
.steps li {
    position: relative;
    text-align: center;
    font-size: .85rem;
    color: #94A3B8;
}
.steps li::before {
    content: attr(data-step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 auto .35rem;
    border-radius: 50%;
    background: #E2E8F0;
    color: #64748B;
    font-weight: 700;
}
.steps li.active { color: #6D28D9; font-weight: 600; }
.steps li.active::before {
    background: #6D28D9;
    color: #fff;
}
.steps li.done { color: #16A34A; }
.steps li.done::before {
    content: "✓";
    background: #DCFCE7;
    color: #16A34A;
}
.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 16px;
    left: calc(50% + 24px);
    width: calc(100% - 48px);
    height: 2px;
    background: #E2E8F0;
}

.cart-line {
    border-color: var(--rb-border);
}
.cart-line-body {
    align-items: center;
    flex-wrap: wrap;
}
.cart-line-name {
    overflow-wrap: anywhere;
}
.cart-line-subtotal {
    min-width: 4.5rem;
    text-align: end;
}
.cart-thumb {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rb-surface);
    border-radius: .5rem;
    overflow: hidden;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }

.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--rb-border);
    border-radius: .5rem;
    background: #fff;
    overflow: hidden;
}
.qty-stepper form { display: inline-flex; margin: 0; }
.qty-btn {
    border: 0;
    background: transparent;
    min-width: 40px;
    min-height: 40px;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--bs-body-color);
}
.qty-btn:disabled { color: #CBD5E1; }
.qty-value {
    min-width: 2.25rem;
    text-align: center;
    font-weight: 600;
}

/* Paginación clara y con área táctil cómoda */
.pagination { gap: .25rem; }
.pagination .page-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem !important;
}
.pagination .page-item.active .page-link {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}
.pagination .page-item.disabled .page-link {
    color: #94A3B8;
    background: #fff;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: .35rem 0;
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
}
.empty-state .empty-icon { font-size: 3.5rem; }

.success-circle {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #DCFCE7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.order-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: var(--rb-surface);
    border: 1px dashed var(--bs-primary);
    border-radius: .4rem;
    padding: .15rem .55rem;
    user-select: all;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: #64748B;
}

footer.site-footer {
    background: #1E1B4B;
}
footer.site-footer a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
}
footer.site-footer a:hover { color: var(--rb-accent); }

@media (max-width: 575.98px) {
    .steps { gap: 1.4rem; }
    .steps li:not(:last-child)::after { width: calc(100% - 40px); }

    .cart-line-body { align-items: flex-start; }
    .cart-thumb { width: 56px; height: 56px; }
    .cart-line-info { flex: 1 1 auto; }
    .cart-line-controls {
        flex: 1 0 100%;
        margin-top: .6rem;
        justify-content: space-between;
    }
    .cart-line-subtotal { margin-left: auto; }
}
