/* ===================================
   Production-Ready Ecommerce CSS
   Clean, Modern, Trustworthy Design
   =================================== */

/* ===== Design Tokens ===== */
:root {
    /* Colors - Neutral & Professional */
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;

    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: #DBEAFE;
    --accent: #10B981;
    --accent-hover: #059669;
    --danger: #DC2626;
    --warning: #F59E0B;
    --success: #10B981;

    /* Spacing System */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows - Subtle & Professional */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    --font-size-4xl: 36px;

    /* Layout */
    --container-width: 1200px;
    --header-height: 70px;
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Container ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin-bottom: var(--space-md);
    color: var(--gray-700);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-400);
}

/* ===== Cards ===== */
.card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

/* ===== Product Cards ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--gray-300);
}

.product-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--gray-100);
}

.product-card-body {
    padding: var(--space-md);
}

.product-card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.product-card-price {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary);
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background-color: #D1FAE5;
    color: var(--success);
}

.badge-warning {
    background-color: #FEF3C7;
    color: var(--warning);
}

.badge-danger {
    background-color: #FEE2E2;
    color: var(--danger);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--font-size-base);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background-color: var(--white);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ===== Header ===== */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--space-lg);
}

.logo img {
    height: 40px;
    width: auto;
}

.category-nav {
    display: none;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .category-nav {
        display: flex;
    }
}

.category-nav a {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    padding: var(--space-sm) 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.category-nav a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cart-icon {
    position: relative;
    padding: var(--space-sm);
}

.cart-icon .badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--danger);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* ===== Sections ===== */
.section {
    padding: var(--space-3xl) 0;
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xl);
    text-align: center;
}

/* ===== Utilities ===== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--gray-600);
}

.mt-1 {
    margin-top: var(--space-sm);
}

.mt-2 {
    margin-top: var(--space-md);
}

.mt-3 {
    margin-top: var(--space-lg);
}

.mb-1 {
    margin-bottom: var(--space-sm);
}

.mb-2 {
    margin-bottom: var(--space-md);
}

.mb-3 {
    margin-bottom: var(--space-lg);
}

/* ===== Mobile Bottom Navbar ===== */
.mobile-navbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: var(--space-sm) 0;
}

@media (min-width: 768px) {
    .mobile-navbar {
        display: none;
    }
}

.mobile-navbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--space-sm);
    color: var(--gray-600);
    font-size: var(--font-size-xs);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-navbar-item:hover,
.mobile-navbar-item.active {
    color: var(--primary);
}

/* ===== WhatsApp Button ===== */
.whatsapp-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all 0.2s ease;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 20px rgba(37, 211, 102, 0.3);
}

@media (min-width: 768px) {
    .whatsapp-button {
        bottom: 20px;
    }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 767px) {
    body {
        padding-bottom: 70px;
        /* Space for mobile navbar */
    }

    .container,
    .container-wide {
        padding: 0 var(--space-md);
    }

    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    .section {
        padding: var(--space-xl) 0;
    }
}