/* ============================================
   components.css — кнопки, картки товарів,
                    контакти, футер, модалка теми
   ============================================ */

/* ── Кнопки ── */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-primary { background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.25); }
.btn-secondary { background: var(--secondary-color); color: white; }
.btn-secondary:hover { background: #b05068; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); transition: all 0.3s ease; }
.btn-outline:hover { background: var(--primary-color); color: white; }

/* ── Hero-секція ── */
.hero { text-align: center; padding: 2rem 0; animation: fadeIn 0.8s ease-out; }
.hero h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem; font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.1rem;
    position: relative;
    animation: fadeIn 0.8s ease-out 0.2s both;
    transition: color 0.35s ease;
}
.hero h2::after {
    content: '';
    display: block;
    width: 80px; height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0.125rem auto 0;
    border-radius: 2px;
}
.hero p { font-size: 1.4rem; color: var(--text-light); animation: fadeIn 0.8s ease-out 0.4s both; transition: color 0.35s; }

/* ── Заголовки секцій ── */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem; font-weight: 600;
    text-align: center;
    margin: 0.5rem 0 1rem;
    color: var(--text-dark);
    position: relative;
    transition: color 0.35s ease;
}
.section-title::after { display: none; }

/* ── Сітка товарів ── */
.products { padding: 1rem 0 3rem; }
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    animation: fadeIn 1s ease-out;
}

/* ── Картка товару ── */
.product-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background 0.35s ease;
    animation: slideUp 0.6s ease-out both;
}
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }

.product-image { position: relative; overflow: hidden; height: 250px; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-image img { transform: scale(1.1); }

.product-info { padding: 1.5rem; }
.product-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-dark); transition: color 0.35s; }
.product-description { color: var(--text-light); margin-bottom: 1rem; font-size: 1rem; transition: color 0.35s; }
.product-footer { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-size: 1.6rem; font-weight: 700; color: var(--primary-color); transition: color 0.35s; }

/* ── Секція контактів ── */
.contacts { padding: 2rem 0 4rem; }
.contacts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 2rem; }

.contact-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.35s ease;
    animation: fadeIn 0.8s ease-out both;
}
.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.contact-icon { font-size: 3rem; line-height: 1; }
.contact-icon.phonesmall { font-size: 2.4rem; }
.contact-card h3 { margin-bottom: 0.5rem; color: var(--text-dark); font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; transition: color 0.35s; }
.contact-card p  { color: var(--text-light); font-weight: 600; transition: color 0.35s; }

/* ── Графік роботи ── */
.schedule-card {
    background: var(--bg-white);
    padding: 2rem 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.35s ease;
    animation: fadeIn 0.8s ease-out 0.5s both;
    margin-top: 2rem;
}
.schedule-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.schedule-card h3 { margin: 0.5rem 0 1.2rem; color: var(--text-dark); font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; transition: color 0.35s; }
.schedule-grid { display: inline-grid; grid-template-columns: auto auto; gap: 0.5rem 2.5rem; text-align: left; margin: 0 auto; }
.schedule-day  { font-weight: 600; color: var(--text-dark); font-size: 1rem; transition: color 0.35s; }
.schedule-time { color: var(--text-light); font-weight: 600; font-size: 1rem; transition: color 0.35s; }
.schedule-closed { color: var(--secondary-color); font-weight: 700; }

/* ── Футер ── */
footer {
    background: linear-gradient(135deg, var(--footer-from) 0%, var(--footer-to) 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    transition: background 0.35s ease;
    width: 100%;
}

/* ── Модальне вікно вибору теми ── */
.theme-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: overlayIn 0.3s ease both;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.theme-modal {
    background: var(--modal-bg);
    border: 1px solid var(--modal-border);
    border-radius: 22px;
    padding: 2.5rem 2rem 2rem;
    max-width: 460px; width: 100%;
    box-shadow: var(--modal-shadow);
    text-align: center;
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: background 0.35s ease, border-color 0.35s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.82) translateY(24px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.theme-modal-icon {
    font-size: 3.5rem; line-height: 1;
    margin-bottom: 1rem;
    display: block;
    animation: iconBounce 0.55s ease 0.25s both;
}
@keyframes iconBounce {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    65%  { transform: scale(1.18) rotate(6deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}

.theme-modal h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.9rem; font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem; line-height: 1.3;
    transition: color 0.35s ease;
}
.theme-modal p {
    color: var(--text-light);
    font-size: 0.93rem;
    margin-bottom: 1.8rem;
    line-height: 1.6;
    transition: color 0.35s ease;
}

.theme-modal-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.theme-card {
    background: var(--modal-card-bg);
    border: 2px solid var(--modal-border);
    border-radius: 14px;
    padding: 1.2rem 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    position: relative;
    overflow: hidden;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.theme-card:hover { background: var(--modal-card-hover); border-color: var(--primary-color); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.theme-card:focus-visible { box-shadow: 0 0 0 3px rgba(212,175,55,0.5); }
.theme-card.selected { border-color: var(--primary-color); background: var(--modal-card-hover); box-shadow: 0 0 0 3px rgba(212,175,55,0.22); }

.theme-card-preview {
    width: 100%; height: 50px;
    border-radius: 8px; overflow: hidden;
    position: relative;
    border: 1px solid var(--modal-border);
    flex-shrink: 0;
}
.theme-card[data-pick="light"] .theme-card-preview { background: #fefcf8; }
.theme-card[data-pick="light"] .theme-card-preview::before { content: ''; position: absolute; top: 8px; left: 8px; right: 8px; height: 10px; border-radius: 4px; background: #1F1F1F; }
.theme-card[data-pick="light"] .theme-card-preview::after  { content: ''; position: absolute; top: 26px; left: 8px; right: 28px; height: 6px; border-radius: 3px; background: #e5e7eb; }
.theme-card[data-pick="dark"] .theme-card-preview { background: #0f1117; }
.theme-card[data-pick="dark"] .theme-card-preview::before { content: ''; position: absolute; top: 8px; left: 8px; right: 8px; height: 10px; border-radius: 4px; background: #d4af37; }
.theme-card[data-pick="dark"] .theme-card-preview::after  { content: ''; position: absolute; top: 26px; left: 8px; right: 28px; height: 6px; border-radius: 3px; background: #272d3f; }

.theme-card-icon  { font-size: 2rem; line-height: 1; }
.theme-card-label { font-weight: 700; font-size: 0.95rem; color: var(--text-dark); transition: color 0.3s; }
.theme-card-desc  { font-size: 0.78rem; color: var(--text-light); transition: color 0.3s; }

.theme-card .check-mark {
    position: absolute; top: 8px; right: 8px;
    width: 20px; height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white; font-size: 0.65rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(0);
    transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-card.selected .check-mark { opacity: 1; transform: scale(1); }

.theme-modal-confirm {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white; border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 700; font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.theme-modal-confirm:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.theme-modal-confirm:active { transform: scale(0.98); }
