:root {
    --primary: #1f3c88;
    --secondary: #f4b41a;
    --success: #25d366;
    --danger: #dc3545;
    --light: #f4f6fb;
    --dark: #111;
    --white: #fff;
    --gray: #6c757d;
    --border: #ddd;
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--light);
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, #152a5c 100%);
    color: var(--white);
    padding: 15px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-area img {
    height: 50px;
    border-radius: 8px;
}

.logo-area h1 {
    font-size: 1.4rem;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 5px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
}

nav a.active {
    background: var(--secondary);
    color: var(--dark);
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 10px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--secondary);
    color: var(--dark);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
}

section {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--gray);
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #152a5c 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 5%;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 12px 25px;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.category-tab:hover,
.category-tab.active {
    background: var(--primary);
    color: var(--white);
}

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

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.product-info p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #152a5c;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #1da851;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #d9a018;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.out-of-stock {
    opacity: 0.6;
}

.out-of-stock .btn {
    background: var(--gray);
    cursor: not-allowed;
}

.stock-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.in-stock {
    background: #d4edda;
    color: #155724;
}

.no-stock {
    background: #f8d7da;
    color: #721c24;
}

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

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

.cart-header {
    background: var(--primary);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

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

.cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.cart-item-info p {
    color: var(--gray);
    font-size: 0.85rem;
}

.cart-item-price {
    font-weight: bold;
    color: var(--secondary);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.quantity-control button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: var(--light);
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.quantity-control span {
    font-weight: bold;
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid var(--border);
    background: var(--light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.cart-total span:last-child {
    color: var(--secondary);
}

.checkout-options {
    margin-bottom: 20px;
}

.checkout-options h4 {
    margin-bottom: 10px;
    color: var(--primary);
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover,
.payment-option.selected {
    border-color: var(--primary);
    background: rgba(31, 60, 136, 0.05);
}

.payment-option input {
    display: none;
}

.payment-option .icon {
    font-size: 1.5rem;
}

.payment-option .label {
    flex: 1;
}

.payment-option .label strong {
    display: block;
    margin-bottom: 2px;
}

.payment-option .label small {
    color: var(--gray);
}

.customer-form {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

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

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

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

.about-text h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.about-text p {
    margin-bottom: 15px;
    color: #555;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-info-card .icon {
    font-size: 2rem;
    color: var(--primary);
}

.contact-info-card h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

footer {
    background: var(--dark);
    color: #ccc;
    padding: 40px 5%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #333;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}
