/* Motsio USA Fresh Groceries - Clean Modern Responsive Stylesheet */
:root {
    --primary: #15803d;
    --primary-hover: #166534;
    --primary-light: #f0fdf4;
    --primary-border: #bbf7d0;
    --primary-dark: #052e16;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --danger: #e11d48;
    --danger-light: #ffe4e6;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font: inherit;
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Top Bar */
.top-bar {
    background: var(--primary-dark);
    color: #e2e8f0;
    font-size: 12px;
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.badge-code {
    background: #166534;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.main-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 4px 10px rgba(21, 128, 61, 0.25);
}

.brand-text {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-text span {
    color: var(--primary);
}

.brand-sub {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
    display: block;
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 520px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    background: #f1f5f9;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

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

.search-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-hover);
}

/* Header Right Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.phone-widget {
    text-align: right;
    display: none;
}

@media (min-width: 860px) {
    .phone-widget {
        display: block;
    }
}

.phone-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.phone-number {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    display: block;
}

.cart-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    color: var(--primary-dark);
}

.cart-pill:hover {
    background: #dcfce7;
}

.cart-count-badge {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Navigation Bar */
.nav-bar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow-x: auto;
    white-space: nowrap;
    padding: 6px 0;
    scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-extra {
    display: none;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

@media (min-width: 900px) {
    .nav-extra {
        display: flex;
    }
}

/* Flash Messages */
.flash-bar {
    padding: 12px 0;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.flash-success {
    background: #dcfce7;
    color: #14532d;
    border-bottom: 1px solid #bbf7d0;
}

.flash-info {
    background: #f1f5f9;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
}

.flash-error {
    background: #ffe4e6;
    color: #9f1239;
    border-bottom: 1px solid #fecdd3;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #0f172a 100%);
    color: #fff;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    color: #a7f3d0;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.hero-title span {
    color: #6ee7b7;
}

.hero-lead {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.btn-primary {
    background: #22c55e;
    color: #052e16;
    font-weight: 800;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #4ade80;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    font-weight: 700;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
}

.stat-item h4 {
    font-size: 20px;
    font-weight: 900;
    color: #6ee7b7;
}

.stat-item p {
    font-size: 12px;
    color: #cbd5e1;
}

.hero-image-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 4px solid rgba(255,255,255,0.1);
}

.hero-image-card img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

.hero-floating-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #0f172a;
}

/* Category Strip */
.section {
    padding: 50px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
}

.cat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 12px;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cat-icon {
    font-size: 28px;
}

.cat-name {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

/* Product Cards Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
    transform: translateY(-3px);
}

.product-thumb-wrap {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f8fafc;
}

.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-card:hover .product-thumb {
    transform: scale(1.05);
}

.product-badge-corner {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 50px;
}

.product-origin-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.product-content {
    padding: 16px;
    flex: 1;
}

.product-cat-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.product-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 4px;
}

.product-title a:hover {
    color: var(--primary);
}

.product-unit {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.product-dietary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.dietary-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.product-footer {
    padding: 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.product-price {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
}

.product-price-old {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 4px;
}

.btn-add-cart {
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-add-cart:hover {
    background: var(--primary-hover);
}

/* Free Shipping Meter */
.shipping-meter-card {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.meter-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.meter-bar {
    width: 100%;
    height: 8px;
    background: #bbf7d0;
    border-radius: 50px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 50px;
    transition: width 0.4s ease;
}

/* Cart Page */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 900px) {
    .cart-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.cart-table-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cart-item {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 14px;
    font-weight: 800;
}

.cart-item-unit {
    font-size: 12px;
    color: var(--text-muted);
}

.cart-qty-form {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 6px;
}

.cart-qty-input {
    width: 45px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 13px;
    padding: 4px;
}

.cart-item-subtotal {
    font-size: 15px;
    font-weight: 900;
    text-align: right;
    min-width: 80px;
}

.btn-remove {
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 4px;
    display: block;
}

.summary-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    margin-top: 14px;
}

/* Forms (Checkout & Contact) */
.form-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

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

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 600px) {
    .form-row.two-col {
        grid-template-columns: 1fr 1fr;
    }
    .form-row.three-col {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Payment Method Box */
.cod-card {
    background: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.cod-badge {
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    padding: 10px;
    border-radius: var(--radius-sm);
}

/* Legal Pages & Policy Articles */
.legal-container {
    max-width: 860px;
    margin: 40px auto 60px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.legal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.legal-header h1 {
    font-size: 30px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.legal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.legal-content h2 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 26px;
    margin-bottom: 8px;
}

.legal-content p, .legal-content li {
    font-size: 14px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-content ul {
    margin-left: 20px;
    margin-bottom: 14px;
}

.legal-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 13px;
    color: #334155;
}

/* Footer */
.main-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 30px;
    border-top: 1px solid #1e293b;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
    font-size: 13px;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

.payment-badges {
    display: flex;
    gap: 6px;
}

.payment-badge {
    background: #1e293b;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #334155;
}

@media print {
    .top-bar, .main-header, .main-footer, .nav-bar, .btn-primary, .no-print {
        display: none !important;
    }
    body {
        background: #fff;
        color: #000;
    }
    .container, .legal-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }
}

/* Toast Notification Container */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 1px solid #334155;
    max-width: 360px;
}

.toast-item.toast-success {
    background: #064e3b;
    border-color: #059669;
    color: #ecfdf5;
}

.toast-item.toast-error {
    background: #881337;
    border-color: #e11d48;
    color: #fff1f2;
}

.toast-icon {
    font-size: 18px;
}

.toast-msg {
    line-height: 1.4;
}

.toast-fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

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

.badge-bounce {
    animation: badgePop 0.35s ease-out;
}

@keyframes badgePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.45); }
    100% { transform: scale(1); }
}

