﻿/* ===== Category / collection pages â€” Phase 5 premium redesign =====
   Scoped to the category hero, nav, grid and related-category sections.
   Linked only in the 7 category pages' own <head> (dryfruits, nuts, oils,
   spices, millets, rice, combo) â€” shop.php, index.php and productdetail.php
   have their own separate stylesheets and are untouched by this file. */

:root {
    --v-cat-green: #1d3354;
    --v-cat-green-dark: #13233a;
    --v-cat-cream: #faf6ee;
    --v-cat-line: #e7e1d4;
}

/* -------------------------------------------------------------------- */
/* Hero / banner                                                        */
/* -------------------------------------------------------------------- */
.v-cat-hero {
    position: relative;
}

.v-cat-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(19, 35, 58, 0.55) 0%, rgba(19, 35, 58, 0.72) 100%);
}

.v-cat-hero .container {
    position: relative;
    z-index: 2;
}

.v-cat-badge {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    margin: 0 auto 16px;
    display: block;
}

.v-cat-hero .breadcrumbs {
    position: relative;
}

.v-cat-hero .bread {
    font-family: 'Lora', serif;
}

.v-cat-desc {
    max-width: 640px;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    line-height: 1.65;
}

/* -------------------------------------------------------------------- */
/* Category pill navigation                                             */
/* -------------------------------------------------------------------- */
ul.product-category {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 6px;
    margin: 0 0 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

ul.product-category::-webkit-scrollbar {
    display: none;
}

ul.product-category li {
    flex: 0 0 auto;
}

ul.product-category li a {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--v-cat-line);
    background: #fff;
    color: var(--v-cat-green-dark);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

ul.product-category li a:hover,
ul.product-category li a:focus-visible {
    background: var(--v-cat-cream);
    border-color: var(--v-cat-green);
    color: var(--v-cat-green-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

ul.product-category li a.active {
    background: var(--v-cat-green);
    border-color: var(--v-cat-green);
    color: #fff;
    box-shadow: 0 6px 16px rgba(29, 51, 84, 0.25);
}

ul.product-category li a:focus-visible {
    outline: 2px solid var(--v-cat-green);
    outline-offset: 2px;
}

/* -------------------------------------------------------------------- */
/* Product count                                                        */
/* -------------------------------------------------------------------- */
.v-cat-count {
    text-align: center;
    color: #8a8375;
    font-size: 0.88rem;
    margin: 0 0 24px;
}

/* -------------------------------------------------------------------- */
/* Product grid: 4 desktop / 3 tablet / 2 mobile                        */
/* -------------------------------------------------------------------- */
.v-cat-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-left: -10px;
    margin-right: -10px;
}

.v-cat-grid > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 22px !important;
    display: flex;
}

@media (min-width: 992px) {
    .v-cat-grid > [class*="col-"] {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .v-cat-grid > [class*="col-"] {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }
}

@media (max-width: 767.98px) {
    .v-cat-grid > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* -------------------------------------------------------------------- */
/* Product card â€” styled by .v-product-card in premium-valluvam.css    */
/* This file only needs to ensure the card fills its flex column.      */
/* -------------------------------------------------------------------- */
.v-cat-grid .v-product-card {
    width: 100%;
}

.v-cat-grid a:focus-visible,
.v-cat-grid button:focus-visible {
    outline: 2px solid var(--v-cat-green);
    outline-offset: 2px;
}


/* -------------------------------------------------------------------- */
/* Loading skeleton                                                      */
/* -------------------------------------------------------------------- */
.v-cat-skel {
    background: #fff;
    border: 1px solid var(--v-cat-line);
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
}

.v-cat-skel .v-skel-img {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.v-cat-skel .v-skel-line {
    height: 12px;
    margin: 14px 14px 0;
    border-radius: 6px;
}

.v-cat-skel .v-skel-line.short {
    width: 55%;
}

.v-cat-skel .v-skel-btn {
    height: 38px;
    margin: 16px 14px 16px;
    border-radius: 9px;
}

.v-cat-skel .v-skel-img,
.v-cat-skel .v-skel-line,
.v-cat-skel .v-skel-btn {
    background: linear-gradient(90deg, #f0ece1 25%, #f8f5ec 37%, #f0ece1 63%);
    background-size: 400% 100%;
    animation: v-cat-shimmer 1.4s ease infinite;
}

@keyframes v-cat-shimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* -------------------------------------------------------------------- */
/* Empty / error state                                                   */
/* -------------------------------------------------------------------- */
.v-cat-empty {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #6b6459;
}

.v-cat-empty ion-icon {
    font-size: 46px;
    color: #c9c2b2;
    margin-bottom: 14px;
}

.v-cat-empty h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--v-cat-green-dark);
    margin: 0 0 6px;
}

.v-cat-empty p {
    font-size: 0.9rem;
    margin: 0;
    max-width: 340px;
}

.v-cat-empty a.v-cat-empty-reset {
    margin-top: 16px;
    display: inline-block;
    padding: 9px 20px;
    border-radius: 999px;
    background: var(--v-cat-green);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.v-cat-empty a.v-cat-empty-reset:hover {
    background: var(--v-cat-green-dark);
    text-decoration: none;
    color: #fff;
}

/* -------------------------------------------------------------------- */
/* Related category navigation                                           */
/* -------------------------------------------------------------------- */
.v-cat-related {
    margin: 50px 0 10px;
    padding: 36px 20px;
    background: var(--v-cat-cream);
    border-radius: 18px;
    text-align: center;
}

.v-cat-related h3 {
    font-family: 'Lora', serif;
    color: var(--v-cat-green-dark);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 0 18px;
}

.v-cat-related-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.v-cat-related-links a {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--v-cat-line);
    color: var(--v-cat-green-dark);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.v-cat-related-links a:hover,
.v-cat-related-links a:focus-visible {
    background: var(--v-cat-green);
    border-color: var(--v-cat-green);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* -------------------------------------------------------------------- */
/* Responsive                                                            */
/* -------------------------------------------------------------------- */
@media (max-width: 767px) {
    .v-cat-badge {
        width: 60px;
        height: 60px;
    }

    .v-cat-desc {
        font-size: 0.92rem;
        padding: 0 10px;
    }

    .v-cat-related {
        padding: 26px 16px;
        margin: 34px 0 6px;
    }
}
