/* ================= RESET HELPERS ================= */
.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ================= TOP BAR ================= */
.category-topbar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 18px 64px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

/* LEFT */
.top-left h1 {
    font-size: 26px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.top-left p {
    font-size: 14px;
    color: #64748b;
}

/* CENTER */
.top-center {
    text-align: center;
}

.top-center input {
    padding: 11px 20px;
    width: 340px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-center input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* RIGHT */
.top-right {
    text-align: right;
}

/* 🔵 BACK TO CATEGORIES */
.back-btn {
    padding: 9px 18px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.15s ease;
}

.back-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* ================= PRODUCT SECTION ================= */
.product-section {
    padding: 28px 64px 72px;
    background: #f8fafc;
}

/* ================= SUBCATEGORY TITLE ================= */
.subcategory-title {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    margin: 42px 0 18px;
    position: relative;
}

/* 🟧 JAMUN-STYLE ORANGE HALF UNDERLINE */
.subcategory-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    background: #f97316;
    border-radius: 4px;
    margin-top: 6px;
}

/* ================= GRID ================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

/* ================= CARD ================= */
.product-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15,23,42,0.08);
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(15,23,42,0.18);
}

/* ================= IMAGE ================= */
.product-image {
    height: 210px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 14px;
}

/* ================= INFO ================= */
.product-info {
    padding: 18px;
    text-align: center;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 8px;
}

/* ================= PRICE ================= */
.price {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.old-price {
    font-size: 14px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 6px;
}

/* ================= STOCK ================= */
.stock {
    font-size: 14px;
    color: #475569;
    margin-bottom: 14px;
}

.out-of-stock {
    color: #dc2626;
    font-weight: 600;
}

/* ================= AMAZON-STYLE CTA (YELLOW) ================= */
.view-btn {
    display: inline-block;
    padding: 10px 22px;
    background: #facc15;
    color: #000000;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.view-btn:hover {
    background: #eab308;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(234,179,8,0.45);
}

/* ================= WISHLIST ================= */
.wishlist-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 5;
}

.wishlist-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.wishlist-btn.active {
    border-color: #ef4444;
}

/* ================= EMPTY ================= */
.no-products {
    text-align: center;
    font-size: 16px;
    color: #64748b;
}

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

    .category-topbar {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 12px;
    }

    .top-right {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .top-center input {
        width: 95%;
    }
}
/* ===== ANCHOR SAFETY FIX ===== */
.back-btn,
.back-btn:hover,
.card-link,
.card-link:hover {
    text-decoration: none !important;
}
