/* ============================================================
   PROIZVODI.CSS — Product Catalog Page Styles
   Inherits design tokens from style.css
   ============================================================ */

/* ---------- PAGE LAYOUT ---------- */
.catalog-page {
    display: flex;
    gap: var(--space-8);
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    align-items: flex-start;
}

/* ---------- CATALOG HERO BAND ---------- */
.catalog-hero {
    background-image: linear-gradient(to bottom, rgba(69, 26, 3, 0.7), rgba(69, 26, 3, 0.5)), url("pcelinjidarovi.jpg");
    background-size: cover;
    background-position: center;
    padding: var(--space-24) 0 var(--space-16);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    pointer-events: none;
}

.catalog-hero-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-4);
    position: relative;
}

.catalog-hero-sub {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.75);
    max-width: 520px;
    margin: 0 auto var(--space-8);
    position: relative;
}

/* ---------- SEARCH BAR ---------- */
.search-wrapper {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-4) 52px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: var(--color-white);
    font-size: var(--text-base);
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.search-input:focus {
    border-color: var(--color-amber-300);
    background: rgba(255, 255, 255, 0.18);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

/* ---------- MOBILE FILTER STRIP ---------- */
/* ============================================================
   MOBILE FILTER STRIP WITH NAVIGATION ARROWS
   ============================================================ */
@media (max-width: 899px) {
    .mobile-filter-wrapper {
        position: sticky;
        top: 80px; /* Тачно испод твог фиксног хедера */
        z-index: 150;
        background: var(--color-white);
    }

    .mobile-filter-strip {
        display: flex;
        gap: var(--space-2);
        overflow-x: auto;
        padding: var(--space-4) var(--space-6);
        border-bottom: 1px solid var(--color-border);
        scrollbar-width: none;
        position: relative;
    }

    /* Стрелице као индикатори скрола са замућењем иза себе */
    .scroll-indicator {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 5;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s;
        color: var(--color-primary);
    }

    .scroll-indicator i {
        width: 20px;
        height: 20px;
        background: var(--color-white);
        border-radius: 50%;
        box-shadow: var(--shadow-md);
        padding: 2px;
        pointer-events: auto;
        cursor: pointer;
    }

    .scroll-indicator.left {
        left: 0;
        background: linear-gradient(to right, var(--color-white) 40%, transparent);
    }

    .scroll-indicator.right {
        right: 0;
        background: linear-gradient(to left, var(--color-white) 40%, transparent);
    }

    .scroll-indicator.visible {
        opacity: 1;
    }

    .mobile-filter-strip::-webkit-scrollbar {
        display: none;
    }

    .filter-pill {
        flex-shrink: 0;
        padding: 6px 18px;
        border-radius: var(--radius-full);
        border: 1.5px solid var(--color-border);
        background: transparent;
        color: var(--color-text-light);
        font-size: var(--text-sm);
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.2s;
    }

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

/* ============================================================
   UPGRADED E-COMMERCE SIDEBAR (DESKTOP)
   ============================================================ */
.catalog-sidebar {
    display: none; /* Hidden on mobile by default */
    flex-direction: column;
    gap: var(--space-2);
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    background: var(--color-white);
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 900px) {
    .catalog-sidebar {
        display: flex;
    }
}

.sidebar-heading {
    font-size: var(--text-base);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-amber-900);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
    font-family: var(--font-display);
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: var(--color-text-light);
    font-weight: 500;
    border-left: 3px solid transparent;
    background: transparent;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
    cursor: pointer;
    border-top: none;
    border-right: none;
    border-bottom: none;
    font-size: var(--text-sm);
    width: 100%;
    text-align: left;
}

.sidebar-link i {
    width: 18px;
    height: 18px;
    color: var(--color-gray-400);
    transition: color var(--transition-fast);
}

/* Стање када је категорија активна или када се пређе мишем */
.sidebar-link:hover,
.sidebar-link.active {
    background: var(--color-honey-50);
    color: var(--color-amber-800);
    border-left-color: var(--color-primary);
    font-weight: 600;
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: var(--color-primary);
}

/* ---------- MAIN CONTENT ---------- */
.catalog-main {
    flex: 1;
    min-width: 0;
}

.no-results {
    display: none;
    text-align: center;
    padding: var(--space-16);
    color: var(--color-text-light);
}

.no-results.visible {
    display: block;
}

/* ---------- CATEGORY SECTION ---------- */
.category-section {
    margin-bottom: var(--space-16);
}

.category-section.hidden {
    display: none;
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--color-amber-200);
}

.category-icon {
    width: 48px;
    height: 48px;
    background: var(--color-honey-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon i {
    width: 24px;
    height: 24px;
    color: var(--color-amber-700);
}

.category-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-amber-900);
}

