@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

:root {
    --primary-blue: #0284c7;
    --primary-blue-dark: #0369a1;
    --primary-blue-light: #e0f2fe;
    --accent-teal: #06b6d4;
    --accent-water: #38bdf8;
    
    --text-dark: #0f172a;
    --text-gray: #475569;
    --text-muted: #94a3b8;
    
    --bg-page: #f8fafc;
    --surface-card: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.78);
    --border-subtle: rgba(226, 232, 240, 0.85);
    --border-glass: rgba(255, 255, 255, 0.65);
    
    --fluent-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
    --fluent-shadow-md: 0 10px 25px -5px rgba(2, 132, 199, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --fluent-shadow-lg: 0 20px 35px -10px rgba(2, 132, 199, 0.15), 0 12px 16px -8px rgba(0, 0, 0, 0.06);
    --fluent-shadow-glow: 0 0 35px rgba(56, 189, 248, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --wave-height: 140px;
}

body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background-color: var(--bg-page);
    background: radial-gradient(circle at 10% 10%, rgba(224, 242, 254, 0.5) 0%, transparent 40%),
                radial-gradient(circle at 90% 90%, rgba(207, 250, 254, 0.5) 0%, transparent 40%),
                #f8fafc;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 70px 0;
}

/* ------------------------------------ */
/* Header & Navigation (Fluent Acrylic) */
/* ------------------------------------ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--surface-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 12px 0;
    transition: all 0.3s ease;
}

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

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
    transition: transform 0.25s ease;
}

.logo-wrapper:hover .logo-img {
    transform: scale(1.03);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover {
    color: var(--primary-blue);
    background-color: var(--primary-blue-light);
}

.nav-links a.active {
    color: var(--primary-blue-dark);
    background-color: rgba(2, 132, 199, 0.12);
    font-weight: 600;
}

.nav-admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0369a1 !important;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 7px 16px !important;
    border-radius: var(--radius-full);
    margin-left: 12px;
}

.nav-admin-btn:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* ------------------------------------ */
/* Hero Section & Perfect Water Wave Animation */
/* ------------------------------------ */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: var(--wave-height);
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 60%, #e0f2fe 100%);
    text-align: center;
}

.hero-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(2, 132, 199, 0.05) 60%, transparent 80%);
    pointer-events: none;
}

.hero-content-container {
    position: relative;
    z-index: 10;
    max-width: 860px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(186, 230, 253, 0.8);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue-dark);
    margin-bottom: 24px;
    box-shadow: var(--fluent-shadow-sm);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #0284c7;
    box-shadow: 0 0 10px #38bdf8;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.detail-name {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 18px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Fluent Buttons */
.fluent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
}

.fluent-btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
}

.fluent-btn-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.45);
    color: #ffffff;
}

.fluent-btn-glass {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-dark);
    border: 1px solid rgba(203, 213, 225, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: var(--fluent-shadow-sm);
}

.fluent-btn-glass:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-blue-dark);
    transform: translateY(-2px);
    border-color: var(--primary-blue);
}

/* Perfect Water Waves Container & SVG */
.hero-waves-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--wave-height);
    overflow: hidden;
    pointer-events: none;
    transform: translateZ(0);
}

.hero-waves-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.parallax-waves > use {
    animation: wave-harmonic 18s cubic-bezier(.55,.5,.45,.5) infinite;
}

.parallax-waves > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax-waves > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax-waves > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax-waves > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes wave-harmonic {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* Backward compatibility for legacy wave-layer */
.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--wave-height);
    overflow: hidden;
    pointer-events: none;
}

.wave-layer {
    position: absolute;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
    background-size: 50% 100%;
    bottom: 0;
}

.wave-layer:nth-child(1) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C150,90 350,-40 500,45 C650,130 900,10 1200,60 L1200,120 L0,120 Z' fill='%2338bdf8' fill-opacity='0.3'/%3E%3C/svg%3E");
    animation: wave-flow 12s linear infinite;
    z-index: 1;
}

.wave-layer:nth-child(2) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,20 C200,100 450,10 650,70 C850,130 1050,40 1200,50 L1200,120 L0,120 Z' fill='%2360a5fa' fill-opacity='0.45'/%3E%3C/svg%3E");
    animation: wave-flow 16s linear infinite reverse;
    z-index: 2;
}

