/* ============================================================
   DULCEMORA — Public Styles
   Minimalista · Elegante · Mobile-first
   ============================================================ */

/* --- CUSTOM PROPERTIES --- */
:root {
    --clr-bg:           #FAF6F1;
    --clr-bg-alt:       #F2EBE1;
    --clr-surface:      #FFFFFF;
    --clr-text:         #2C1810;
    --clr-text-mid:     #6B4F3A;
    --clr-text-muted:   #9B8578;
    --clr-accent:       #B8860B;
    --clr-accent-hover: #9A7209;
    --clr-gold-light:   #D4A843;
    --clr-border:       #E8DFD5;
    --clr-hero:         #1A0F0A;
    --clr-hero-overlay: rgba(26, 15, 10, 0.82);
    --clr-whatsapp:     #25D366;
    --clr-whatsapp-h:   #1DA851;
    --clr-error:        #C0392B;
    --clr-skeleton:     #E8DFD5;

    --ff-heading: 'Playfair Display', Georgia, serif;
    --ff-body:    'Inter', -apple-system, sans-serif;

    --radius:     12px;
    --radius-sm:  8px;
    --radius-xs:  6px;
    --shadow-sm:  0 2px 8px rgba(44,24,16,.06);
    --shadow-md:  0 4px 20px rgba(44,24,16,.10);
    --shadow-lg:  0 8px 40px rgba(44,24,16,.14);
    --ease:       cubic-bezier(.4,0,.2,1);
    --transition: .3s var(--ease);
}

/* --- RESET --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ff-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--clr-text);
    background: var(--clr-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* --- LAYOUT --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-family: var(--ff-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--transition);
    white-space: nowrap;
    text-align: center;
    line-height: 1;
}

.btn__icon {
    flex-shrink: 0;
}

.btn--primary {
    background: var(--clr-whatsapp);
    color: #fff;
}
.btn--primary:hover {
    background: var(--clr-whatsapp-h);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37,211,102,.35);
}

.btn--secondary {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(4px);
}
.btn--secondary:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.4);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: var(--clr-accent);
    border: 2px solid var(--clr-accent);
}
.btn--outline:hover {
    background: var(--clr-accent);
    color: #fff;
    transform: translateY(-2px);
}

.btn--gold {
    background: linear-gradient(135deg, var(--clr-accent), var(--clr-gold-light));
    color: #fff;
}
.btn--gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(184,134,11,.4);
}

.btn--full {
    width: 100%;
}

.btn--small {
    padding: 10px 20px;
    font-size: .85rem;
    border-radius: var(--radius-sm);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--clr-hero);
    overflow: hidden;
    text-align: center;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(184,134,11,.08) 0%, transparent 70%),
        linear-gradient(180deg, rgba(26,15,10,.3) 0%, rgba(26,15,10,0) 40%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    padding: 40px 24px;
}

.hero__brand {
    font-size: 1.8rem;
    color: var(--clr-accent);
    margin-bottom: 16px;
    letter-spacing: .1em;
}

.hero__title {
    font-family: var(--ff-heading);
    font-size: clamp(2.4rem, 8vw, 4.2rem);
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero__subtitle {
    font-size: clamp(.9rem, 2.5vw, 1.1rem);
    font-weight: 300;
    color: rgba(255,255,255,.7);
    line-height: 1.7;
    max-width: 440px;
    margin: 0 auto 36px;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

@media (min-width: 480px) {
    .hero__actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: 56px 0;
}

.section--tiktok {
    background: var(--clr-bg);
}

.section--catalog {
    background: var(--clr-bg-alt);
}

.section__header {
    text-align: center;
    margin-bottom: 36px;
}

.section__badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--clr-accent);
    color: #fff;
    margin-bottom: 12px;
}

.section__title {
    font-family: var(--ff-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--clr-text);
    margin-bottom: 8px;
}

.section__desc {
    font-size: .95rem;
    color: var(--clr-text-muted);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--clr-text-muted);
    font-style: italic;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 960px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-card {
    background: var(--clr-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

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

.product-card__image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--clr-bg-alt);
    cursor: pointer;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

.product-card:hover .product-card__image {
    transform: scale(1.04);
}

.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: var(--clr-accent);
    color: #fff;
}

.product-card__body {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card__name {
    font-family: var(--ff-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--clr-text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.load-more-wrap {
    text-align: center;
    padding: 20px 20px 40px;
}

.section-more {
    text-align: center;
    padding: 20px 0 8px;
}

.product-card__price {
    font-size: .9rem;
    font-weight: 600;
    color: var(--clr-accent);
    margin-bottom: 14px;
}

.product-card__actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================================
   SKELETON LOADERS
   ============================================================ */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

