/* ========== RESET & VARIABLES ========== */
:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #e67e22;
    --danger-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --border-color: #ecf0f1;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #fff;
}

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

/* ========== HEADER ========== */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

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

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

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

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

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.admin-link {
    color: var(--secondary-color) !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 10px 35px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 250px;
    font-size: 0.9rem;
}

.search-container i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.cart-icon {
    position: relative;
    color: var(--text-dark);
    font-size: 1.5rem;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 80px 0;
    text-align: center;
}

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

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

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-email {
    background: #3498db;
    color: white;
}

.btn-email:hover {
    background: #2980b9;
}

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

.btn-danger:hover {
    background: #c0392b;
}

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

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

.btn-block {
    display: block;
    width: 100%;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* ========== FILTERS ========== */
.filters-section {
    padding: 30px 0;
    background: var(--bg-light);
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 25px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

/* ========== PRODUCTS GRID ========== */
.products-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 15px auto;
}

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

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--danger-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 1;
}

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

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.4;
}

.weight-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.weight-selector label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.weight-select {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.regular-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.old-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.promo-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--danger-color);
}

.discount-badge {
    background: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

/* ========== CONTACT SECTION ========== */
.contact-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-item h3 {
    margin-bottom: 10px;
}

.whatsapp-order {
    text-align: center;
}

/* ========== FOOTER ========== */
.footer {
    background: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: white;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--border-radius);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ========== CART PAGE ========== */
.cart-page {
    padding: 60px 0;
    min-height: 60vh;
}

.page-title {
    margin-bottom: 40px;
    font-size: 2rem;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.cart-items-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-item-info h3 {
    margin-bottom: 5px;
}

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

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

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

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 5px;
}

.cart-item-total {
    font-weight: bold;
    color: var(--primary-color);
}

.remove-item {
    color: var(--danger-color);
    cursor: pointer;
    transition: var(--transition);
}

.remove-item:hover {
    transform: scale(1.1);
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.cart-summary-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-details {
    margin: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: bold;
    border-top: 2px solid var(--border-color);
    margin-top: 10px;
    padding-top: 15px;
}

.order-form {
    margin: 30px 0;
}

.order-form h3 {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.weights-input {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.weights-input label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

.order-options {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

/* ========== ADMIN PAGE ========== */
.admin-page {
    background: var(--bg-light);
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-hint {
    text-align: center;
    margin-top: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.dashboard-header {
    background: white;
    box-shadow: var(--shadow);
    padding: 20px 0;
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
}

.dashboard-container {
    padding: 40px 20px;
}

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

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.product-form-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.product-form-section h3 {
    margin-bottom: 20px;
}

#currentImagePreview {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-light);
    display: inline-block;
}

#currentImage {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    display: block;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.products-list-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.table-responsive {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.products-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.products-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.products-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    background-color: var(--bg-light);
    display: block;
}

.products-table td:first-child {
    width: 80px;
    text-align: center;
}

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

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: var(--transition);
}

.btn-icon.edit {
    color: var(--primary-color);
}

.btn-icon.delete {
    color: var(--danger-color);
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2c3e50;
    color: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.modal-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }
    
    .cart-item-quantity {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 10px;
    }
    
    .search-container {
        display: none;
    }
    
    .category-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}