/* ============================================================
   FreshDairy — Production Storefront Styles
   ============================================================ */

:root {
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-light: #14b8a6;
    --brand-50: #f0fdfa;
    --brand-100: #ccfbf1;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --surface: #f8fafc;
    --white: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
    --shadow: 0 4px 20px rgba(15,23,42,.08);
    --shadow-lg: 0 12px 40px rgba(15,23,42,.12);
    --font: 'DM Sans', system-ui, sans-serif;
    --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --transition: .2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }

body.storefront-body {
    font-family: var(--font);
    color: var(--dark);
    background: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); }

/* ── Top Bar ── */
.top-bar {
    background: var(--dark);
    color: rgba(255,255,255,.75);
    font-size: .8125rem;
    padding: .5rem 0;
}

/* ── Header / Navbar ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.main-navbar { padding: .75rem 0; }

.navbar-brand {
    display: flex;
    align-items: center;
    gap: .625rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--dark) !important;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.main-navbar .nav-link {
    font-weight: 500;
    font-size: .9375rem;
    color: var(--muted) !important;
    padding: .5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: var(--brand) !important;
    background: var(--brand-50);
}

.nav-action-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--surface);
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.nav-action-btn:hover { background: var(--brand-50); color: var(--brand); }

.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--accent);
    color: #fff;
    font-size: .625rem;
    font-weight: 700;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .375rem .75rem .375rem .375rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--white);
    font-size: .875rem;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-btn:hover { border-color: var(--brand); }

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
}

.user-dropdown {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: .5rem;
    min-width: 220px;
}

.user-dropdown .dropdown-item {
    border-radius: 8px;
    padding: .5rem .75rem;
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .625rem;
}

.user-dropdown .dropdown-item i { opacity: .6; width: 18px; }

.btn-brand {
    background: var(--brand);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: .5rem 1.25rem;
    border-radius: 10px;
    transition: var(--transition);
}

.btn-brand:hover {
    background: var(--brand-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13,148,136,.3);
}

.btn-ghost {
    background: transparent;
    color: var(--dark);
    border: none;
    font-weight: 500;
    padding: .5rem 1rem;
    border-radius: 10px;
}

.btn-ghost:hover { background: var(--surface); color: var(--brand); }

.btn-outline-brand {
    border: 1.5px solid var(--brand);
    color: var(--brand);
    font-weight: 600;
    border-radius: 10px;
    background: transparent;
}

.btn-outline-brand:hover {
    background: var(--brand);
    color: #fff;
}

.storefront-main { flex: 1; }

/* ── Hero ── */
.hero-section {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 40%, #14b8a6 100%);
    color: #fff;
    padding: 5rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.hero-section p { font-size: 1.125rem; opacity: .9; max-width: 520px; }

.hero-visual {
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
}

.btn-hero {
    background: #fff;
    color: var(--brand-dark);
    font-weight: 700;
    padding: .875rem 2rem;
    border-radius: 50px;
    border: none;
    transition: var(--transition);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    color: var(--brand-dark);
}

.btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.6);
    font-weight: 600;
    padding: .875rem 2rem;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-hero-outline:hover { background: #fff; color: var(--brand-dark); border-color: #fff; }

/* ── Sections ── */
.features-section { padding: 5rem 0; background: var(--surface); }
.products-section { padding: 5rem 0; }

.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.section-title p { color: var(--muted); font-size: 1.0625rem; }

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--brand-100);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--brand-50);
    color: var(--brand);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.5rem;
}

/* ── Product Cards ── */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-100);
}

.product-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--surface);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.product-card:hover .product-card-image img { transform: scale(1.05); }

.product-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand);
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .25rem .625rem;
    border-radius: 50px;
}

.product-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-size: .6875rem;
    color: var(--brand);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .75px;
}

.product-name {
    font-weight: 600;
    font-size: .9375rem;
    margin: .375rem 0;
    color: var(--dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta { font-size: .8125rem; color: var(--muted); }

.product-price {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--dark);
    font-family: var(--font-display);
}

.product-price small { font-size: .75rem; font-weight: 500; color: var(--muted); }

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
}

