/* _shared.css — Design tokens & shared components for Fábrica de Delícias */

:root {
    --verde-floresta: #1A4332;
    --laranja-abobora: #F28C38;
    --marrom-cafe: #5D2E17;
    --branco: #FFFFFF;
}
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
    font-family: 'DM Sans', sans-serif;
    background-color: #fcfcfc;
    overflow-x: hidden;
    font-size: 15px;
}
body.menu-open { overflow: hidden; }

:focus-visible { outline: 2px solid var(--laranja-abobora); outline-offset: 3px; border-radius: 6px; }
button:focus-visible, a:focus-visible { outline-offset: 4px; }

.font-script { font-family: 'DM Serif Display', cursive; }
.bg-verde { background-color: var(--verde-floresta); }
.bg-laranja { background-color: var(--laranja-abobora); }
.text-verde { color: var(--verde-floresta); }
.text-laranja { color: var(--laranja-abobora); }
.border-verde { border-color: var(--verde-floresta); }
.border-laranja { border-color: var(--laranja-abobora); }
.hover\:bg-laranja:hover { background-color: var(--laranja-abobora); }
.hover\:bg-verde:hover { background-color: var(--verde-floresta); }
.hover\:text-laranja:hover { color: var(--laranja-abobora); }
.hover\:text-verde:hover { color: var(--verde-floresta); }

/* Card hover */
.card-hover:hover {
    transform: translateY(-8px);
    transition: all 0.3s ease;
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.1);
}

.animate-float { animation: float 3s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Section padding */
.section-padding { padding-left: 1.5rem; padding-right: 1.5rem; }
@media (min-width: 1024px) { .section-padding { padding-left: 8%; padding-right: 8%; } }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--laranja-abobora); border-radius: 10px; }

/* Scroll progress bar */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px;
    width: 0%; background: var(--laranja-abobora);
    z-index: 100; transition: width .15s ease-out;
    box-shadow: 0 0 8px rgba(242,140,56,.6);
}

/* Floating WhatsApp button */
#fab-whatsapp {
    position: fixed; right: 20px; bottom: 92px; z-index: 90;
    width: 60px; height: 60px; border-radius: 50%;
    background: #25D366; color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5);
    animation: waPulse 2.4s infinite;
    transition: transform .2s;
}
#fab-whatsapp:hover { transform: scale(1.08); }
@keyframes waPulse {
    0%   { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.45); }
    70%  { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0); }
    100% { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width: 640px) {
    #fab-whatsapp { right: 14px; bottom: 80px; width: 54px; height: 54px; }
}

/* Back to top */
#back-to-top {
    position: fixed; right: 20px; bottom: 22px; z-index: 90;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--verde-floresta); color: var(--laranja-abobora);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 22px rgba(26,67,50,.35);
    opacity: 0; visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s, transform .25s, visibility .25s;
}
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 640px) {
    #back-to-top { right: 14px; bottom: 18px; width: 44px; height: 44px; }
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .35s ease, opacity .25s ease;
}
#mobile-menu.open { max-height: 80vh; opacity: 1; }

/* Active nav link */
nav a.is-current { color: var(--laranja-abobora); }

/* Cart bump animation */
@keyframes cartBump {
    0% { transform: scale(1); }
    40% { transform: scale(1.25); }
    100% { transform: scale(1); }
}
.cart-bump { animation: cartBump .35s cubic-bezier(.2,.7,.3,1.6); }

/* Card 'added' feedback */
.add-pulse { animation: addPulse .5s ease; }
@keyframes addPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(.85); background: var(--laranja-abobora) !important; }
    100% { transform: scale(1); }
}

/* Status pill */
.status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 999px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
}
.status-pill.pending  { background: #fef3c7; color: #92400e; }
.status-pill.preparing{ background: #fed7aa; color: #9a3412; }
.status-pill.shipping { background: #dbeafe; color: #1e40af; }
.status-pill.delivered{ background: #d1fae5; color: #065f46; }
.status-pill.canceled { background: #fee2e2; color: #991b1b; }

/* Step indicator */
.step-dot {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    background: #f3f4f6; color: #9ca3af;
    border: 3px solid #fcfcfc;
}
.step-dot.done   { background: var(--verde-floresta); color: var(--laranja-abobora); }
.step-dot.active { background: var(--laranja-abobora); color: #fff; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    html { scroll-behavior: auto; }
}
