/* ============================================================
   KAMVA DIGITAL SYSTEMS - PRODUCTS PAGE
   Loaded only on products.php via $extraStyles = ['products']
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */
.products-hero {
    min-height: auto;
    padding: 160px 0 60px;
    text-align: center;
}
.products-hero .hero-title {
    font-size: clamp(40px, 7vw, 88px);
}
.products-hero .hero-eyebrow {
    margin: 0 auto 32px;
}

/* ============================================================
   CART ALERT
   ============================================================ */
.cart-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-radius: 16px;
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 500;
    flex-wrap: wrap;
    animation: alertSlide 0.4s var(--ease-out);
}
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.cart-alert i { font-size: 18px; flex-shrink: 0; }
.cart-alert span { flex: 1; min-width: 0; }

.cart-alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(0,135,90,0.3);
}
.cart-alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(222,17,53,0.3);
}

.cart-alert-cta {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #1d1d1f;
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border-radius: 40px;
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
}
.cart-alert-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.cart-alert-cta i { font-size: 10px; }

/* ============================================================
   FILTER TABS
   ============================================================ */
.products-filters {
    padding: 0 0 40px;
    margin-bottom: 0;
}

.products-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.products-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    background: rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    border-radius: 40px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    font-family: inherit;
    white-space: nowrap;
}
.products-tab:hover {
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateY(-1px);
}
.products-tab.active {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
}
.products-tab i { font-size: 13px; }

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    background: rgba(0,0,0,0.06);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    transition: all 0.2s var(--ease);
}
.products-tab.active .tab-count {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Product card */
.product-card {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s var(--ease-out),
                border-color 0.3s var(--ease),
                box-shadow 0.3s var(--ease);
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #1d1d1f;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.12);
}

.product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

/* Media */
.product-media {
    position: relative;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #f5f5f7 0%, #ebebed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}
.product-card:hover .product-media img {
    transform: scale(1.06);
}

.product-icon {
    font-size: 56px;
    color: rgba(0,0,0,0.12);
    transition: transform 0.5s var(--ease-out), color 0.3s var(--ease);
}
.product-card:hover .product-icon {
    color: rgba(0,0,0,0.3);
    transform: scale(1.12) rotate(-5deg);
}

.product-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Body */
.product-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.product-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-mute);
}

.product-body h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--text);
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card:hover .product-body h3 {
    color: #000;
}

.product-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-dim);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Features tags */
.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.product-features span {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-dim);
    font-weight: 500;
}

/* Price + rating */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    gap: 12px;
    flex-wrap: wrap;
}
.product-price {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1;
}
.price-old {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-mute);
    text-decoration: line-through;
    margin-left: 6px;
}
.product-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #f5a623;
    font-weight: 600;
}

/* Actions */
.product-actions {
    display: flex;
    gap: 8px;
    padding: 0 22px 22px;
}

.product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    text-decoration: none;
    font-family: inherit;
    border: 1px solid transparent;
    flex: 1;
    white-space: nowrap;
}
.product-btn i { font-size: 12px; }

.product-btn-ghost {
    background: rgba(0,0,0,0.04);
    border-color: var(--border);
    color: var(--text-dim);
}
.product-btn-ghost:hover {
    border-color: var(--border-strong);
    color: var(--text);
    background: rgba(0,0,0,0.07);
}

.product-btn-primary {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
}
.product-btn-primary:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Empty state */
.products-empty-filter {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0,0,0,0.02);
    border: 1px dashed var(--border);
    border-radius: 24px;
}
.products-empty-filter i {
    font-size: 40px;
    color: var(--text-mute);
    margin-bottom: 16px;
    display: block;
}
.products-empty-filter h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 6px;
    font-weight: 700;
}
.products-empty-filter p {
    color: var(--text-dim);
    font-size: 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .products-hero {
        padding: 130px 0 40px;
    }
    .products-hero .hero-title {
        font-size: clamp(34px, 8vw, 52px);
    }

    .products-filters {
        padding: 0 0 24px;
    }
    .products-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .products-tabs::-webkit-scrollbar { display: none; }
    .products-tab {
        padding: 9px 14px;
        font-size: 12px;
        flex-shrink: 0;
    }
    .products-tab i { font-size: 11px; }
    .tab-count {
        min-width: 20px;
        height: 18px;
        font-size: 10px;
        padding: 0 6px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .product-body {
        padding: 18px;
    }
    .product-body h3 {
        font-size: 16px;
    }
    .product-actions {
        padding: 0 18px 18px;
    }
    .product-price {
        font-size: 18px;
    }

    .cart-alert {
        padding: 14px 18px;
        font-size: 13px;
        gap: 10px;
    }
    .cart-alert-cta {
        width: 100%;
        margin-left: 0;
        justify-content: center;
        padding: 10px 16px;
    }
}

@media (max-width: 500px) {
    .products-hero {
        padding: 120px 0 30px;
    }
    .product-media {
        aspect-ratio: 4/3;
    }
    .product-icon {
        font-size: 44px;
    }
    .product-body {
        padding: 16px;
        gap: 8px;
    }
    .product-body h3 {
        font-size: 15px;
    }
    .product-desc {
        font-size: 12.5px;
        -webkit-line-clamp: 2;
    }
    .product-features span {
        font-size: 10px;
        padding: 3px 8px;
    }
    .product-actions {
        padding: 0 16px 16px;
        flex-direction: column;
    }
    .product-btn {
        width: 100%;
    }
}