/* ── Shop Page ── */
.shop-hero {
    background: linear-gradient(135deg, var(--brand-50), var(--white));
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.shop-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.shop-hero p { color: var(--muted); margin: 0; }

.shop-layout { padding: 2.5rem 0 4rem; }

.shop-sidebar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.shop-sidebar-title {
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .75px;
    color: var(--muted);
    margin-bottom: 1rem;
}

.filter-group { margin-bottom: 1.5rem; }
.filter-group:last-child { margin-bottom: 0; }

.filter-chip {
    display: block;
    padding: .5rem .75rem;
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
    font-size: .875rem;
    transition: var(--transition);
    margin-bottom: .25rem;
}

.filter-chip:hover { background: var(--surface); color: var(--brand); }
.filter-chip.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.shop-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.shop-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.shop-search input {
    width: 100%;
    padding: .625rem 1rem .625rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .875rem;
    transition: var(--transition);
}

.shop-search input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

.results-count { font-size: .875rem; color: var(--muted); }

/* ── Product Detail ── */
.product-detail-section { padding: 2.5rem 0 4rem; }

.product-gallery {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.product-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.product-detail-info h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .75rem; }

.product-detail-price {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--brand-dark);
}

.product-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 1.5rem 0;
}

.meta-item { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--muted); }
.meta-item i { color: var(--brand); }

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .375rem .875rem;
    border-radius: 50px;
    font-size: .8125rem;
    font-weight: 600;
}

.stock-badge.in-stock { background: #ecfdf5; color: #059669; }
.stock-badge.out-stock { background: #fef2f2; color: #dc2626; }

.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.qty-selector button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--surface);
    font-size: 1.125rem;
    cursor: pointer;
    transition: var(--transition);
}

.qty-selector button:hover { background: var(--brand-50); color: var(--brand); }

.qty-selector input {
    width: 50px;
    height: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: .9375rem;
}

/* ── Auth Pages ── */
.auth-page {
    min-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-visual {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-visual-content { position: relative; z-index: 1; max-width: 400px; }
.auth-visual h2 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.auth-visual p { opacity: .85; line-height: 1.7; }

.auth-visual::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--surface);
}

.auth-form-box {
    width: 100%;
    max-width: 420px;
}

.auth-form-box h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; }
.auth-form-box .subtitle { color: var(--muted); margin-bottom: 2rem; }

.form-floating-custom {
    margin-bottom: 1.25rem;
}

.form-floating-custom label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: .375rem;
}

.form-floating-custom .form-control {
    padding: .75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: .9375rem;
    transition: var(--transition);
}

.form-floating-custom .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

.input-icon-wrap { position: relative; }
.input-icon-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.input-icon-wrap .form-control { padding-left: 2.75rem; }

/* ── Contact Page ── */
.contact-section { padding: 3rem 0 4rem; }

.contact-info-card {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    height: 100%;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.contact-info-item:last-child { margin-bottom: 0; }

.contact-info-item .icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

/* ── Stats / CTA ── */
.stats-banner {
    background: var(--dark);
    color: #fff;
    padding: 4rem 0;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand-light);
}

.cta-section {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-light));
    color: #fff;
    padding: 5rem 0;
    text-align: center;
}

/* ── Footer ── */
.site-footer { margin-top: auto; }

.footer-main {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 4rem 0 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-desc { font-size: .9375rem; line-height: 1.7; margin-bottom: 1.5rem; }

.footer-social { display: flex; gap: .75rem; }
.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}
.footer-social a:hover { background: var(--brand); }

.footer-title {
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .75px;
    margin-bottom: 1.25rem;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .625rem; }
.footer-links a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: .9375rem;
    transition: var(--transition);
}
.footer-links a:hover { color: #fff; }

.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: .875rem;
    font-size: .9375rem;
}
.footer-contact i { color: var(--brand-light); margin-top: 3px; }

.footer-bottom {
    background: rgba(0,0,0,.2);
    padding: 1.25rem 0;
    font-size: .8125rem;
    color: rgba(255,255,255,.5);
}

.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-bottom-links a:hover { color: #fff; }

/* ── Utilities ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--muted);
}

.rating-stars { color: var(--accent); }
.rating-stars i { margin-right: 2px; }

.alert {
    border-radius: var(--radius);
    border: none;
    font-size: .9375rem;
}

.page-header {
    background: var(--surface);
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.page-header h1 { font-size: 1.75rem; font-weight: 800; margin: 0; }

/* ── Responsive ── */
@media (max-width: 991px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .shop-sidebar { position: static; margin-bottom: 1.5rem; }
}

@media (max-width: 768px) {
    .hero-section { padding: 3.5rem 0 3rem; }
    .features-section, .products-section { padding: 3.5rem 0; }
}
