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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

/* Accessibility - Visually Hidden */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.social-icons {
    display: grid;
    grid-template-columns: repeat(3, 36px);
    gap: 0.25rem;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-bg);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.social-icon.whatsapp:hover {
    background: #25D366;
    color: var(--white);
}

.social-icon.instagram:hover {
    background: #E4405F;
    color: var(--white);
}

.social-icon.facebook:hover {
    background: #1877F2;
    color: var(--white);
}

.social-icon.tiktok:hover {
    background: #000000;
    color: var(--white);
}

.social-icon.email:hover {
    background: #EA4335;
    color: var(--white);
}

.social-icon.phone:hover {
    background: #34C759;
    color: var(--white);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    justify-self: center;
}

.logo-link {
    display: block;
    cursor: pointer;
    transition: transform 0.2s;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    height: 75px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

.cart-section {
    justify-self: end;
}

.cart-button {
    position: relative;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.cart-button:hover {
    background: #2980b9;
}

.cart-count {
    background: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Search Bar */
.search-container {
    max-width: 1400px;
    margin: 1rem auto 1rem;
    padding: 0 2rem;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--white);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    opacity: 0.5;
    pointer-events: none;
}

/* Filters */
.filters-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.filters {
    background: var(--white);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.filter-header {
    display: none;
}

.filter-toggle-icon {
    transition: transform 0.3s;
}

.filters.open .filter-toggle-icon {
    transform: rotate(180deg);
}

.filter-label {
    font-weight: 600;
    color: var(--primary-color);
}

#currentFilter {
    color: var(--secondary-color);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--secondary-color);
    background: var(--white);
    color: var(--secondary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: var(--white);
}

/* Products Grid */
.products-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

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

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

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

.product-images {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.product-image.active {
    display: block;
}

.image-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--white);
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.product-category {
    display: inline-block;
    background: var(--light-bg);
    color: var(--secondary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--accent-color);
}

.view-details-btn,
.add-to-cart-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s;
    font-weight: 600;
}

.view-details-btn:hover,
.add-to-cart-btn:hover {
    background: #2980b9;
}

/* Product Detail Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2001;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.product-modal.active {
    display: flex;
}

.product-modal-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    line-height: 1;
    padding: 0.25rem 0.75rem;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.3s;
}

.close-modal:hover {
    background: var(--light-bg);
}

.product-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem 2rem 2rem;
}

.product-modal-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    width: 100%;
    height: 400px;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
}

.modal-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.thumbnail-image:hover {
    border-color: var(--secondary-color);
}

.thumbnail-image.active {
    border-color: var(--secondary-color);
}

.product-modal-info {
    display: flex;
    flex-direction: column;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.modal-category {
    display: inline-block;
    background: var(--light-bg);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    align-self: flex-start;
}

.modal-description {
    color: #666;
    font-size: 1rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.modal-description ul {
    padding-left: 1.5rem;
    line-height: 1.8;
}

.modal-description li {
    margin-bottom: 0.5rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 2px solid var(--light-bg);
}

.modal-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.modal-add-to-cart-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
    font-weight: 600;
}

.modal-add-to-cart-btn:hover {
    background: #2980b9;
}

/* Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
}

.cart-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    line-height: 1;
    padding: 0;
}

.cart-items {
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-bg);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

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

.cart-item-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

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

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qty-btn {
    background: var(--light-bg);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.qty-btn:hover {
    background: #ddd;
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-item {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.cart-summary {
    padding: 1.5rem;
    background: var(--light-bg);
    border-top: 2px solid #ddd;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    padding-top: 0.75rem;
    border-top: 2px solid #ddd;
}

.checkout-btn {
    width: 100%;
    background: #25D366;
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #20BA5A;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0.5rem;
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
        align-items: center;
    }

    .social-icons {
        justify-content: flex-start;
        order: 1;
    }

    .logo-container {
        order: 2;
        justify-self: center;
    }

    .cart-section {
        order: 3;
        justify-self: flex-end;
    }

    .logo {
        height: 50px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .social-icons {
        grid-template-columns: repeat(3, 28px);
        gap: 0.15rem;
    }

    .social-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .cart-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .filters-container,
    .products-container {
        padding: 0 1rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        width: 100%;
        padding: 0.25rem 0;
    }

    .filter-buttons {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        flex-direction: column;
        width: 100%;
        margin-top: 0;
    }

    .filters.open .filter-buttons {
        max-height: 500px;
        margin-top: 1rem;
    }

    .filter-btn {
        width: 100%;
        text-align: left;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-price {
        font-size: 0.85rem;
    }

    .view-details-btn,
    .add-to-cart-btn {
        padding: 0.35rem 0.65rem;
        font-size: 0.65rem;
    }

    .cart-content {
        width: 95%;
    }

    .product-modal {
        padding: 0.5rem;
    }

    .product-modal-content {
        max-height: 95vh;
    }

    .product-modal-body {
        grid-template-columns: 1fr;
        padding: 2.5rem 0.75rem 0.75rem;
        gap: 1rem;
    }

    .main-image-container {
        height: 200px;
    }

    .thumbnail-image {
        width: 60px;
        height: 60px;
    }

    .modal-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .modal-category {
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .modal-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .modal-description ul {
        padding-left: 1.25rem;
        line-height: 1.6;
    }

    .modal-description li {
        margin-bottom: 0.35rem;
    }

    .modal-footer {
        padding-top: 1rem;
    }

    .modal-price {
        font-size: 1.3rem;
    }

    .modal-add-to-cart-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .close-modal {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.5rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    margin-top: 4rem;
}

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

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-logo {
    height: 60px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-social-icon:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.footer-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

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

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pagination-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination-number:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.pagination-number.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.5rem;
    }
    
    .pagination-btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .pagination-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}
