/* ============================================
   ЗМІННІ КОЛЬОРІВ - тут можна міняти кольори
   ============================================ */
:root {
    /* Основні кольори */
    --primary-color: #1F1F1F;      /* Золотий - основний колір */
    --primary-dark: #1F1F1F;       /* Темніший золотий */
    --secondary-color: #c7617e;    /* Рожевий - троянди */
    --success-color: #10b92c;      /* Зелений - успіх */
    --warning-color: #bd0c0c;      /* Помаранчевий - увага */
    
    /* Кольори тексту */
    --text-dark: #1f2937;          /* Темний текст */
    --text-light: #6b7280;         /* Світлий текст */
    
    /* Фонові кольори */
    --bg-light: #fefcf8;           /* Світлий фон */
    --bg-white: #ffffff;           /* Білий фон */
    --border-color: #e5e7eb;       /* Колір рамок */
    
    /* Тіні */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================
   БАЗОВІ СТИЛІ
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Основний шрифт для тексту */
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure main content expands so footer stays at the bottom */
main {
    flex: 1 0 auto;
}

.container {
    max-width: 1200px;  /* Максимальна ширина контенту */
    margin: 0 auto;     /* Центрування */
    padding: 0 20px;    /* Відступи по боках */
}

/* ============================================
   ШАПКА САЙТУ (HEADER)
   ============================================ */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;   /* Липне до верху при прокрутці */
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease-out;
    /* ensure positioning context for pseudo stripes */
    isolation: isolate;
    /* stripe control variables: adjust gap and height here */
    /* vertical distance from header center to each stripe (baseline for top stripe) */
    --stripe-gap: 28px;
    --stripe-lower-gap: calc(var(--stripe-gap) - 3px); /* lower stripe sits closer to cart by default */
    --stripe-hover-increment: 10px; /* extra shift when hovering cart */
    --stripe-height: 3px; /* both stripes have the same thickness */
}

/* Two thin golden horizontal stripes across the header */
header::before,
header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: var(--stripe-height);
    pointer-events: none;
    background: linear-gradient(90deg, #d4af37 0%, #f7d77f 50%, #d4af37 100%);
    opacity: 0.95;
    transition: top 180ms ease, opacity 160ms ease;
}

/* Position stripes symmetrically around header center so they frame the cart button */
header::before {
    top: calc(50% - var(--stripe-gap));
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Use a smaller gap for the lower stripe so it's closer to the cart in baseline */
header::after {
    top: calc(50% + var(--stripe-lower-gap));
}

/* Hide stripes on very small screens to reduce clutter */
@media (max-width: 420px) {
    header::before, header::after { display: none; }
}

/* When cart is hovered/focused we nudge stripes to frame the button */
/* On cart hover we increase the offset further (baseline is already the former hover) */
/* On cart hover we increase the offset further (baseline is already the closer position for the lower stripe) */
header.cart-hover::before {
    top: calc(50% - (var(--stripe-gap) + var(--stripe-hover-increment)));
}

header.cart-hover::after {
    top: calc(50% + (var(--stripe-lower-gap) + var(--stripe-hover-increment)));
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Subtitle that sits above the catalog panel in the header */
/* header-subtitle removed — heading restored to hero section */

/* Логотип магазину */
.logo {
    font-family: 'Lavishly Yours', cursive;  /* Назва магазину - Lavishly Yours (Regular 400) */
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

/* Навігаційне меню */
nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.05rem;
}

/* Catalog button style (matches nav) */
.catalog-button {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.15rem 0.25rem;
}

/* Catalog panel (dropdown mega-menu) */
.catalog-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(255,255,255,0.98);
    color: var(--text-dark);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform-origin: top center;
    transform: translateY(-8px) scaleY(0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 120;
    padding: 18px 0 28px;
}

.catalog-panel.open {
    transform: translateY(0) scaleY(1);
    opacity: 1;
    pointer-events: auto;
}

.catalog-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.catalog-close {
    position: absolute;
    right: 0;
    top: -8px;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-dark);
}

.catalog-title {
    margin: 8px 0 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 28px;
}

.catalog-item {
    display: block;
    padding: 10px 12px;
    background: rgba(242,247,246,0.9);
    border-radius: 6px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 900px) {
    .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .catalog-panel { position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow:auto; padding-top: 56px; }
    .catalog-grid { grid-template-columns: 1fr; }
    .catalog-close { top: 10px; }
}

nav a:hover {
    transform: translateY(-2px);
}

/* Підкреслення при наведенні */
nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Remove underline for cart link entirely */
.cart-link::after {
    display: none !important;
}

/* Іконка кошика */
.cart-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cart-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.cart-icon {
    font-size: 1.2rem;
}

/* Лічильник товарів у кошику */
.cart-count {
    background: var(--secondary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

/* ============================================
   HERO СЕКЦІЯ (великий банер на головній)
   ============================================ */
.hero {
    text-align: center;
    padding: 2rem 0; /* reduced vertical padding to bring sections closer */
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h2 {
    font-family: 'Cormorant Garamond', serif;  /* Красивий шрифт для заголовків */
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.1rem; /* tighter spacing to bring stripe closer */
    position: relative;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-light);
    animation: fadeIn 0.8s ease-out 0.4s both;
}

/* ============================================
   ЗАГОЛОВКИ СЕКЦІЙ
   ============================================ */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
    margin: 0.5rem 0 1rem; /* tightened top margin so underline sits closer to the hero heading */
    color: var(--text-dark);
    position: relative;
}

/* Декоративна лінія під заголовком */
.section-title::after {
    display: none; /* decorative underline removed per request */
}

/* Decorative stripe under hero heading */
.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; /* very close to the hero heading */
    border-radius: 2px;
}

/* Accessibility helper: keep text for screen readers but hide visually */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   СІТКА ТОВАРІВ
   ============================================ */
.products {
    padding: 1rem 0 3rem; /* reduced top padding to bring section closer to hero stripe */
}

.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: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    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; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ефект при наведенні на картку */
.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);
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ============================================
   КНОПКИ
   ============================================ */
.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;
}

/* Основна кнопка (золота) */
.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(212, 175, 55, 0.3);
}

/* Додаткова кнопка (рожева) */
.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);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ============================================
   СЕКЦІЯ КОНТАКТІВ
   ============================================ */
.contacts {
    padding: 2rem 0 4rem;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 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: all 0.3s 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;
}

/* Slightly reduce phone emoji size to visually match other icons */
.contact-icon.phonesmall {
    font-size: 2.4rem;
    line-height: 1;
}

.contact-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
}

.contact-card p {
    color: var(--text-light);
    font-weight: 600;
}

/* ============================================
   ФУТЕР (підвал сайту)
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* ============================================
   АДАПТИВНІСТЬ (мобільні пристрої)
   ============================================ */

/* Планшети */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    nav {
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
}

/* Телефони */
@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
}
