
/* ── Tienda / Carrito — capa visual profesional ─────────── */

.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--verde-bosque);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.22s var(--ease-out), background 0.22s var(--ease-out), transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}

.cart-link:hover {
    border-color: var(--border-strong);
    background: var(--surface-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--dorado), var(--dorado-claro));
    color: var(--cacao);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 15px;
    text-align: center;
}

.page-hero--compact {
    padding-bottom: 1.2rem;
}

.page-hero--shop {
    padding-bottom: 2.2rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(232, 163, 28, 0.08), transparent 34%),
        linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.page-hero-shop-inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
}

.shop-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 160px;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.shop-hero-stat strong {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--verde-bosque);
}

.shop-hero-stat span {
    margin-top: 0.4rem;
    color: var(--text-soft);
    font-size: 0.82rem;
}

.shop-section {
    padding-top: 0.25rem;
}

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xs);
}

.shop-toolbar .filters {
    flex: 1;
    min-width: 0;
}

.shop-cart-cta {
    flex: 0 0 auto;
    padding: 0.62rem 1.05rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--verde-bosque);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.shop-cart-cta:hover {
    border-color: var(--verde-bosque);
    transform: translateY(-1px);
}

.catalog-card--shop {
    display: flex;
    flex-direction: column;
}

.catalog-card-actions {
    padding: 0 1.2rem 1.2rem;
    margin-top: auto;
}

.catalog-card-actions .btn {
    width: 100%;
}

.catalog-card-actions form {
    margin: 0;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.55rem 0;
    color: var(--text-soft);
    font-size: 0.84rem;
}

.breadcrumb a {
    transition: color 0.2s var(--ease-out);
}

.breadcrumb a:hover {
    color: var(--verde-bosque);
}

.detail-code {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--surface-tint);
    color: var(--text-soft);
    font-family: "Poppins", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-buy-box {
    position: relative;
    margin: 1.35rem 0 1.75rem;
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 248, 244, 0.96));
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.product-buy-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--verde-bosque), var(--dorado));
}

.product-buy-box .detail-price {
    margin-bottom: 1.05rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2.15rem;
    font-weight: 700;
    color: var(--verde-bosque);
}

.variant-picker-label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.variant-pills {
    display: grid;
    gap: 0.6rem;
}

.variant-pill {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), background 0.22s var(--ease-out);
}

.variant-pill:hover {
    border-color: var(--border-strong);
    background: var(--surface-soft);
}

.variant-pill input {
    accent-color: var(--verde-bosque);
}

.variant-pill span {
    font-weight: 500;
    color: var(--text);
}

.variant-pill small {
    font-family: "Poppins", sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--verde-bosque);
}

.variant-pill:has(input:checked) {
    border-color: var(--verde-bosque);
    background: rgba(33, 66, 56, 0.04);
    box-shadow: inset 0 0 0 1px rgba(33, 66, 56, 0.06);
}

.product-buy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1rem;
}

.product-buy-row .btn-primary {
    flex: 1 1 180px;
}

.product-buy-hint,
.product-consult-link {
    margin: 0.9rem 0 0;
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.55;
}

.product-consult-link {
    display: inline-block;
    color: var(--green-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-tint);
    color: var(--verde-bosque);
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.2s var(--ease-out);
}

.qty-btn:hover {
    background: rgba(33, 66, 56, 0.1);
}

.qty-value,
.qty-input {
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.qty-input {
    width: 44px;
    border: 0;
    background: transparent;
    color: var(--text);
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.detail-main-image-frame {
    border-color: var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.detail-thumb {
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.detail-thumb img {
    width: 92px;
    height: 92px;
    object-fit: cover;
}

.detail-thumb.active {
    border-color: var(--verde-bosque);
    box-shadow: 0 0 0 2px rgba(33, 66, 56, 0.08);
}

.cart-page {
    padding-top: 0.25rem;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
    gap: 1.5rem;
    align-items: start;
}

.cart-lines {
    display: grid;
    gap: 0.85rem;
}

.cart-line {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 1.1rem;
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

.cart-line:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.cart-line + .cart-line {
    margin-top: 0;
}

.cart-line-image img,
.cart-line-placeholder {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: linear-gradient(165deg, var(--surface-muted), #f7f1e8);
}

.cart-line-head h2 {
    margin: 0.2rem 0 0;
    font-size: 1.3rem;
}

.cart-line-code {
    color: var(--dorado-tinta);
    font-family: "Poppins", sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cart-line-total {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--verde-bosque);
}

.cart-summary-card {
    position: sticky;
    top: calc(var(--header-height) + 14px);
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.cart-summary-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--verde-bosque), var(--dorado));
}

.cart-summary-card h2 {
    margin-top: 0.15rem;
    font-size: 1.6rem;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cart-summary-row strong {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.45rem;
    color: var(--verde-bosque);
}

.cart-summary-note {
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.6;
}

.cart-summary .btn + .btn {
    margin-top: 0.7rem;
}

.cart-remove,
.cart-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.45rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.cart-remove:hover,
.cart-clear:hover {
    color: #8f1d13;
    border-color: rgba(180, 35, 24, 0.18);
    background: rgba(180, 35, 24, 0.06);
}

.cart-clear-form {
    margin: 0.75rem 0 0;
}

.cart-clear {
    width: 100%;
}

.cart-empty {
    max-width: 540px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    text-align: center;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
}

.cart-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    margin-bottom: 1.1rem;
    border-radius: 999px;
    background: var(--surface-tint);
    color: var(--verde-bosque);
}

.shop-alert {
    margin-bottom: 1rem;
    padding: 0.9rem 1.05rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.shop-alert--success {
    border-color: rgba(33, 66, 56, 0.12);
    background: rgba(33, 66, 56, 0.06);
    color: var(--verde-bosque);
}

.shop-alert--error {
    border-color: rgba(180, 35, 24, 0.14);
    background: rgba(180, 35, 24, 0.06);
    color: #8f1d13;
}

@media (max-width: 960px) {
    .page-hero-shop-inner,
    .cart-layout,
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-hero-stat {
        align-self: flex-start;
    }
}

@media (max-width: 720px) {
    .cart-line {
        grid-template-columns: 1fr;
    }

    .product-buy-row {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-summary-card {
        position: static;
    }
}
