/* ============================================
   MAKE YOUR SMILE — Header & Footer
   ============================================ */

.modern-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.modern-header {
    background: rgba(13, 10, 40, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 2px 24px rgba(15, 11, 45, 0.45);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(124, 58, 237, 0.35);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 1rem;
}

/* --- Logo --- */

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #38BDF8, #7C3AED 60%, #F472B6);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
    display: inline-flex;
    overflow: hidden;
    position: relative;
    animation: logoBounce 5s ease-in-out infinite;
}

/* Легке фіолетове тонування сірого фону лого в хедері */
.logo-icon::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, rgba(124, 58, 237, 0.06) 40%, rgba(88, 64, 220, 0.3) 100%);
}

.logo-icon-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transform: scale(1.2);
}

@keyframes logoBounce {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg) translateY(-2px); }
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-logo {
    font-family: 'Unbounded', 'Manrope', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(90deg, #7DD3FC 0%, #A78BFA 50%, #F9A8D4 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    white-space: nowrap;
    animation: logoGradient 8s linear infinite;
}

@keyframes logoGradient {
    0%   { background-position: 0% 0; }
    50%  { background-position: 200% 0; }
    100% { background-position: 0% 0; }
}

.brand-tagline {
    font-size: 0.72rem;
    color: rgba(233, 213, 255, 0.55);
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* --- Mobile Menu Toggle --- */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.menu-line {
    width: 24px;
    height: 2px;
    background: #EDE9FE;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* --- Navigation --- */

.main-nav {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.98rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #7DD3FC, #A78BFA);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #C4B5FD;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Header Actions --- */

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.cart-btn {
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.cart-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #F472B6;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
    border: 2px solid #ffffff;
    animation: badgePop 0.35s ease;
}

@keyframes badgePop {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* --- Main Content --- */

.modern-main {
    flex: 1;
}

/* ============================================
   FOOTER
   ============================================ */

.modern-footer {
    background: linear-gradient(140deg, #0F0B2D 0%, #231756 70%, #341C6E 100%);
    color: white;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.4) 0%, rgba(124, 58, 237, 0.12) 45%, transparent 70%);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem 1.5rem;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand-name {
    font-family: 'Unbounded', 'Manrope', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(90deg, #38BDF8, #A78BFA, #F472B6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

.footer-section h3 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: #E9D5FF;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-section a {
    color: #A78BFA;
    text-decoration: none;
}

.footer-section a:hover {
    color: #C4B5FD;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(167, 139, 250, 0.2);
    padding-top: 1.5rem;
    text-align: center;
    color: #8b8ba3;
    font-size: 0.9rem;
}

/* --- Mobile Overlay --- */

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 11, 45, 0.5);
    backdrop-filter: blur(3px);
    z-index: 98;
}

/* Hamburger animation when open */
.mobile-menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .brand-tagline {
        display: none;
    }

    .brand-logo {
        font-size: 1rem;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: linear-gradient(160deg, #13102F 0%, #231756 100%);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        z-index: 99;
        align-items: stretch;
        justify-content: flex-start;
    }

    .main-nav.mobile-open {
        left: 0;
    }

    .main-nav .nav-link {
        font-size: 1.125rem;
        width: 100%;
        padding: 1rem 0;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav .nav-link::after {
        display: none;
    }

    .main-nav .nav-link:hover {
        color: #C4B5FD;
        background-color: rgba(124, 58, 237, 0.15);
        padding-left: 1rem;
        transition: all 0.3s ease;
    }

    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

    .header-actions {
        margin-left: auto;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }

    .mobile-overlay {
        display: none;
    }
}
