/* assets/css/style.css - Morvii Premium Redesign */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --c-ivory: #F8F5F0;
    --c-cream: #F2E9DE;
    --c-cocoa: #1A110D;
    --c-taupe: #806F64;
    --c-rose: #C98B8B;
    --c-sage: #9BAF9A;
    --c-gold: #C9A66B;
    --c-white: #FFFFFF;
    --font-serif: 'Lora', serif;
    --font-sans: 'Inter', sans-serif;
    --radius-sm: 4px; --radius-md: 12px; --radius-lg: 24px; --radius-pill: 100px;
    --shadow-subtle: 0 4px 20px rgba(53, 35, 27, 0.04);
    --shadow-drawer: -5px 0 25px rgba(53, 35, 27, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { 
    font-family: var(--font-sans); background-color: var(--c-ivory); 
    color: var(--c-cocoa); line-height: 1.5; -webkit-font-smoothing: antialiased;
    padding-bottom: 95px; /* Space for bottom nav */
}
h1, h2, h3 { font-family: var(--font-serif); color: var(--c-cocoa); font-weight: 500; }
h4, h5, h6 { font-family: var(--font-sans); color: var(--c-cocoa); font-weight: 500; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--font-sans); cursor: pointer; outline: none; border: none; background: none; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c-cocoa); color: var(--c-ivory);
    padding: 0.9rem 2rem; border-radius: var(--radius-pill);
    font-size: 0.95rem; font-weight: 500; letter-spacing: 0.5px;
    transition: background 0.3s ease;
}
.btn:hover { background: #221611; }
.btn-outline { background: transparent; border: 1px solid var(--c-cocoa); color: var(--c-cocoa); }
.btn-outline:hover { background: var(--c-cocoa); color: var(--c-ivory); }

/* Header & Promo */
.promo-bar {
    background: var(--c-cocoa); color: var(--c-ivory);
    text-align: center; padding: 0.6rem; font-size: 0.75rem;
    letter-spacing: 1px; font-weight: 500;
}
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(248, 245, 240, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: none; /* Removed for seamless flow */
    padding: 1rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
}
.brand-logo { height: 35px; object-fit: contain; }
.header-right, .header-left { display: flex; gap: 1.25rem; align-items: center; }
.icon-btn { font-size: 1.25rem; color: var(--c-cocoa); cursor: pointer; }

/* Bottom Nav */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(128, 111, 100, 0.1);
    display: flex; justify-content: space-around; align-items: center;
    padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 99;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
    color: var(--c-taupe); font-size: 0.7rem; font-weight: 500;
}
.nav-item i { font-size: 1.2rem; }
.nav-item.active { color: var(--c-cocoa); }

@media (min-width: 769px) {
    .site-header { padding: 1.25rem 3rem; }
    .brand-logo { height: 45px; }
    .bottom-nav { display: none; }
    body { padding-bottom: 0; }
}

