﻿/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #0F260E; /* header, footer*/
    --secondary-green: #283618; /* search field, payment button , etc*/
    --accent-yellow: #DEC55F; /* review orders, etc */
    --cream-bg: #FEFAE0; /* background */
    --light-cream: #faf8f3;
    --orange-brown: #BC6C25; /* items footer */
    --forest-green: #436B38; /* items footer */
    --text-dark: #2c2c2c;
    --text-light: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

/* Search Section */
.search-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.search-bar {
    display: flex;
    background-color: var(--primary-green);
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    max-width: 500px;
    box-shadow: var(--shadow);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background-color: var(--primary-green);
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
}

    .search-input::placeholder {
        color: rgba(255,255,255,0.7);
    }

.filter-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(255,255,255,0.2);
    transition: background-color 0.3s ease;
}

    .filter-btn:hover {
        background-color: rgba(255,255,255,0.1);
    }

.product-count {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

    .product-count span {
        font-weight: 700;
        color: var(--forest-green);
    }

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    justify-items: center;
}

.product-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease;
    width: 280px;
    margin: 20px 0;
    /* background: #e6ba65;           outer golden frame */
    border-radius: 16px;
    padding: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Alternate card colors */
.product-card:nth-child(4n+1) .product-info,
.product-card:nth-child(4n+3) .product-info,
.product-card:nth-child(4n+1) .buy-btn,
.product-card:nth-child(4n+3) .buy-btn {
    background-color: var(--orange-brown);
}

.product-card:nth-child(4n+2) .product-info,
.product-card:nth-child(4n+4) .product-info,
.product-card:nth-child(4n+2) .buy-btn,
.product-card:nth-child(4n+4) .buy-btn {
    background-color: var(--forest-green);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--light-cream);
}

.product-card-inner {
    border-radius: 12px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    background: #b86b22;
    padding: 24px 26px 22px;
/*    color: #fff;*/
/*    padding: 1.5rem;*/
    color: var(--text-light);
}

.product-text h2 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 500;
}

.product-text .subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

.product-price {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-bottom {
    margin-top: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    gap: 12px;
}

.price-quantity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 20px;
}

.price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-eur {
    font-size: 0.9rem;
    font-weight: 600;
}

.price-bgn {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.85;
}

.product-card .quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-card .qty-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-card .qty-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.product-card .qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
}

.buy-btn {
    color: var(--text-light);
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
/*    display: inline-flex;*/
    display: flex;
    align-items: center;
    border: 1px solid var(--cream-bg);
    /*    border-top: 1px solid var(--cream-bg);*/
    gap: 8px;
    background: transparent;
    margin: 0;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.buy-btn:hover {
    background-color: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.buy-btn.added {
    background-color: var(--accent-yellow);
    color: var(--primary-green);
    animation: pulse 0.5s ease;
}

.buy-btn .cart-icon {
    font-size: 10px; /* placeholder for icon */
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.buy-btn svg {
    width: 18px;
    height: 18px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    background-color: var(--light-cream);
    color: var(--text-dark);
    border: 1px solid var(--primary-green);
    padding: 8px 12px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .page-btn:hover:not(:disabled) {
        background-color: var(--primary-green);
        color: var(--text-light);
    }

    .page-btn.active {
        background-color: var(--primary-green);
        color: var(--text-light);
    }

    .page-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .page-btn svg {
        width: 20px;
        height: 20px;
    }

/* Responsive Design */
/*@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-green);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

        .nav-menu.active {
            display: flex;
        }

    .nav-wrapper {
        flex-wrap: wrap;
    }

    .search-section {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        max-width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: 1rem;
    }

    .product-name {
        font-size: 0.9rem;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-btn {
        min-width: 35px;
        min-height: 35px;
        font-size: 0.9rem;
    }
}*/