.wave-layer:nth-child(3) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C300,120 600,20 900,80 C1050,110 1150,60 1200,70 L1200,120 L0,120 Z' fill='%232563eb' fill-opacity='0.6'/%3E%3C/svg%3E");
    animation: wave-flow 22s linear infinite;
    z-index: 3;
}

.wave-layer:nth-child(4) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C350,100 700,40 1000,90 C1100,100 1170,80 1200,85 L1200,120 L0,120 Z' fill='%230284c7' fill-opacity='0.9'/%3E%3C/svg%3E");
    animation: wave-flow 28s linear infinite reverse;
    z-index: 4;
}

@keyframes wave-flow {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Floating Water Micro-Bubbles */
.water-bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    opacity: 0.7;
    animation: rise-bubble 7s infinite ease-in;
}

.b1 { left: 15%; width: 14px; height: 14px; animation-duration: 6s; animation-delay: 1s; }
.b2 { left: 32%; width: 20px; height: 20px; animation-duration: 8s; animation-delay: 2.5s; }
.b3 { left: 55%; width: 12px; height: 12px; animation-duration: 5.5s; animation-delay: 0.5s; }
.b4 { left: 72%; width: 18px; height: 18px; animation-duration: 7.5s; animation-delay: 3s; }
.b5 { left: 88%; width: 16px; height: 16px; animation-duration: 6.8s; animation-delay: 1.8s; }
.b6 { left: 44%; width: 10px; height: 10px; animation-duration: 4.8s; animation-delay: 4s; }

@keyframes rise-bubble {
    0% {
        transform: translateY(0) scale(0.6);
        opacity: 0.2;
    }
    50% {
        opacity: 0.8;
        transform: translateY(-70px) translateX(15px) scale(1);
    }
    100% {
        transform: translateY(-150px) translateX(-10px) scale(1.2);
        opacity: 0;
    }
}

/* ------------------------------------ */
/* Fluent Glass Cards & Layout */
/* ------------------------------------ */
.feature-card-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
    align-items: center;
}

.fluent-glass-card {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--fluent-shadow-md);
    padding: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fluent-glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fluent-shadow-lg);
}

.story-tag {
    display: inline-block;
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.story-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.story-text {
    font-size: 1.05rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 24px;
}

.story-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.story-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--primary-blue-light);
    color: var(--primary-blue-dark);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Product Spotlight */
.product-spotlight {
    text-align: center;
    padding: 30px;
}

.spotlight-image-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px;
    padding: 24px;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--fluent-shadow-sm);
    overflow: hidden;
}

.spotlight-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.spotlight-image-container:hover .spotlight-img {
    transform: scale(1.05);
}

.water-sheen {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    animation: sheen 4s infinite;
}

@keyframes sheen {
    0% { left: -100%; }
    40%, 100% { left: 160%; }
}

.model-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--primary-blue-light);
    color: var(--primary-blue-dark);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.spotlight-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ------------------------------------ */
/* Products Page & Fluent Grid */
/* ------------------------------------ */
.products-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-filter-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 30px;
}

.search-input-box {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.search-input-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.search-input-box input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
    background: #ffffff;
}

.search-icon-svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-pill {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--surface-glass);
    border: 1px solid var(--border-subtle);
    color: var(--text-gray);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-pill:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.cat-pill.active {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--fluent-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--fluent-shadow-lg);
    border-color: rgba(56, 189, 248, 0.5);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
}

.product-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.06);
}

.card-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(2, 132, 199, 0.9);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.card-body-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
    line-height: 1.35;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.specs-list {
    background: rgba(241, 245, 249, 0.7);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.spec-label {
    color: var(--text-muted);
    font-weight: 500;
}

.spec-value {
    color: var(--text-dark);
    font-weight: 600;
}

.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.price-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-blue-dark);
}

.in-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #dcfce7;
    color: #15803d;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ------------------------------------ */
/* Admin Management Modal */
/* ------------------------------------ */
.fluent-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.fluent-modal {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    box-shadow: var(--fluent-shadow-lg);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.fluent-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fluent-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.auth-lock-banner {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: #0369a1;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 50px 0 25px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
    margin-bottom: 25px;
}

.footer-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
}

.footer-copy {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

@media (max-width: 900px) {
    .feature-card-grid {
        grid-template-columns: 1fr;
    }
    .detail-name {
        font-size: 2.5rem;
    }
}
