
:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --light-blue: #eff6ff;
    --accent-blue: #1d4ed8;
    --dark-blue: #1e40af;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
}

body.cart-open {
    overflow: hidden;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    box-shadow: var(--shadow);
    border: none;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white) !important;
    letter-spacing: -0.025em;
}

.navbar-brand i {
    background: linear-gradient(45deg, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 0.5rem;
}

.btn-cart {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 50px;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.btn-cart:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
    line-height: 1;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 400;
    margin-bottom: 2rem;
}

.hero-cta {
    background: var(--white);
    color: var(--primary-blue);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.hero-cta:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.alert-section {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
    padding: 1rem 0;
    text-align: center;
    font-weight: 500;
    box-shadow: var(--shadow);
}

.alert-section i {
    margin-right: 0.5rem;
}

.main-content {
    padding: 3rem 0;
    min-height: 60vh;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.025em;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    box-shadow: var(--shadow);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.125rem;
}

.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

#products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 0;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

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

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-blue);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-description {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.product-stock {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--accent-blue) 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-blue) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--light-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-blue);
}

.cart-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
}

.btn-close-cart {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close-cart:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.cart-sidebar-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.cart-sidebar-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--light-blue);
    background: var(--bg-light);
}

.cart-total-section {
    text-align: center;
    margin-bottom: 1rem;
}

.cart-total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.cart-pickup-info {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

.btn-whatsapp {
    background: #25d366;
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #128c7e;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.cart-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-light);
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cart-empty h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.cart-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--light-blue);
    flex-shrink: 0;
}

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

.cart-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.cart-item-details {
    color: var(--text-light);
    font-size: 0.75rem;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.contact-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.contact-info {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.contact-info a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-info a:hover {
    opacity: 0.8;
}

.contact-info i {
    margin-right: 0.5rem;
    opacity: 0.9;
}

.footer-section {
    background: var(--text-dark);
    color: var(--white);
    padding: 2rem 0;
}

.internal-access-btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    border-radius: 6px;
    font-size: 0.875rem;
}

.internal-access-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
    transform: translateY(-1px);
}

.loading {
    text-align: center;
    padding: 3rem 0;
}

.spinner-border {
    color: var(--secondary-blue);
}

.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-blue);
    opacity: 0.7;
}

.no-results h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.no-results p {
    margin-bottom: 1.5rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.btn-pulse {
    animation: pulse 0.6s ease-in-out;
}

@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        padding: 0.75rem 0;
    }

    body {
        padding-top: 70px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-section {
        padding: 2rem 0;
    }

    #products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .internal-access-btn {
        margin-top: 1rem;
    }

    .cart-sidebar {
        width: 100vw;
        right: -100vw;
        top: 70px; /* Account for fixed header */
        height: calc(100vh - 70px);
    }

    .cart-sidebar.open {
        right: 0;
    }

    .cart-sidebar-content {
        padding: 0.75rem;
    }

    .cart-sidebar-header {
        padding: 1rem;
    }

    .cart-sidebar-footer {
        padding: 1rem;
    }

    .cart-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .cart-item-image {
        width: 45px;
        height: 45px;
    }

    .cart-overlay {
        top: 70px;
        height: calc(100vh - 70px);
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.5rem 0;
    }

    body {
        padding-top: 60px;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .main-content {
        padding: 1.5rem 0;
    }

    #products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cart-sidebar {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .cart-overlay {
        top: 60px;
        height: calc(100vh - 60px);
    }

    .btn-cart {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }

    .cart-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media print {
    .navbar,
    .footer-section,
    .cart-section,
    .contact-section {
        display: none;
    }
}