.skeleton-card {
    background: var(--clr-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: var(--clr-skeleton);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-body {
    padding: 14px 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: var(--clr-skeleton);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line--full  { width: 100%; }
.skeleton-line--short { width: 55%; }
.skeleton-line--medium { width: 75%; }

/* ============================================================
   DIGITAL BANNER
   ============================================================ */
.digital-banner {
    border-radius: var(--radius);
    background: var(--clr-hero);
    padding: 48px 28px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.digital-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 80% at 50% 20%, rgba(184,134,11,.12) 0%, transparent 70%);
    pointer-events: none;
}

.digital-banner__content {
    position: relative;
    z-index: 1;
}

.digital-banner__badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: rgba(184,134,11,.2);
    color: var(--clr-gold-light);
    margin-bottom: 16px;
}

.digital-banner__title {
    font-family: var(--ff-heading);
    font-size: clamp(1.4rem, 4vw, 2rem);
    color: #fff;
    margin-bottom: 12px;
}

.digital-banner__text {
    font-size: .95rem;
    color: rgba(255,255,255,.65);
    max-width: 480px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
}

.modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26,15,10,.6);
    backdrop-filter: blur(6px);
}

.modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--clr-surface);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 32px 24px 28px;
    transform: translateY(100%);
    transition: transform .4s var(--ease);
}

.modal[aria-hidden="false"] .modal__panel {
    transform: translateY(0);
}

@media (min-width: 540px) {
    .modal {
        align-items: center;
    }
    .modal__panel {
        border-radius: var(--radius);
        transform: translateY(20px) scale(.96);
    }
    .modal[aria-hidden="false"] .modal__panel {
        transform: translateY(0) scale(1);
    }
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.6rem;
    color: var(--clr-text-muted);
    transition: color var(--transition);
    line-height: 1;
}
.modal__close:hover { color: var(--clr-text); }

.modal__title {
    font-family: var(--ff-heading);
    font-size: 1.3rem;
    color: var(--clr-text);
    margin-bottom: 8px;
}

.modal__text {
    font-size: .9rem;
    color: var(--clr-text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal__input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-family: var(--ff-body);
    font-size: .95rem;
    color: var(--clr-text);
    background: var(--clr-bg);
    transition: border-color var(--transition);
    outline: none;
}
.modal__input:focus {
    border-color: var(--clr-accent);
}
.modal__input::placeholder {
    color: var(--clr-text-muted);
}

.modal__success {
    text-align: center;
    font-size: .95rem;
    font-weight: 500;
    color: var(--clr-whatsapp);
    margin-top: 8px;
}

.modal__error {
    text-align: center;
    font-size: .9rem;
    color: var(--clr-error);
    margin-top: 8px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--clr-border);
}

.footer__brand {
    font-family: var(--ff-heading);
    font-size: 1rem;
    color: var(--clr-text-mid);
    margin-bottom: 4px;
}

.footer__copy {
    font-size: .78rem;
    color: var(--clr-text-muted);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox[aria-hidden="false"] {
    display: flex;
}
.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.85);
    cursor: pointer;
}
.lightbox__img {
    position: relative;
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    z-index: 1;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: background .2s;
}
.lightbox__close:hover {
    background: rgba(255,255,255,.15);
}

/* ============================================================
   UTILITIES
   ============================================================ */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
