/* =====================================================
   NAROWAL.INFO — PRODUCT CATALOG CSS
   Save as: /wp-content/themes/narowal-info/assets/css/catalog.css
===================================================== */

/* ── PRODUCTS TAB ── */
.products-tab-wrap {
    padding: 24px 0;
}

/* ── CATEGORY FILTER PILLS ── */
.prod-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--g2);
}
.prod-filter-pill {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    border: 2px solid var(--g2);
    background: #fff;
    color: var(--g4);
    cursor: pointer;
    transition: var(--tr);
    font-family: var(--font);
}
.prod-filter-pill:hover,
.prod-filter-pill.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

/* ── PRODUCTS GRID ── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media(max-width:900px) { .products-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:500px) { .products-grid { grid-template-columns: 1fr; } }

/* ── SINGLE PRODUCT CARD ── */
.prod-card {
    background: #fff;
    border: 1px solid var(--g2);
    border-radius: var(--rl);
    overflow: hidden;
    transition: var(--tr);
    display: flex;
    flex-direction: column;
}
.prod-card:hover {
    box-shadow: var(--shl);
    border-color: var(--green);
    transform: translateY(-2px);
}
.prod-img {
    height: 180px;
    overflow: hidden;
    background: var(--g1);
    position: relative;
}
.prod-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prod-img-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: linear-gradient(135deg, #f0faf5, #e8f9f3);
    color: var(--green);
}
.prod-badge-wrap {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
}
.prod-cat-badge {
    background: var(--navy);
    color: #fff;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
}
.prod-out-badge {
    background: var(--red);
    color: #fff;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
}
.prod-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.prod-title {
    font-weight: 700;
    font-size: .96rem;
    color: var(--navy);
    margin-bottom: 5px;
    line-height: 1.3;
}
.prod-desc {
    font-size: .8rem;
    color: var(--g3);
    line-height: 1.5;
    margin-bottom: 10px;
    flex: 1;
}
.prod-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.prod-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--green);
    font-family: var(--font-h);
}
.prod-old-price {
    font-size: .82rem;
    color: var(--g3);
    text-decoration: line-through;
}
.prod-unit {
    font-size: .74rem;
    color: var(--g3);
    margin-left: auto;
}
/* Quantity Selector */
.qty-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 12px;
    border: 2px solid var(--g2);
    border-radius: var(--r);
    overflow: hidden;
    width: fit-content;
}
.qty-btn {
    width: 34px;
    height: 34px;
    background: var(--g1);
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--tr);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: var(--green); color: #fff; }
.qty-input {
    width: 42px;
    height: 34px;
    border: none;
    border-left: 1px solid var(--g2);
    border-right: 1px solid var(--g2);
    text-align: center;
    font-size: .9rem;
    font-weight: 700;
    color: var(--navy);
    font-family: var(--font);
    outline: none;
}
.prod-card .btn-add-cart {
    width: 100%;
    justify-content: center;
    margin-top: auto;
    font-size: .88rem;
    padding: 10px;
}
.prod-card.out-of-stock .btn-add-cart {
    background: var(--g2);
    border-color: var(--g2);
    color: var(--g3);
    cursor: not-allowed;
    pointer-events: none;
}
.prod-added-anim {
    animation: addedPulse .35s ease;
}
@keyframes addedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(.95); }
    100% { transform: scale(1); }
}

/* ── NO PRODUCTS STATE ── */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--g3);
}
.no-products .icon { font-size: 3.5rem; margin-bottom: 14px; }
.no-products h3 { color: var(--g4); margin-bottom: 8px; }

/* ── FLOATING CART BUTTON ── */
#ni-cart-fab {
    position: fixed;
    bottom: 80px;
    right: 22px;
    width: 56px;
    height: 56px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,182,122,.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9990;
    transition: var(--tr);
}
#ni-cart-fab.visible { display: flex; }
#ni-cart-fab:hover { background: var(--green-d); transform: scale(1.08); }
#ni-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ── CART DRAWER ── */
#ni-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99990;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
#ni-cart-overlay.open { opacity: 1; pointer-events: all; }