/* Modals & Overlays */
.search-overlay {
    position: fixed; inset: 0; background: var(--c-ivory); z-index: 1000;
    transform: translateY(-100%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
}
.search-overlay.active { transform: translateY(0); }
.search-header { display: flex; align-items: center; padding: 1rem 1.5rem; gap: 1rem; border-bottom: 1px solid rgba(128,111,100,0.1); }
.search-header input { flex: 1; border: none; background: transparent; font-size: 1.1rem; color: var(--c-cocoa); outline: none; }
.search-results { flex: 1; overflow-y: auto; padding: 1.5rem; }

.drawer-overlay {
    position: fixed; inset: 0; background: rgba(53, 35, 27, 0.3); backdrop-filter: blur(3px); z-index: 1000; opacity: 0; pointer-events: none; transition: 0.3s;
}
.drawer-overlay.active { opacity: 1; pointer-events: all; }
.side-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 85%; max-width: 400px;
    background: var(--c-ivory); z-index: 1001;
    transform: translateX(100%); transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
}
.side-drawer.active { transform: translateX(0) !important; }
.drawer-header { padding: 2rem 1.5rem 1rem; display: flex; justify-content: space-between; align-items: center; }
.drawer-content { padding: 1rem 1.5rem 2rem; overflow-y: auto; flex: 1; }
.drawer-menu { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.drawer-menu a { font-size: 1.1rem; display: flex; align-items: center; gap: 1rem; color: var(--c-cocoa); }

/* Hamburger Menu Button Style */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 13px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}
.hamburger-menu span {
    display: block;
    height: 2px;
    background: var(--c-cocoa);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hamburger-menu span:nth-child(1) {
    width: 22px;
}
.hamburger-menu span:nth-child(2) {
    width: 15px;
    align-self: flex-end;
}
.hamburger-menu span:nth-child(3) {
    width: 22px;
}

/* Staggered Side Drawer Links Entry Animation */
.side-drawer .drawer-menu a {
    opacity: 0;
    transform: translateX(15px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.side-drawer.active .drawer-menu a {
    opacity: 1;
    transform: translateX(0);
}
.side-drawer.active .drawer-menu a:nth-child(1) { transition-delay: 0.1s; }
.side-drawer.active .drawer-menu a:nth-child(2) { transition-delay: 0.15s; }
.side-drawer.active .drawer-menu a:nth-child(3) { transition-delay: 0.20s; }
.side-drawer.active .drawer-menu a:nth-child(4) { transition-delay: 0.25s; }
.side-drawer.active .drawer-menu a:nth-child(5) { transition-delay: 0.30s; }
.side-drawer.active .drawer-menu a:nth-child(6) { transition-delay: 0.35s; }
.side-drawer.active .drawer-menu a:nth-child(7) { transition-delay: 0.40s; }
.side-drawer.active .drawer-menu a:nth-child(8) { transition-delay: 0.45s; }
.side-drawer.active .drawer-menu a:nth-child(9) { transition-delay: 0.50s; }
.side-drawer.active .drawer-menu a:nth-child(10) { transition-delay: 0.55s; }

/* Hero Section (Clean Layout) */
.hero-section { padding: 0.75rem 1.5rem 1.5rem; text-align: center; }
.hero-subtitle { font-size: 1rem; color: var(--c-taupe); margin-bottom: 1.25rem; font-weight: 300; }
.hero-title { font-size: 3.2rem; line-height: 1.25; margin-bottom: 1rem;  color: var(--c-cocoa); }
.hero-image-wrap {
    margin-top: 1rem; border-radius: var(--radius-lg); overflow: hidden;
    position: relative; aspect-ratio: 4/5; width: 100%; max-width: 500px; margin-inline: auto;
    background: var(--c-cream); box-shadow: var(--shadow-subtle);
}
.hero-image-wrap img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 769px) {
    .hero-section { display: flex; align-items: center; text-align: left; padding: 4rem 3rem; gap: 4rem; max-width: 1200px; margin: 0 auto; }
    .hero-content { flex: 1; }
    .hero-image-wrap { margin-top: 0; flex: 1; max-width: none; }
    .hero-title { font-size: 4.5rem; line-height: 1.1; }
}

/* Category Grid */
.category-swipe { padding: 2rem 0; margin-bottom: 1rem; overflow: hidden; }
.category-scroll { display: flex; gap: 1rem; padding: 0 1.5rem; overflow-x: auto; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.category-pill {
    display: inline-flex; align-items: center; gap: 0.8rem;
    padding: 0.5rem 1.5rem 0.5rem 0.5rem; background: var(--c-cream); border-radius: 50px;
    font-size: 0.95rem; font-weight: 500; white-space: nowrap; color: var(--c-cocoa);
    text-decoration: none; border: 1px solid rgba(128,111,100,0.1);
}
.category-pill img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--c-ivory); }

/* Products Grid */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
.product-card { position: relative; }
.product-img-wrap {
    position: relative; aspect-ratio: 4/5; border-radius: var(--radius-md);
    overflow: hidden; background: var(--c-cream); margin-bottom: 0.75rem;
}
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.heart-btn {
    position: absolute; top: 0.5rem; right: 0.5rem; width: 44px; height: 44px;
    background: rgba(255,255,255,0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--c-taupe); font-size: 1rem;
}
.p-name { font-size: 0.95rem; color: var(--c-cocoa); margin-bottom: 0.25rem; font-weight: 400; text-transform: capitalize; }
.p-price { font-size: 0.95rem; font-weight: 600; color: var(--c-cocoa); }

/* App Modals */
.app-modal { position: fixed; inset: 0; z-index: 3000; background: rgba(53, 35, 27, 0.5); backdrop-filter: blur(8px); display: flex; opacity: 0; pointer-events: none; transition: opacity 0.8s ease; align-items: flex-end; justify-content: center; }
.app-modal.active { opacity: 1; pointer-events: all; }
.app-modal-content {
    background: rgba(248, 245, 240, 0.85); width: 100%; height: 85vh;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 -20px 40px rgba(53, 35, 27, 0.1);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex; flex-direction: column; transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-modal.active .app-modal-content { transform: translateY(0); }
.modal-header { padding: 2rem 1.5rem 1rem; text-align: center; }
.modal-body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.modal-footer { padding: 1.5rem; background: rgba(242, 233, 222, 0.5); border-top: 1px solid rgba(255,255,255,0.4); text-align: center; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }

/* Campaign Popup */
.campaign-popup {
    position: fixed; inset: 0; background: rgba(53, 35, 27, 0.4); backdrop-filter: blur(4px); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.popup-inner {
    background: rgba(248, 245, 240, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg); padding: 3rem 2rem;
    text-align: center; width: 100%; max-width: 400px; position: relative;
    box-shadow: 0 20px 50px rgba(53, 35, 27, 0.2);
}

/* Universal Background Scroll Lock when any Modal, Drawer, or Popup is Open */
body.modal-open,
body:has(.app-modal.active),
body:has(.campaign-popup[style*="display: flex"]),
body:has(.campaign-popup[style*="display: block"]),
body:has(.campaign-popup.active),
body:has(#side-drawer.active),
body:has(#cart-drawer.active),
body:has(#search-overlay.active) {
    overflow: hidden !important;
}

/* Footer */
.site-footer {
    background: var(--c-cream); padding: 2rem 1.5rem 5rem;
    text-align: center; border-top: 1px solid rgba(128, 111, 100, 0.1);
}
.footer-logo { height: 40px; margin: 0 auto 1rem; }
.footer-text { font-size: 0.85rem; color: var(--c-taupe); margin-bottom: 2rem; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; font-size: 0.85rem; color: var(--c-cocoa); }

/* Login Page */
.login-layout {
    display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: var(--c-ivory);
}
.login-image { height: 40vh; width: 100%; flex-shrink: 0; position: relative; }
.login-image .bg-img { width: 100%; height: 100%; object-fit: cover; }
.login-logo { position: absolute; top: 1.5rem; left: 0; width: 100%; text-align: center; z-index: 10; }
.login-logo img { height: 25px; margin: 0 auto; filter: drop-shadow(0 2px 8px rgba(255,255,255,0.8)); }
.login-form-area {
    flex: 1; padding: 2rem 1.5rem; background: var(--c-ivory); border-radius: 30px 30px 0 0;
    margin-top: -25px; position: relative; z-index: 20; display: flex; flex-direction: column;
}
.input-modern { position: relative; margin-bottom: 1.25rem; }
.input-modern input {
    width: 100%; padding: 1.25rem 1rem 0.5rem; border: none; border-bottom: 1px solid rgba(128,111,100,0.3);
    background: transparent; outline: none;
}
.input-modern label { position: absolute; left: 0.5rem; top: 1rem; color: var(--c-taupe); font-size: 0.9rem; transition: 0.2s ease all; pointer-events: none; }
.input-modern input:focus ~ label, .input-modern input:not(:placeholder-shown) ~ label { top: 0.1rem; font-size: 0.7rem; font-weight: 600; color: var(--c-cocoa); }
.btn-modern { width: 100%; background: var(--c-cocoa); color: var(--c-ivory); padding: 0.9rem; border-radius: 50px; margin-top: auto; }

@media (min-width: 769px) {
    .login-layout { flex-direction: row; }
    .login-image { height: 100vh; width: 50%; }
    .login-form-area { width: 50%; padding: 5rem; border-radius: 0; margin-top: 0; justify-content: center; }
}

/* Scroll Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Admin Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.admin-table th, .admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(128, 111, 100, 0.1);
}
.admin-table th {
    color: var(--c-taupe);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(128, 111, 100, 0.1);
}
.admin-table tr:hover {
    background: rgba(128, 111, 100, 0.02);
}


/* Heart Animation */
.heart-btn i, .btn-wishlist i { transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s; }
.heart-btn.active i, .btn-wishlist.active i { color: #e74c3c; transform: scale(1.2); }








