@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Great+Vibes&family=Playfair+Display:wght@600;700;800&display=swap');

:root {
    --primary-color: #FF4757;
    --primary-hover: #E03E4D;
    --primary-dark: #C02E3C;
    --bg-main: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-subtle: #F3F3F5;
    --accent-gold: #FFA502;
    --accent-green: #2ED573;
    --accent-green-dark: #20B85F;
    --text-main: #18181B;
    --text-secondary: #71717A;
    --border-light: #E4E4E7;
    --shadow-soft: 0 12px 32px rgba(24, 24, 27, 0.08);
    --shadow-card: 0 6px 18px rgba(24, 24, 27, 0.07);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

/* Sophia 2026: identidad visual y escritorio */
body{font-family:"DM Sans",sans-serif;background:linear-gradient(135deg,#fff9f0,#fff4f6 50%,#eff8f4)}
#app-container{max-width:none;background:#fff9f0;box-shadow:none}
.app-header{padding:10px clamp(16px,4vw,64px);border-color:rgba(212,175,55,.34)}
.brand{max-width:min(62vw,470px);gap:11px;text-decoration:none}.brand img{width:56px;height:56px;border-radius:50%}
.brand-copy{min-width:0;display:grid;line-height:1}.brand-copy strong{font-family:"Great Vibes",cursive;color:#8d4351;font-size:clamp(1.4rem,3vw,2rem);font-weight:400;white-space:nowrap}.brand-copy small{margin-top:5px;text-align:right;color:#7d6970;font-size:.72rem;font-weight:700}
.intro-section{background:linear-gradient(rgba(255,249,240,.86),rgba(255,244,246,.86)),url('../imagenes/background-app.png') center/cover}
.intro-section h1,.catalog-heading h2,.detail-content h1,.related-section h2,.info-card h2{font-family:"Playfair Display",serif;color:#8d4351}
.app-footer{padding:24px clamp(18px,5vw,70px);display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:25px;background:#142f47;color:#fff;text-align:left}.footer-brand{display:flex;align-items:center;gap:10px}.app-footer .footer-brand img{width:58px;height:58px}.footer-brand p{display:grid;margin:0}.footer-brand strong{font-family:"Great Vibes",cursive;font-size:1.45rem;font-weight:400}.footer-brand span,.footer-message{color:rgba(255,255,255,.76);font-size:.78rem}.app-footer small{text-align:right;color:#fff}.app-footer a{color:#edd27e}.sophia-swal{border:1px solid rgba(212,175,55,.34)!important;border-radius:20px!important}.swal2-confirm{background:#c87586!important}
@media(min-width:700px){main{width:min(1180px,100%);margin:0 auto}.intro-section{grid-template-columns:1.35fr .65fr;padding:40px;margin:28px 20px}.catalog-section,.related-section,.product-detail-page{padding:20px}.products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.detail-card{grid-template-columns:minmax(0,1fr) minmax(340px,.85fr)}.cart-drawer{top:50%;right:50%;bottom:auto;width:min(760px,calc(100vw - 48px));max-width:none;max-height:82vh;border-radius:24px;transform:translate(50%,-46%) scale(.96);opacity:0;box-shadow:0 28px 90px rgba(56,43,47,.25)}.cart-drawer.open{transform:translate(50%,-50%) scale(1);opacity:1}.drawer-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.drawer-summary{border-radius:0 0 24px 24px}}
@media(min-width:1050px){.products-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.catalog-section{padding-left:32px;padding-right:32px}}
@media(max-width:699px){.admin-access{display:none}.app-footer{grid-template-columns:1fr;text-align:center}.footer-brand{justify-content:center}.app-footer small{text-align:center}.footer-message{margin:0}.brand-copy strong{font-size:1.3rem}}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #e5e5e5;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

#app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background-color: var(--bg-main);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

.announcement-bar {
    min-height: 34px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--text-main);
    color: #fff;
    font-size: 0.73rem;
    text-align: center;
}

.announcement-bar i {
    color: var(--accent-gold);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 68px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

.brand {
    display: inline-flex;
    align-items: center;
    max-width: 174px;
}

.brand img {
    width: auto;
    height: 48px;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-action {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: #fff;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(24, 24, 27, 0.05);
}

.header-action i {
    font-size: 1.15rem;
}

.header-action:hover,
.header-action:focus-visible {
    color: var(--primary-color);
    border-color: rgba(255, 71, 87, 0.4);
}

.counter {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    border: 2px solid #fff;
    font-size: 0.62rem;
    font-weight: 800;
}

.intro-section {
    margin: 14px;
    padding: 22px 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fff 0%, #fff1f2 52%, #ffe8eb 100%);
    border: 1px solid rgba(255, 71, 87, 0.14);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(105px, 0.8fr);
    gap: 8px;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.intro-section::before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    right: -70px;
    top: -75px;
    background: rgba(255, 71, 87, 0.12);
}

.intro-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.intro-section h1,
.catalog-heading h2,
.related-section h2,
.detail-content h1,
.info-card h2,
.not-found-page h1 {
    margin: 8px 0 10px;
    color: var(--text-main);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.intro-section h1 {
    font-size: clamp(1.45rem, 6vw, 2rem);
}

.intro-section p {
    margin: 0 0 16px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.88rem;
}

.intro-image-wrap {
    position: relative;
    z-index: 2;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-image-wrap img {
    width: 165px;
    height: 165px;
    object-fit: contain;
    filter: drop-shadow(0 18px 18px rgba(24, 24, 27, 0.15));
}

.primary-action,
.secondary-action {
    border: 0;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.18s ease, background 0.18s ease;
}

.primary-action {
    padding: 11px 16px;
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 9px 20px rgba(255, 71, 87, 0.24);
}

.primary-action:hover {
    color: #fff;
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.secondary-action {
    padding: 11px 16px;
    background: var(--bg-subtle);
    color: var(--text-main);
}

.catalog-section,
.related-section,
.product-detail-page {
    padding: 8px 14px 24px;
}

.catalog-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.catalog-heading h2,
.related-section h2 {
    font-size: 1.35rem;
}

.catalog-heading p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.search-wrap {
    height: 48px;
    margin-bottom: 12px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 15px;
    background: #fff;
    border: 1px solid var(--border-light);
    box-shadow: 0 5px 14px rgba(24, 24, 27, 0.04);
}

.search-wrap > i {
    color: var(--text-secondary);
}

.search-wrap input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
}

.search-wrap input::placeholder {
    color: #A1A1AA;
}

.search-wrap button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--text-secondary);
}

.category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 10px;
    scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex: 0 0 auto;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 8px 12px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.category-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 6px 15px rgba(255, 71, 87, 0.22);
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.product-card {
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.product-card[hidden] {
    display: none !important;
}

.product-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 0.84;
    padding: 12px;
    background: linear-gradient(160deg, #fff 0%, var(--bg-subtle) 100%);
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.product-image-link:hover .product-image {
    transform: scale(1.025);
}

.product-card-body {
    padding: 13px 14px 15px;
}

.product-card-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.category-label {
    color: var(--primary-dark);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-card-tools {
    display: flex;
    align-items: center;
    gap: 7px;
}

.rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 750;
}

.rating i {
    color: var(--accent-gold);
}

.favorite-inline,
.favorite-detail {
    border: 1px solid var(--border-light);
    background: #fff;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.favorite-inline {
    width: 31px;
    height: 31px;
}

.favorite-detail {
    width: 40px;
    height: 40px;
}

.favorite-inline.active,
.favorite-detail.active {
    background: #fff0f1;
    color: var(--primary-color);
    border-color: rgba(255, 71, 87, 0.25);
}

.product-card-title {
    margin: 0 0 6px;
    font-size: 1rem;
    line-height: 1.28;
    font-weight: 800;
}

.product-card-title a {
    color: var(--text-main);
    text-decoration: none;
}

.product-card-description {
    min-height: 42px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.79rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-divider {
    height: 1px;
    margin: 12px 0;
    background: var(--border-light);
}

.product-purchase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-price {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-price small,
.detail-price-row small {
    color: var(--text-secondary);
    font-size: 0.67rem;
}

.product-price strong {
    color: var(--primary-dark);
    font-size: 1rem;
    white-space: nowrap;
}

.buy-card-button {
    min-width: 98px;
    min-height: 40px;
    padding: 9px 12px;
    border: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--accent-green);
    color: #fff;
    font-size: 0.77rem;
    font-weight: 850;
    box-shadow: 0 7px 15px rgba(46, 213, 115, 0.23);
}

.buy-card-button:hover {
    background: var(--accent-green-dark);
    transform: translateY(-1px);
}

.product-detail-link {
    margin-top: 11px;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
}

.product-detail-link:hover {
    color: var(--primary-color);
}

.empty-state,
.not-found-page {
    padding: 48px 20px;
    text-align: center;
}

.empty-state > i,
.not-found-page > i {
    display: inline-flex;
    margin-bottom: 12px;
    font-size: 2.6rem;
    color: var(--primary-color);
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p,
.not-found-page p {
    color: var(--text-secondary);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 2px 12px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    overflow: hidden;
    white-space: nowrap;
}

.breadcrumbs a {
    color: var(--primary-dark);
    text-decoration: none;
}

.breadcrumbs span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-card,
.info-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.detail-card {
    overflow: hidden;
}

.product-gallery {
    padding: 14px;
    background: linear-gradient(165deg, #fff, var(--bg-subtle));
}

.main-product-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-product-image-wrap img {
    width: 100%;
    height: 100%;
    padding: 10px;
    object-fit: contain;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.main-product-image-wrap img.changing {
    opacity: 0.45;
    transform: scale(0.985);
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.thumbnail-button {
    min-width: 0;
    aspect-ratio: 1 / 1;
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.thumbnail-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-button.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.18);
}

.detail-content {
    padding: 20px 17px 19px;
}

.detail-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.detail-content h1 {
    font-size: 1.75rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.detail-description {
    margin: 16px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.detail-price-row {
    padding: 14px;
    border-radius: 15px;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.detail-price-row > div {
    display: flex;
    flex-direction: column;
}

.detail-price-row strong {
    color: var(--primary-dark);
    font-size: 1.42rem;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.73rem;
    font-weight: 800;
}

.stock-status i {
    font-size: 0.45rem;
}

.stock-status.available {
    color: var(--accent-green-dark);
}

.stock-status.sold-out {
    color: var(--primary-dark);
}

.product-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

.option-field {
    display: grid;
    gap: 6px;
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 750;
}

.option-field select {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    outline: 0;
    background: #fff;
    color: var(--text-main);
}

.option-field select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.12);
}

.quantity-and-cart {
    margin-top: 15px;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 9px;
}

.quantity-control {
    min-height: 50px;
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.quantity-control button {
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--text-main);
}

.quantity-control input {
    width: 100%;
    border: 0;
    outline: 0;
    text-align: center;
    color: var(--text-main);
    font-weight: 800;
    -moz-appearance: textfield;
}

.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.add-cart-button,
.buy-now-button,
.checkout-button,
.dialog-footer button {
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-weight: 850;
}

.add-cart-button {
    min-height: 50px;
    padding: 10px 12px;
    background: var(--primary-color);
    box-shadow: 0 8px 17px rgba(255, 71, 87, 0.22);
}

.add-cart-button:hover {
    background: var(--primary-hover);
}

.buy-now-button {
    width: 100%;
    min-height: 52px;
    margin-top: 10px;
    padding: 11px 14px;
    background: var(--accent-green);
    box-shadow: 0 8px 17px rgba(46, 213, 115, 0.22);
}

.buy-now-button:hover {
    background: var(--accent-green-dark);
}

.share-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.share-box > div {
    display: flex;
    gap: 7px;
}

.share-box button,
.share-box a {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--text-main);
    text-decoration: none;
}

.product-information {
    display: grid;
    gap: 13px;
    margin-top: 14px;
}

.info-card {
    padding: 18px;
}

.info-card h2 {
    font-size: 1.17rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: grid;
    gap: 10px;
}

.info-card li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.45;
}

.info-card li i {
    color: var(--accent-green-dark);
    margin-top: 2px;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}

.related-section {
    padding-top: 0;
}

.app-footer {
    margin-top: 18px;
    padding: 28px 20px;
    background: #fff;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.app-footer img {
    width: auto;
    height: 44px;
    margin: 0 auto;
    object-fit: contain;
}

.app-footer p {
    max-width: 340px;
    margin: 12px auto;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.app-footer small {
    color: var(--text-secondary);
}

.ui-overlay {
    position: fixed;
    z-index: 100;
    inset: 0;
    background: rgba(24, 24, 27, 0.55);
    backdrop-filter: blur(2px);
}

.cart-drawer {
    position: fixed;
    z-index: 110;
    top: 0;
    bottom: 0;
    right: max(calc((100vw - 480px) / 2), 0px);
    width: min(420px, 100vw);
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: #fff;
    box-shadow: -18px 0 40px rgba(24, 24, 27, 0.18);
    transform: translateX(105%);
    transition: transform 0.22s ease;
}

.cart-drawer.open {
    transform: translateX(0);
}

.drawer-header,
.dialog-header {
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.drawer-header h2,
.dialog-header h2 {
    margin: 4px 0 0;
    font-size: 1.24rem;
}

.drawer-header > button,
.dialog-header > button {
    width: 39px;
    height: 39px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: #fff;
    color: var(--text-main);
}

.drawer-body {
    overflow-y: auto;
    padding: 12px 16px;
}

.cart-empty {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-secondary);
}

.cart-empty i {
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 2.6rem;
}

.cart-empty h3 {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 1.1rem;
}

.cart-empty p {
    max-width: 270px;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item img {
    width: 76px;
    height: 76px;
    padding: 5px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--bg-subtle);
}

.cart-item h3 {
    margin: 0 0 3px;
    font-size: 0.84rem;
    line-height: 1.35;
}

.cart-item-options {
    margin: 0 0 7px;
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.cart-item-price {
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 850;
}

.cart-item-controls {
    margin-top: 7px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: 9px;
    overflow: hidden;
}

.cart-item-controls button {
    width: 29px;
    height: 29px;
    border: 0;
    background: #fff;
}

.cart-item-controls span {
    min-width: 27px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.remove-cart-item {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fff0f1;
    color: var(--primary-color);
}

.drawer-summary {
    padding: 16px;
    border-top: 1px solid var(--border-light);
    background: #fff;
}

.drawer-summary > div,
.checkout-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.drawer-summary p {
    margin: 7px 0 12px;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.checkout-button,
.dialog-footer button {
    width: 100%;
    min-height: 50px;
    padding: 10px 14px;
    background: var(--accent-green);
}

.checkout-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.checkout-dialog {
    position: fixed;
    z-index: 120;
    inset: 0;
    padding: 14px;
    display: none;
    align-items: center;
    justify-content: center;
}

.checkout-dialog.open {
    display: flex;
}

.checkout-dialog form {
    width: min(440px, 100%);
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(24, 24, 27, 0.25);
}

.dialog-body {
    padding: 17px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dialog-body label {
    display: grid;
    gap: 6px;
    color: var(--text-main);
    font-size: 0.76rem;
    font-weight: 750;
}

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

.dialog-body input,
.dialog-body textarea {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 11px;
    padding: 11px 12px;
    outline: 0;
    resize: vertical;
}

.dialog-body input:focus,
.dialog-body textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.12);
}

.checkout-total {
    padding: 13px;
    border-radius: 12px;
    background: var(--bg-subtle);
}

.checkout-total strong {
    color: var(--primary-dark);
}

.dialog-footer {
    padding: 0 17px 17px;
}

.app-toast {
    position: fixed;
    z-index: 200;
    left: 50%;
    bottom: 24px;
    width: max-content;
    max-width: calc(100vw - 28px);
    padding: 11px 15px;
    border-radius: 12px;
    background: var(--text-main);
    color: #fff;
    font-size: 0.79rem;
    font-weight: 750;
    box-shadow: 0 12px 30px rgba(24, 24, 27, 0.2);
    transform: translate(-50%, 18px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
}

.app-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.app-toast.error {
    background: var(--primary-dark);
}

@media (min-width: 430px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card-body {
        padding: 12px 12px 14px;
    }

    .product-card-title {
        font-size: 0.91rem;
    }

    .product-card-description {
        font-size: 0.75rem;
    }

    .buy-card-button {
        min-width: 91px;
        padding-inline: 9px;
    }

    .product-price strong {
        font-size: 0.96rem;
    }
}

@media (max-width: 370px) {
    .intro-section {
        grid-template-columns: 1fr;
    }

    .intro-image-wrap {
        display: none;
    }

    .quantity-and-cart {
        grid-template-columns: 1fr;
    }

    .quantity-control {
        width: 130px;
    }

    .dialog-body {
        grid-template-columns: 1fr;
    }

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

@media (min-width: 481px) {
    #app-container {
        margin: 18px 0;
        min-height: calc(100vh - 36px);
        border-radius: 18px;
        overflow: hidden;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Overrides finales: la tienda ocupa la pantalla completa */
body{font-family:"DM Sans",sans-serif;background:linear-gradient(135deg,#fff9f0,#fff4f6 50%,#eff8f4)}
#app-container{width:100%;max-width:none;margin:0;border-radius:0;background:#fff9f0;box-shadow:none}
.app-header{padding:10px clamp(16px,4vw,64px)}.brand{max-width:min(62vw,470px);gap:11px}.brand img{width:56px;height:56px}.brand-copy{display:grid;line-height:1}.brand-copy strong{font-family:"Great Vibes",cursive;color:#8d4351;font-size:clamp(1.4rem,3vw,2rem);font-weight:400;white-space:nowrap}.brand-copy small{text-align:right;color:#7d6970;font-size:.72rem;font-weight:700;margin-top:5px}
.intro-section{background:linear-gradient(rgba(255,249,240,.86),rgba(255,244,246,.86)),url('../imagenes/background-app.png') center/cover}.intro-section h1,.catalog-heading h2,.detail-content h1,.related-section h2,.info-card h2{font-family:"Playfair Display",serif;color:#8d4351}
.app-footer{padding:20px clamp(18px,5vw,70px);display:flex;align-items:center;justify-content:center;gap:clamp(24px,5vw,70px);background:#142f47;color:#fff;text-align:left}.footer-brand{display:flex;align-items:center;gap:8px}.app-footer .footer-brand img{width:58px;height:58px;flex:0 0 58px}.footer-brand-copy{display:grid;gap:2px;line-height:1.05}.footer-brand strong{font-family:"Great Vibes",cursive;font-size:1.45rem;font-weight:400;white-space:nowrap}.footer-brand span{color:#fff;font-size:.78rem;font-weight:700;text-align:right}.app-footer small{text-align:center;color:#fff}.app-footer a{color:#edd27e}
@media(min-width:700px){main{width:min(1180px,100%);margin:0 auto}.intro-section{grid-template-columns:1.35fr .65fr;padding:40px;margin:28px 20px}.products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.detail-card{grid-template-columns:minmax(0,1fr) minmax(340px,.85fr)}.cart-drawer{top:50%;right:50%;bottom:auto;width:min(760px,calc(100vw - 48px));max-width:none;max-height:82vh;border-radius:24px;transform:translate(50%,-46%) scale(.96);opacity:0}.cart-drawer.open{transform:translate(50%,-50%) scale(1);opacity:1}.drawer-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
@media(min-width:1050px){.products-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:699px){.admin-access{display:none}.app-footer{flex-direction:column;gap:12px;padding:16px 12px;text-align:center}.footer-brand{justify-content:center;gap:6px}.app-footer .footer-brand img{width:54px;height:54px;flex-basis:54px}.footer-brand strong{font-size:1.35rem}.app-footer small{text-align:center}.brand-copy strong{font-size:1.3rem}}

/* Ajustes finales 2026-08-06. Cambia --brand-logo-size para ampliar el logo. */
:root{--brand-logo-size:64px;--nav-pink:rgb(255,220,223);--nav-pink-strong:rgb(250,195,202);--sophia-ink:#382b2f;--sophia-rose:#8d4351}
.app-header{min-height:82px;padding:9px clamp(16px,4vw,64px);background:var(--nav-pink);border-bottom:1px solid rgba(141,67,81,.22);box-shadow:0 7px 22px rgba(141,67,81,.1)}
.brand{display:flex;align-items:center;gap:9px;max-width:none;color:var(--sophia-ink);text-decoration:none}.brand img{width:var(--brand-logo-size);height:var(--brand-logo-size);flex:0 0 var(--brand-logo-size);object-fit:contain}.brand-copy{display:flex;flex-direction:column;align-items:flex-start;min-width:0}.brand-copy strong{display:block;color:var(--sophia-rose);font-family:"Great Vibes","Brush Script MT",cursive;font-size:clamp(1.55rem,2.6vw,2.15rem);font-weight:400;line-height:1;white-space:nowrap}.brand-copy small{display:block;width:100%;margin-top:5px;color:var(--sophia-ink);font-size:.76rem;font-weight:800;line-height:1;text-align:right;white-space:nowrap}
.header-actions{gap:10px}.header-action{width:46px;height:46px;border-color:rgba(141,67,81,.28);background:rgba(255,255,255,.88);color:var(--sophia-ink)}.header-action i{font-size:1.28rem}.header-action[data-open-cart] i{font-size:1.38rem}
.product-image-link,.main-product-image-wrap,.thumbnail-button,.cart-item img{background:#fff!important}.product-image-link{padding:12px}
.category-strip{display:flex;flex-wrap:nowrap;gap:9px;width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:3px 3px 12px;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:var(--primary-color) rgba(141,67,81,.1);overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}.category-strip::-webkit-scrollbar{display:block;height:5px}.category-strip::-webkit-scrollbar-track{background:rgba(141,67,81,.08);border-radius:999px}.category-strip::-webkit-scrollbar-thumb{background:var(--primary-color);border-radius:999px}.category-chip{flex:0 0 auto;scroll-snap-align:start}
.remove-cart-item{width:38px;height:38px;display:grid;place-items:center;border:1px solid rgba(141,67,81,.26);border-radius:10px;background:#fff4f6;color:var(--sophia-rose)}.remove-cart-item i{display:block;font-size:1.05rem;line-height:1}.remove-cart-item:hover{background:var(--sophia-rose);color:#fff}
.app-footer{padding:16px clamp(16px,4vw,56px);display:flex;align-items:center;justify-content:center;gap:clamp(22px,4vw,55px);background:var(--nav-pink);border-top:1px solid rgba(141,67,81,.24);color:var(--sophia-ink);box-shadow:0 -7px 22px rgba(141,67,81,.08)}.app-footer .footer-brand{display:flex;align-items:center;gap:7px}.app-footer .footer-brand img{width:58px;height:58px;flex:0 0 58px}.footer-brand-copy{display:flex;flex-direction:column;align-items:flex-start;line-height:1}.footer-brand strong{color:var(--sophia-rose);font-family:"Great Vibes","Brush Script MT",cursive;font-size:1.5rem;font-weight:400;white-space:nowrap}.footer-brand span{width:100%;margin-top:4px;color:var(--sophia-ink);font-size:.72rem;font-weight:800;text-align:right}.app-footer small{color:var(--sophia-ink);font-size:.74rem;line-height:1.55;text-align:center}.app-footer a{color:var(--sophia-rose);font-weight:800}
@media(min-width:700px){.cart-drawer{position:fixed!important;z-index:110;top:50%!important;bottom:auto!important;left:50%!important;right:auto!important;width:min(720px,calc(100vw - 48px))!important;height:min(720px,calc(100dvh - 64px));max-width:720px!important;max-height:calc(100dvh - 64px)!important;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;border:1px solid rgba(141,67,81,.22);border-radius:24px;box-shadow:0 30px 90px rgba(56,43,47,.28);opacity:0;transform:translate(-50%,-47%) scale(.97)!important;pointer-events:none;transition:opacity .2s ease,transform .2s ease}.cart-drawer.open{opacity:1;transform:translate(-50%,-50%) scale(1)!important;pointer-events:auto}.drawer-header{padding:20px 24px;background:var(--nav-pink)}.drawer-body{display:block!important;padding:14px 24px;overflow-y:auto}.cart-item{grid-template-columns:86px minmax(0,1fr) 42px;gap:14px;padding:14px 0}.cart-item img{width:86px;height:86px}.drawer-summary{padding:18px 24px;background:#fff;border-radius:0}.ui-overlay{background:rgba(56,43,47,.46);backdrop-filter:blur(5px)}}
@media(max-width:699px){:root{--brand-logo-size:58px}.app-header{padding:8px 10px}.brand{gap:6px;min-width:0}.brand-copy strong{font-size:clamp(1.28rem,6vw,1.65rem)}.brand-copy small{font-size:.67rem}.header-actions{gap:7px}.header-action{width:42px;height:42px}.app-footer{flex-direction:column;gap:9px;padding:13px 10px}.app-footer .footer-brand{gap:5px}.app-footer .footer-brand img{width:52px;height:52px;flex-basis:52px}.footer-brand strong{font-size:1.3rem}.cart-drawer{right:0;width:min(420px,100vw)}.category-strip{margin-right:-14px;padding-right:22px}}
