@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary: #facc15;
    --dark: #18181b;
}

body {
    font-family: 'Roboto', sans-serif;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.font-brand {
    font-family: 'Oswald', sans-serif;
}

/* One sticky surface keeps the banner and menu together during momentum scrolling. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header > .site-header-nav {
    position: relative;
}

/* BANNER COM EFEITO DE REVELAÇÃO LETRA POR LETRA */
.delivery-banner {
    position: relative;
    overflow: hidden;
    background-color: #facc15;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animation-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 40px;
}

.delivery-text-container {
    position: relative;
    width: 100%;
    text-align: center;
    color: black;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    mask-image: linear-gradient(to right, black var(--progress, 0%), transparent var(--progress, 0%));
    -webkit-mask-image: linear-gradient(to right, black var(--progress, 0%), transparent var(--progress, 0%));
    animation: reveal-progress 6s linear infinite;
}

.truck-icon {
    position: absolute;
    left: 0;
    font-size: 20px;
    z-index: 10;
    transform: translateX(-50%) rotate(-90deg);
    animation: truck-progress 6s linear infinite, chomp 0.5s infinite;
    pointer-events: none;
    display: inline-block;
}

@keyframes reveal-progress {
    0%, 10% { --progress: 0%; }
    80%, 100% { --progress: 100%; }
}

@keyframes truck-progress {
    0%, 10% { left: 0%; opacity: 0; }
    11% { opacity: 1; }
    80% { left: 100%; opacity: 1; }
    81%, 100% { left: 100%; opacity: 0; }
}

@keyframes chomp {
    0% { transform: translateX(-50%) rotate(-90deg) scale(1); }
    50% { transform: translateX(-50%) rotate(-90deg) scale(1.2); }
    100% { transform: translateX(-50%) rotate(-90deg) scale(1); }
}

@property --progress {
    syntax: '<percentage>';
    initial-value: 0%;
    inherits: false;
}

@media (min-width: 640px) {
    .delivery-text-container { font-size: 13px; }
    .delivery-banner { height: 42px; }
    body { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
}

/* Customizações de UI */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.product-card { transition: all 0.3s ease; }
#cart-sidebar { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none; margin: 0;
}

body.trial-gift-lock { overflow: hidden; }

.trial-gift-overlay {
    --gift-gold: #eab308;
    --gift-ink: #272329;
    background: rgba(13, 12, 17, .8);
    backdrop-filter: blur(10px);
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    animation: trial-gift-fade-in 220ms ease-out;
}
.trial-gift-panel {
    position: relative;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 26px;
    border-color: #f0e6c5;
    background: radial-gradient(ellipse at 50% 38%, #fff8df, #fff 65%);
    animation: trial-gift-panel-in 360ms cubic-bezier(.16, 1, .3, 1);
}
.trial-gift-content { position: relative; z-index: 2; padding: 26px 24px; text-align: center; }
.trial-gift-kicker {
    display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px;
    border-radius: 999px; background: #fef3c7; color: #854d0e;
    font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    margin-bottom: 12px;
}
.trial-gift-intro { margin-top: 12px; color: #5b5a61; font-size: 15px; line-height: 1.6; }
.trial-gift-open-button {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 240px; max-width: 100%; height: 220px; margin: 16px auto 4px;
    border: 0; border-radius: 20px; padding: 0; background: transparent; cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.trial-gift-open-button:disabled { opacity: 1; cursor: default; }
.trial-gift-box { position: relative; display: block; width: 240px; height: 220px; flex: 0 0 240px; isolation: isolate; }
.trial-gift-box::after {
    content: ''; position: absolute; left: 38px; bottom: 3px; width: 164px; height: 20px;
    border-radius: 50%; background: radial-gradient(ellipse, rgba(54, 36, 7, .22), transparent 70%); z-index: -1;
}
.trial-gift-base, .trial-gift-lid {
    position: absolute; border: 1px solid #c58d0b;
    background: linear-gradient(110deg, #ffe999 0%, #ffd43c 48%, #efb719 78%, #d99b0d 100%);
}
.trial-gift-base {
    left: 52px; bottom: 18px; width: 136px; height: 106px; z-index: 3;
    border-radius: 4px 4px 12px 12px; overflow: hidden;
    box-shadow: inset 2px 0 2px #fff3bf, inset -12px 0 12px #c58d0b30, 0 14px 26px #74500d26;
}
.trial-gift-base::after {
    content: ''; position: absolute; inset: 0 0 0 auto; width: 17px;
    background: linear-gradient(90deg, transparent, #a86c1333); border-left: 1px solid #ffeb9b55;
}
.trial-gift-lid {
    left: 43px; top: 76px; width: 154px; height: 32px; z-index: 5;
    border-radius: 6px; transform-origin: 25% 100%;
    box-shadow: inset 0 2px 1px #fff6cb, inset 0 -5px 0 #b7791326, 0 5px 8px #5f41062b;
}
.trial-gift-lid::after {
    content: ''; position: absolute; left: 65px; top: 0; bottom: 0; width: 22px;
    background: linear-gradient(90deg, #19171c, #49404a 48%, #242027);
}
.trial-gift-ribbon-vertical {
    position: absolute; top: 0; bottom: 0; left: 56px; width: 22px;
    background: linear-gradient(90deg, #211e25, #4b424c 45%, #242027);
    box-shadow: 1px 0 0 #fff4ca44, -1px 0 0 #a36f1c44;
}
.trial-gift-bow {
    position: absolute; top: -28px; width: 40px; height: 30px;
    border: 8px solid #302931; background: #f8d26e;
    box-shadow: inset 0 2px 2px #0003, 0 1px 1px #fff7;
}
.trial-gift-bow-left { left: 36px; border-radius: 60% 65% 25% 55%; transform: rotate(24deg); }
.trial-gift-bow-right { right: 36px; border-radius: 65% 60% 55% 25%; transform: rotate(-24deg); }
.trial-gift-knot {
    position: absolute; z-index: 2; left: 66px; top: -10px; width: 20px; height: 18px;
    border-radius: 6px; background: linear-gradient(110deg, #514553, #231e26); box-shadow: 0 2px 3px #0003;
}
.trial-gift-seal {
    position: absolute; left: 56px; bottom: 17px; width: 23px; height: 23px; padding: 5px;
    border-radius: 50%; color: #4b3211; background: linear-gradient(130deg, #fff0a7, #dfad31);
    box-shadow: 0 1px 3px #0004;
}
.trial-gift-seal svg { display: block; width: 100%; height: 100%; }
.trial-gift-interior {
    position: absolute; z-index: 2; left: 53px; top: 88px; width: 134px; height: 22px;
    border-radius: 50%; background: #684714; box-shadow: inset 0 0 10px #221402; opacity: 0;
}
.trial-gift-glow {
    position: absolute; z-index: 1; left: 22px; top: 22px; width: 196px; height: 160px;
    background: radial-gradient(ellipse at 50% 65%, #ffdb62bf, #fff0b54d 40%, transparent 70%);
    opacity: 0; transform: scale(.6); pointer-events: none;
}
.trial-gift-action-button {
    display: block; width: 100%; min-height: 48px; padding: 14px 20px; border-radius: 12px;
    background: #18181b; color: #fff; font-size: 14px; font-weight: 700;
    box-shadow: 0 7px 16px #18181b1a; cursor: pointer; touch-action: manipulation;
    transition: background-color 160ms ease;
}
.trial-gift-action-button.hidden { display: none; }
.trial-gift-action-button:hover { background: #343039; }
.trial-gift-action-button:disabled { opacity: .65; cursor: wait; }
.trial-gift-status { margin-top: 12px; min-height: 20px; color: #68636d; font-size: 12px; line-height: 1.5; }
.trial-gift-result { margin-top: 18px; border-top: 1px solid #eee5cd; padding-top: 18px; }
.trial-gift-result-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: #854d0e; }
.trial-gift-result .trial-gift-action-button { margin-top: 16px; }
.trial-gift-opening .trial-gift-box { animation: trial-gift-anticipation 700ms ease-in-out; }
.trial-gift-opened .trial-gift-lid {
    transform: translate(-16px, -45px) rotate(-17deg);
    animation: trial-gift-lift 850ms cubic-bezier(.2, .75, .25, 1) both;
}
.trial-gift-opened .trial-gift-base { animation: trial-gift-settle 650ms ease-out both; }
.trial-gift-opened .trial-gift-glow { opacity: 1; transform: scale(1); transition: opacity 500ms ease, transform 700ms ease; }
.trial-gift-opened .trial-gift-interior { opacity: 1; }
.trial-gift-revealed .trial-gift-result { animation: trial-gift-result-in 420ms ease-out both; }
.trial-gift-confetti { position: absolute; z-index: 3; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.trial-gift-confetti span {
    position: absolute; top: 45%; left: 50%; width: 6px; height: 11px;
    border-radius: 2px; background: #eab308; opacity: 0;
}
.trial-gift-confetti span:nth-child(3n) { background: #fff0b5; width: 8px; height: 8px; }
.trial-gift-confetti span:nth-child(3n + 1) { background: #887046; }
.trial-gift-opened .trial-gift-confetti span { animation: trial-gift-confetti 1300ms ease-out both; animation-delay: var(--delay); }
@keyframes trial-gift-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes trial-gift-panel-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes trial-gift-anticipation {
    0%, 100% { transform: translateY(0) rotate(0); }
    20% { transform: translateY(-4px) rotate(-4deg); }
    40% { transform: translateY(-4px) rotate(4deg); }
    60% { transform: translateY(-7px) rotate(-5deg); }
    80% { transform: translateY(-3px) rotate(3deg); }
}
@keyframes trial-gift-lift {
    0% { transform: translate(0, 0) rotate(0); }
    50% { transform: translate(-12px, -64px) rotate(-23deg); }
    78% { transform: translate(-17px, -40px) rotate(-14deg); }
    100% { transform: translate(-16px, -45px) rotate(-17deg); }
}
@keyframes trial-gift-settle { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(5px) scale(1.025, .96); } }
@keyframes trial-gift-result-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes trial-gift-confetti {
    0% { opacity: 0; transform: translate(-50%, 0) rotate(var(--start-r)) scale(.5); }
    15% { opacity: 1; }
    65% { opacity: 1; transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(var(--y) + 100px)) rotate(var(--r)); }
}
@media (max-height: 740px) {
    .trial-gift-content { padding: 20px; }
    .trial-gift-open-button { height: 186px; margin-top: 8px; }
    .trial-gift-box { scale: .85; }
}
@media (prefers-reduced-motion: reduce) {
    .trial-gift-overlay, .trial-gift-panel, .trial-gift-box, .trial-gift-lid, .trial-gift-base,
    .trial-gift-glow, .trial-gift-result, .trial-gift-confetti span { animation: none !important; transition: none !important; }
    .trial-gift-confetti { display: none; }
}