.category-count {
    margin-left: auto;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ---------- PRODUCT GRID ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

/* ---------- PRODUCT CARD ---------- */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(217, 119, 6, 0.12);
}

/* Badge row (Bio / Ručni rad / Novo) */
.card-badges {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
    z-index: 2;
}

.badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.badge-bio {
    background: #dcfce7;
    color: #166534;
}

.badge-rucni {
    background: var(--color-honey-100);
    color: var(--color-amber-800);
}

.badge-novo {
    background: #fce7f3;
    color: #9d174d;
}

/* Image area */
.card-image-wrapper {
    aspect-ratio: 1 / 1;
    background: var(--color-honey-50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s;
}

.product-card:hover .card-image {
    transform: scale(1.05);
}

.card-image-placeholder,
.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
    font-weight: 700;
    position: relative;
    box-sizing: border-box;
    text-align: center;
    gap: 8px;
}

.card-image-placeholder::before,
.product-image-placeholder::before {
    content: '🐝';
    font-size: 2.8rem;
    animation: floatBee 3s ease-in-out infinite;
}

.card-image-placeholder::after,
.product-image-placeholder::after {
    content: 'Pčelinji Darovi';
    font-family: var(--font-display);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #d97706;
    font-weight: 800;
}

.card-image-placeholder i,
.product-image-placeholder i {
    display: none;
}

@keyframes floatBee {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(5deg); }
}

/* Card body */
.card-body {
    padding: var(--space-4);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.card-name {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-amber-900);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.3em * 2);
}

.card-desc {
    font-size: var(--text-xs);
    color: var(--color-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc-full {
    display: none;
}

.card-desc-full.open {
    display: block;
}

.toggle-desc {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

/* Weight / Price Selector */
.weight-selector {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
    margin-top: var(--space-1);
}

.weight-option {
    display: none;
    /* Hide the radio */
}

.weight-label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-light);
    transition: all 0.15s;
    line-height: 1.3;
}

.weight-label .wt-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
}

.weight-option:checked+.weight-label {
    border-color: var(--color-primary);
    background: var(--color-honey-50);
    color: var(--color-amber-800);
}

/* Price display */
.card-price {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-top: auto;
}

.card-price .price-unit {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-weight: 400;
}

/* Card Footer / CTA buttons */
.card-footer {
    padding: 0 var(--space-3) var(--space-4);
    display: flex;
    gap: 6px;
    margin-top: auto;
}

.btn-cart,
.btn-call {
    flex: 1;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
}

.btn-cart {
    width: 100%;
    flex: none;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-cart:hover,
.btn-cart.added {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-call {
    background: var(--color-amber-900);
    color: var(--color-white);
    border: none;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(69, 26, 3, 0.2);
}

.btn-call:hover {
    background: #2c1102;
    /* Even darker amber */
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(69, 26, 3, 0.3);
}

.btn-call svg,
.btn-cart svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke-width: 2px;
}

/* ---------- BENTO HIGHLIGHT CARD ---------- */
.product-card.bento-highlight {
    border: 2px solid var(--color-amber-200);
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.1);
}

.product-card.bento-highlight::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-amber-200) 50%, transparent 50%);
    opacity: 0.3;
    pointer-events: none;
}

.product-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    background: var(--color-primary);
    color: var(--color-white);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 3;
    letter-spacing: 0.5px;
}

.product-meta {
    margin-bottom: var(--space-2);
}

.product-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-amber-700);
    background: var(--color-honey-50);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.product-tag i {
    width: 12px;
    height: 12px;
}

.btn-details-toggle {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    padding: var(--space-2) 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.btn-details-toggle:hover {
    color: var(--color-amber-800);
}

.btn-details-toggle i {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.btn-details-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.product-full-desc {
    display: none;
    font-size: var(--text-xs);
    color: var(--color-text-light);
    line-height: 1.5;
    padding: var(--space-3);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    margin-top: var(--space-2);
}

.product-full-desc.open {
    display: block;
    animation: fadeInSlide 0.3s ease-out;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-full-desc h4 {
    font-size: 12px;
    color: var(--color-amber-900);
    margin-bottom: var(--space-2);
}

.product-full-desc ul {
    margin-top: var(--space-2);
    padding-left: var(--space-4);
    list-style: disc;
}

.product-full-desc li {
    margin-bottom: 2px;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .mobile-filter-strip {
        display: none;
    }

    .catalog-sidebar {
        display: flex;
    }

    .catalog-page {
        padding: var(--space-10) var(--space-8);
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-footer {
        padding: 0 var(--space-4) var(--space-4);
        gap: var(--space-2);
    }
}

@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