#ni-cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #fff;
    z-index: 99991;
    display: flex;
    flex-direction: column;
    transition: right .32s cubic-bezier(.4,0,.2,1);
    box-shadow: -8px 0 40px rgba(0,0,0,.18);
}
#ni-cart-drawer.open { right: 0; }

.cart-hdr {
    background: var(--navy);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.cart-hdr h3 {
    color: #fff;
    font-size: 1rem;
    margin: 0;
}
.cart-biz-tag {
    font-size: .74rem;
    color: rgba(255,255,255,.55);
    margin-top: 3px;
}
.cart-close {
    background: rgba(255,255,255,.12);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr);
    flex-shrink: 0;
}
.cart-close:hover { background: rgba(255,255,255,.25); }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--g2); border-radius: 2px; }

.cart-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--g2);
}
.cart-item:last-child { border-bottom: none; }
.ci-img {
    width: 56px;
    height: 56px;
    border-radius: var(--r);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--g1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-info { flex: 1; min-width: 0; }
.ci-title {
    font-weight: 700;
    font-size: .88rem;
    color: var(--navy);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ci-unit { font-size: .74rem; color: var(--g3); }
.ci-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}
.ci-subtotal {
    font-weight: 700;
    color: var(--green);
    font-size: .92rem;
}
.ci-qty-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--g2);
    border-radius: 6px;
    overflow: hidden;
}
.ci-qty-btn {
    width: 26px;
    height: 26px;
    background: var(--g1);
    border: none;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-weight: 700;
    transition: var(--tr);
}
.ci-qty-btn:hover { background: var(--green); color: #fff; }
.ci-qty-num {
    width: 28px;
    text-align: center;
    font-size: .82rem;
    font-weight: 700;
    border: none;
    border-left: 1px solid var(--g2);
    border-right: 1px solid var(--g2);
    color: var(--navy);
}
.ci-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--g3);
    font-size: .9rem;
    padding: 4px;
    transition: var(--tr);
    flex-shrink: 0;
}
.ci-remove:hover { color: var(--red); }

/* Empty cart */
.cart-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--g3);
}
.cart-empty .icon { font-size: 3rem; margin-bottom: 12px; }

/* Cart customer info */
.cart-customer-info {
    padding: 14px 16px;
    border-top: 2px solid var(--g2);
    background: var(--g1);
    flex-shrink: 0;
}
.cart-customer-info h4 {
    font-size: .84rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--navy);
}
.cart-input {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid var(--g2);
    border-radius: var(--r);
    font-size: .84rem;
    font-family: var(--font);
    outline: none;
    margin-bottom: 8px;
    transition: var(--tr);
    background: #fff;
}
.cart-input:focus { border-color: var(--green); }
.cart-input:last-child { margin-bottom: 0; }

/* Cart Footer */
.cart-foot {
    padding: 16px;
    border-top: 2px solid var(--g2);
    flex-shrink: 0;
    background: #fff;
}
.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: var(--green-l);
    border-radius: var(--r);
    border: 1px solid rgba(0,182,122,.2);
}
.cart-total-label {
    font-weight: 700;
    font-size: .92rem;
    color: var(--navy);
}
.cart-total-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--green);
    font-family: var(--font-h);
}
.cart-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: var(--r);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--tr);
    font-family: var(--font);
    margin-bottom: 10px;
    text-decoration: none;
}
.cart-wa-btn:hover { background: #1da851; color: #fff; }
.cart-wa-btn svg { flex-shrink: 0; }
.cart-clear-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--red);
    border: 2px solid var(--red);
    border-radius: var(--r);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tr);
    font-family: var(--font);
}
.cart-clear-btn:hover { background: var(--red); color: #fff; }

/* ── MOBILE ── */
@media(max-width:480px) {
    #ni-cart-drawer { max-width: 100%; }
    .products-grid { grid-template-columns: repeat(2,1fr); gap:12px; }
    .prod-img { height: 140px; }
}
@media(max-width:360px) {
    .products-grid { grid-template-columns: 1fr; }
}
