/* ============================================
   Mr. Smile Fish Haven — Product Page CSS
   ============================================ */

/* ── CATALOG LAYOUT ── */
.catalog { padding: 4rem 0; }

.catalog-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* ── FILTER SIDEBAR ── */
.filters {
    flex: 0 0 260px;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(22,104,22,0.12);
    border: 1px solid rgba(144,238,144,0.3);
    position: sticky;
    top: 100px;
}

.filters .filter-group {
    max-height: 240px;
    overflow: auto;
    padding-right: .25rem;
}

.filters h3 {
    color: #166816;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #E0F2E9;
}

.filter-group { margin-bottom: 1.5rem; }

.filter-group h4 {
    color: #228B22;
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    color: #2F4F2F;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    border-radius: 6px;
    transition: background 0.2s;
}

.filter-group label:hover { background: #F0F8F0; padding-left: 0.3rem; }

.filter-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #228B22;
    cursor: pointer;
}

.reset-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.reset-btn:hover { background: linear-gradient(135deg, #495057, #343a40); transform: translateY(-2px); }

/* ── PRODUCTS GRID ── */
.products-wrapper { flex: 1; }

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-count { color: #4a7a4a; font-size: 0.95rem; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(22,104,22,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(144,238,144,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #228B22, #90EE90);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(22,104,22,0.2);
    border-color: #90EE90;
}

.product-card:focus-within {
    outline: 2px solid #79b87a;
    outline-offset: 2px;
}

.product-image {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #E0F2E9, #C8E6C9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img { transform: scale(1.05); }

.product-info {
    padding: 1.2rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h4 { font-size: 1.1rem; color: #166816; margin-bottom: 0.6rem; font-weight: 700; }

.product-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }

.meta-tag {
    background: #F0F8F0;
    color: #228B22;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(144,238,144,0.5);
}

.price {
    font-weight: 700;
    color: #228B22;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.negotiate-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #228B22, #90EE90);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    margin-top: auto;
}

.negotiate-btn:hover {
    background: linear-gradient(135deg, #166816, #228B22);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22,104,22,0.3);
}

.stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(22,104,22,0.85);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.stock-badge.low { background: rgba(220,53,69,0.85); }

/* No results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #4a7a4a;
    border: 1px dashed #d9e8d9;
    border-radius: 14px;
    background: #fafdf9;
}

.no-results i { font-size: 3rem; margin-bottom: 1rem; display: block; }

/* ── MODAL ── */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal.active { display: flex; }

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 500px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
    border-top: 5px solid #228B22;
}

@keyframes modalIn {
    from { transform: scale(0.85) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    right: 1.5rem; top: 1.2rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
    background: none;
    border: none;
    transition: color 0.2s;
}

.modal-close:hover { color: #333; }
.modal-content h3 { color: #166816; font-size: 1.5rem; margin-bottom: 0.5rem; }
.modal-fish-name { color: #4a7a4a; margin-bottom: 1.5rem; font-size: 0.95rem; }

/* ── MOST LOVED & POPULAR ── */
.loved-section { padding: 4rem 0; }
.loved-section h2 { text-align: center; margin-bottom: 2.5rem; font-size: 2rem; color: #166816; }

.loved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.loved-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(22,104,22,0.1);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid rgba(144,238,144,0.3);
}

.loved-card:hover { transform: translateY(-8px); }

.loved-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.loved-card h4 { padding: 1rem; color: #166816; font-size: 1.1rem; }

/* ── POPULAR ── */
.popular-section { padding: 4rem 0; }
.popular-section h2 { text-align: center; margin-bottom: 2.5rem; font-size: 2rem; color: #166816; }

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.popular-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.popular-card img { width: 100%; height: 350px; object-fit: cover; display: block; }

.testimonial {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
}

.testimonial p { font-style: italic; font-size: 0.95rem; }

/* ── FEATURE HIGHLIGHTS ── */
.features-section { padding: 4rem 0; background: rgba(255,255,255,0.5); border-radius: 20px; margin: 2rem 0; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    text-align: center;
}

.feature-highlight {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 30px rgba(22,104,22,0.1);
    transition: transform 0.3s;
    border-top: 4px solid #228B22;
}

.feature-highlight:hover { transform: translateY(-8px); }
.feature-highlight i { font-size: 2.5rem; color: #228B22; margin-bottom: 1rem; display: block; }
.feature-highlight h3 { color: #166816; font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature-highlight p { color: #6c757d; font-size: 0.95rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .catalog-wrapper { flex-direction: column; }
    .filters { flex: none; position: static; width: 100%; }
    .filters .filter-group { max-height: none; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .products-grid { grid-template-columns: 1fr; }
}