:root { 
    --bg: #f8fafc; 
    --surface: #ffffff; 
    --surface-alt: #f1f5f9;
    --text: #334155; 
    --text-strong: #0f172a;
    --muted: #64748b; 
    --accent: #6366f1; 
    --accent-dark: #4f46e5; 
    --border: #e2e8f0; 
    --shadow-md: 0 10px 25px rgba(0,0,0,0.05);
}

html { scroll-restoration: manual; }

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', sans-serif; background: #eef2f6; color: var(--text); line-height: 1.5; overflow-x: hidden; }

.container { max-width: 480px; margin: 0 auto; background: var(--surface); min-height: 100vh; position: relative; box-shadow: 0 0 40px rgba(0,0,0,0.03); }

/* ОНОВЛЕНИЙ HEADER У СТИЛІ САЙТУ */
.main-header { 
    position: relative; /* Не фіксується при скролі */
    padding: 22px 15px; 
    background: var(--surface); /* Фірмовий білий фон */
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 32px 32px; /* М'яке заокруглення, як у карток в каталозі */
    box-shadow: var(--shadow-md); /* Фірмова легка тінь */
    text-align: center; 
    margin-bottom: -5px; /* Щоб блок з подарунком акуратно лягав під хедер */
    z-index: 10;
}

.logo { 
    font-weight: 900; 
    font-size: 20px; 
    letter-spacing: 0.5px; 
    text-transform: uppercase; 
    color: var(--text-strong); /* Темний контрастний колір */
    display: inline-block;
    animation: pulsePromo 2.5s infinite ease-in-out; /* Плавна анімація */
}

/* Анімація: легке збільшення та перехід у фірмовий колір */
@keyframes pulsePromo {
    0% { transform: scale(1); color: var(--text-strong); }
    50% { transform: scale(1.03); color: var(--accent); } 
    100% { transform: scale(1); color: var(--text-strong); }
}

/* PROMO */
.gift-wrapper { padding: 12px 15px; }
.gold-promo { 
    background: linear-gradient(135deg, #e0e7ff 0%, #eef2ff 100%); 
    color: #3730a3; border: 1px solid #c7d2fe; 
    padding: 16px; border-radius: 18px; text-align: center; 
    font-size: 13px; font-weight: 800; text-transform: uppercase; 
    letter-spacing: 0.5px; position: relative; overflow: hidden;
    box-shadow: var(--shadow-md);
}
.gold-promo::after { 
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; 
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%); 
    transform: rotate(30deg); animation: shimmer 4s infinite; 
}
@keyframes shimmer { 0% { transform: translateX(-100%) rotate(30deg); } 100% { transform: translateX(100%) rotate(30deg); } }

/* HERO SLIDER */
.hero { padding: 0 15px; box-sizing: border-box; }
#heroSlider, #heroSlider2 { 
    display: block; width: 100%; 
    overflow: hidden; border-radius: 24px; border: 1px solid var(--border);
    background: var(--surface-alt); box-shadow: var(--shadow-md);
}
#heroSlider .slider-item img, #heroSlider2 .slider-item img { width: 100%; height: auto; display: block; }

/* PRICE BOX */
.price-section { padding: 15px; }
.price-box { 
    display: flex; align-items: center; justify-content: space-between; 
    background: var(--surface-alt); border: 1px solid var(--border); 
    padding: 22px; border-radius: 24px; 
}
.price-old-val { color: var(--muted); text-decoration: line-through; font-weight: 700; font-size: 18px; }
.price-new-val { color: var(--text-strong); font-size: 36px; font-weight: 900; letter-spacing: -1px; }
.price-disc { background: var(--accent); color: #fff; font-weight: 900; font-size: 19px; padding: 7px 12px; border-radius: 12px; }

/* КНОПКИ ЗАМОВЛЕННЯ */
.btn-order-main, .btn-send, .btn-calc { 
    width: 100%; padding: 22px; 
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); 
    color: #fff; border: none; font-weight: 900; text-transform: uppercase; 
    border-radius: 20px; box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3); 
    cursor: pointer; margin-top: 10px; 
}

