
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Source+Serif+4:wght@500;600;700&display=swap');

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

:root {
    --bg: #f5f7fb;
    --bg-warm: #fffaf1;
    --bg-cool: #eef4fb;
    --bg-card: #ffffff;
    --surface: #f1f5f9;
    --surface-2: #dbe4ee;

    --coral: #ffc53f;
    --coral-light: #e8ca7d;
    --coral-glow: rgba(212, 167, 61, 0.14);
    --violet: #183a63;
    --violet-light: #2f5d8a;
    --violet-glow: rgba(24, 58, 99, 0.10);
    --teal: #587b9d;
    --teal-light: #8faac4;
    --teal-glow: rgba(88, 123, 157, 0.12);
    --amber: #dfb552;
    --amber-light: #efd58c;
    --amber-glow: rgba(223, 181, 82, 0.16);
    --rose: #6f86a0;
    --rose-light: #a7b7c8;
    --sky: #496d94;
    --sky-light: #b7cadf;

    --text: #142436;
    --text-secondary: #445467;
    --text-muted: #6d7c8d;

    --border: rgba(20, 36, 54, 0.08);
    --border-hover: rgba(20, 36, 54, 0.14);

    --shadow-sm: 0 2px 8px rgba(15, 35, 58, 0.05);
    --shadow: 0 10px 28px rgba(15, 35, 58, 0.08);
    --shadow-lg: 0 18px 44px rgba(15, 35, 58, 0.12);
    --shadow-color: 0 10px 24px rgba(212, 167, 61, 0.18);
    --shadow-violet: 0 10px 24px rgba(24, 58, 99, 0.18);

    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;

    --font-display: 'Source Serif 4', serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Inter', sans-serif;
}

html { scroll-behavior:smooth; }

body.site-body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.site-body::before {
    content:'';
    position:fixed;
    top:-20%;
    right:-15%;
    width:44vw;
    height:44vw;
    background: radial-gradient(circle, rgba(24, 58, 99, 0.06) 0%, rgba(24, 58, 99, 0.02) 42%, transparent 72%);
    pointer-events:none;
    z-index:0;
}
body.site-body::after {
    content:'';
    position:fixed;
    bottom:-22%;
    left:-16%;
    width:40vw;
    height:40vw;
    background: radial-gradient(circle, rgba(225, 203, 138, 0.08) 0%, rgba(225, 203, 138, 0.03) 42%, transparent 72%);
    pointer-events:none;
    z-index:0;
}

a { color:inherit; text-decoration:none; transition: color .25s ease; }
img { max-width:100%; display:block; }

.site-main {
    position:relative; z-index:1;
    width: min(1260px, calc(100% - 40px));
    margin:0 auto; padding:12px 0 100px;
}

h1,h2,h3 {
    font-family: var(--font-display);
    font-weight:600;
    line-height:1.12;
    color: var(--text);
}

.eyebrow {
    display:inline-flex; align-items:center; gap:8px;
    margin-bottom:12px;
    font-family: var(--font-accent);
    font-size:.8rem; font-weight:700;
    letter-spacing:.10em; text-transform:uppercase;
    color: var(--violet);
    background: rgba(24, 58, 99, 0.06);
    border: 1px solid rgba(24, 58, 99, 0.10);
    padding: 6px 14px;
    border-radius: 999px;
}

.section-head {
    display:flex; align-items:end; justify-content:space-between;
    gap:20px; margin-bottom:36px;
}
.section-head h1, .section-head h2 {
    font-size: clamp(2rem, 4vw, 3.1rem); line-height:1.08;
}

.section-link {
    font-family: var(--font-accent);
    font-size:.9rem; font-weight:600;
    color: var(--violet);
    position:relative; padding:8px 18px;
    border:1px solid rgba(24, 58, 99, 0.16);
    border-radius:999px;
    background: #fff;
    transition: all .25s ease;
}
.section-link:hover {
    background: var(--violet);
    color:#fff;
    border-color: var(--violet);
    transform:translateY(-1px);
}

.seccion { margin-top:80px; }

.card, .empty-state, .vacio-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform .3s ease, box-shadow .3s ease;
}
.vacio-box { padding:48px; text-align:center; color:var(--text-secondary); }

.site-messages {
    position:relative; z-index:1;
    width: min(1260px, calc(100% - 40px));
    margin:16px auto 0; display:grid; gap:10px;
}
.alert {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    padding:16px 22px; border-radius:var(--radius);
    font-weight:600; font-size:.92rem;
    border-left:4px solid;
    opacity:1;
    transform:translateY(0);
    transition: opacity .3s ease, transform .3s ease, max-height .3s ease, margin .3s ease, padding .3s ease;
}
.alert-success { background:#eef7f1; color:#295d4f; border-color:#4f8a72; }
.alert-error   { background:#fdf1ef; color:#9a3d32; border-color:#c46b5d; }
.alert-warning { background:#fff9ee; color:#8a6a1f; border-color:#e1cb8a; }
.alert-info    { background:#eef4fb; color:#1f4b7a; border-color:#496d94; }
.alert.is-hiding {
    opacity:0;
    transform:translateY(-8px);
    max-height:0;
    margin:0;
    padding-top:0;
    padding-bottom:0;
    overflow:hidden;
}
.alert-close {
    border:none;
    background:transparent;
    color:inherit;
    cursor:pointer;
    font-size:1.2rem;
    line-height:1;
    opacity:.75;
}
.alert-close:hover { opacity:1; }

.btn_card_link,.btn-card,.section-link,.btn_hero,.btn_comprar,
.btn_carrito,.btn-volver,.btn-vaciar,.btn-login,.actions button,.secondary {
    transition: all .25s ease;
}

@keyframes fadeInUp {
    from { opacity:0; transform:translateY(40px); }
    to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes slideUp {
    from { opacity:0; transform:translateY(60px) scale(0.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes popIn {
    0% { opacity:0; transform:scale(0.85); }
    70% { transform:scale(1.02); }
    100% { opacity:1; transform:scale(1); }
}

::-webkit-scrollbar { width:8px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--violet-light); border-radius:99px; }
::-webkit-scrollbar-thumb:hover { background:var(--violet); }

@media(max-width:720px){
    .site-main,.site-messages{ width:calc(100% - 24px); }
    .section-head{ align-items:flex-start; flex-direction:column; }
    .seccion{ margin-top:50px; }
}

.inline-create-box {
    border: 1px solid rgba(20,36,54,.08);
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(24,58,99,.03);
}

.inline-create-box summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--violet);
    list-style: none;
}
.inline-create-box summary::-webkit-details-marker { display:none; }
.inline-create-box[open] summary { margin-bottom: 12px; }
.inline-category-form,
.category-manage-form {
    display:grid;
    gap:12px;
}
.form-errors {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff4f4;
    color: #9f1239;
    border: 1px solid rgba(244,63,94,.15);
    display:grid;
    gap:6px;
}
.categoria-manage-card img {
    height: 180px;
}


/* Imágenes completas en cards y vistas de producto */
.img-complete,
.image-fit-contain {
    object-fit: contain !important;
    object-position: center !important;
    background: #f8fafc;
}