/* TIMER */
.timer-wrap { display: flex; align-items: center; justify-content: space-between; background: #fff; padding: 18px 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
#timer { font-size: 24px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.timer-lbl { font-size: 12px; text-transform: uppercase; color: var(--muted); font-weight: 800; }

/* TRUST FEATURES */
.trust-features { padding: 30px 20px; display: flex; flex-direction: column; gap: 20px; }
.trust-item { display: flex; align-items: center; gap: 16px; }
.trust-icon { width: 38px; height: 38px; fill: var(--accent); background: #eef2ff; padding: 9px; border-radius: 14px; flex-shrink: 0; }
.trust-text h4 { font-size: 15px; font-weight: 800; color: var(--text-strong); text-transform: uppercase; margin-bottom: 2px; }
.trust-text p { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* CHARACTERISTICS */
.chars-box { margin: 15px 15px 25px; padding: 25px; border-radius: 24px; background: var(--surface-alt); border: 1px solid var(--border); }
.chars-title { text-align: center; text-transform: uppercase; font-size: 16px; font-weight: 900; color: var(--accent); margin-bottom: 20px; }
.char-item { display: flex; justify-content: space-between; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.char-item:last-child { border-bottom: none; }
.char-name { color: var(--muted); font-weight: 700; }
.char-val { font-weight: 800; color: var(--text-strong); text-align: right; }

.section-h { padding: 35px 20px 20px; text-align: center; font-size: 20px; font-weight: 900; text-transform: uppercase; color: var(--text-strong); letter-spacing: 0.5px; }

/* CATALOG WITH INDIVIDUAL SLIDERS */
.catalog { padding: 0 15px; }
.card { background: var(--surface); border-radius: 32px; border: 1px solid var(--border); margin-bottom: 40px; overflow: hidden; box-shadow: var(--shadow-md); }

.card-slider-wrap { position: relative; width: 100%; overflow: hidden; background: #f1f5f9; }
.card-slider-wrap img { width: 100%; height: auto; display: block; }

.card-badge { position: absolute; top: 16px; left: 16px; background: var(--accent); color: #fff; font-weight: 900; padding: 7px 14px; border-radius: 12px; z-index: 10; }

.card-meta { padding: 24px; text-align: center; }
.card-color { font-weight: 900; font-size: 22px; margin-bottom: 16px; text-transform: uppercase; color: var(--text-strong); }
.btn-order-card { width: 100%; padding: 20px; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: #fff; border: none; font-weight: 900; text-transform: uppercase; border-radius: 16px; cursor: pointer; }

/* SIZE CHART */
.chart { padding: 0 15px 30px; }
.chart-img-box { background: #fff; border-radius: 24px; border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-md); padding: 8px; }
.chart-img-box img { width: 100%; display: block; border-radius: 16px; }

/* CALCULATOR */
.calc { margin: 0 15px 35px; padding: 35px 24px; background: #fff; border-radius: 32px; border: 1.5px solid var(--accent); box-shadow: var(--shadow-md); }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.calc input { width: 100%; padding: 18px; border: 1.5px solid var(--border); background: var(--surface-alt); border-radius: 16px; color: var(--text-strong); text-align: center; font-weight: 800; font-size: 18px; }

/* REVIEWS */
.reviews-section { padding: 40px 0; background: #f8fafc; border-top: 1px solid var(--border); overflow: hidden; }
.rev-slide-item { padding: 0 15px; }
.rev-photo-box { background: #fff; border-radius: 24px; padding: 8px; border: 1px solid var(--border); box-shadow: var(--shadow-md); margin-bottom: 15px; }
.rev-photo-box img { width: 100%; height: auto; border-radius: 16px; display: block; }
.rev-text-box { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 20px; box-shadow: var(--shadow-md); }
.rev-user { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rev-avatar { width: 40px; height: 40px; border-radius: 50%; background: #eef2ff; color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.rev-name { font-weight: 800; font-size: 16px; color: var(--text-strong); }
.rev-content { font-size: 13.5px; color: var(--muted); line-height: 1.5; font-weight: 500; }

/* HOW TO ORDER */
.how-to-order { padding: 0 15px 30px; }
.howto-img-box { background: #fff; border-radius: 24px; border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-md); padding: 8px; }
.howto-img-box img { width: 100%; display: block; border-radius: 16px; }

/* FORM */
.form-sect { padding: 45px 15px 65px; background: #fff; border-radius: 40px 40px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.03); }
.input-g { margin-bottom: 15px; }
.input-g input, .input-g select { width: 100%; padding: 19px; border: 1.5px solid var(--border); background: var(--surface-alt); border-radius: 16px; color: var(--text-strong); font-weight: 600; font-size: 16px; }

footer { padding: 45px; text-align: center; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); text-transform: uppercase; letter-spacing: 1.5px; background: #f8fafc; }

.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; display: none; margin-right: 12px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-loading .spinner { display: inline-block; }

/* Принудительное скругление для второго слайдера */
#heroSlider2 {
    border-radius: 24px !important;
    overflow: hidden !important;
    border: 1px solid var(--border) !important;
    /* Фикс для мобильных браузеров (Safari), чтобы углы не обрезались криво */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

#heroSlider2 .owl-stage-outer {
    border-radius: 24px !important;
    overflow: hidden !important;
}

#heroSlider2 .slider-item img {
    border-radius: 24px !important;
}

/* СТИЛІ FAST ORDER МОДАЛКИ */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(5px);
    z-index: 10000; display: none; align-items: center; justify-content: center;
    padding: 15px; opacity: 0; transition: opacity 0.4s ease;
}
.modal-overlay.show { display: flex; opacity: 1; }
.modal-box {
    background: #fff; border-radius: 32px; width: 100%; max-width: 420px;
    padding: 40px 25px 35px; position: relative; border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(30px); transition: transform 0.4s ease;
}
.modal-overlay.show .modal-box { transform: translateY(0); }
.modal-close {
    position: absolute; top: 20px; right: 20px; background: #f1f5f9;
    border: none; width: 34px; height: 34px; border-radius: 50%;
    font-size: 22px; color: #64748b; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.modal-header { text-align: center; margin-bottom: 30px; }
.modal-badge {
    display: inline-block; background: #6366f1; color: #fff;
    padding: 5px 12px; border-radius: 10px; font-size: 12px;
    font-weight: 800; text-transform: uppercase; margin-bottom: 15px;
}
.modal-header h3 { font-size: 26px; font-weight: 900; color: #0f172a; margin-bottom: 10px; }
.modal-header p { font-size: 14px; color: #64748b; line-height: 1.5; }
