/* ===== 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: #1c5034;
    --v-cat-green-dark: #123626;
    --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(18, 54, 38, 0.55) 0%, rgba(18, 54, 38, 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(28, 80, 52, 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 (same visual language as the Phase 3 shop.php cards)   */
/* -------------------------------------------------------------------- */
.v-cat-grid .product {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid var(--v-cat-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20, 30, 20, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.v-cat-grid .product:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(20, 30, 20, 0.12);
    border-color: #d7cfba;
}

.v-cat-grid .img-prod {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--v-cat-cream);
}

.v-cat-grid .img-prod img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 14px;
    transition: transform 0.35s ease;
}

.v-cat-grid .product:hover .img-prod img {
    transform: scale(1.05);
}

.v-cat-grid .img-prod .overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 54, 38, 0);
    transition: background 0.25s ease;
    pointer-events: none;
}

.v-cat-grid .product:hover .img-prod .overlay {
    background: rgba(18, 54, 38, 0.04);
}

.v-cat-grid .img-prod .status {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: #d64545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 4px 9px;
    border-radius: 999px;
    line-height: 1.2;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.v-cat-grid .product .wishlist-btn.heart {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a8375;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
    transition: color 0.2s ease, transform 0.2s ease;
}

.v-cat-grid .product .wishlist-btn.heart:hover,
.v-cat-grid .product .wishlist-btn.heart:focus-visible {
    color: #d64545;
    transform: scale(1.08);
}

.v-cat-grid .product .wishlist-btn.heart ion-icon {
    font-size: 17px;
    pointer-events: none;
}

.v-cat-grid .text {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 16px 18px !important;
    text-align: left !important;
}

.v-cat-grid .text h3 {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 4px;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.v-cat-grid .text h3 a {
    color: var(--v-cat-green-dark);
}

.v-cat-grid .text h3 a:hover {
    color: var(--v-cat-green);
    text-decoration: none;
}

.v-cat-qty {
    margin: 0 0 10px;
    font-size: 0.8rem;
    color: #8a8375;
}

.v-cat-grid .d-flex.justify-content-center {
    justify-content: flex-start !important;
    margin-top: auto;
}

.v-cat-grid .pricing {
    width: 100%;
}

.v-cat-grid .pricing .price {
    margin: 4px 0 12px;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--v-cat-green-dark);
}

.v-cat-grid .pricing .price-dc {
    font-size: 0.82rem;
    font-weight: 500;
    color: #a39c8d;
    text-decoration: line-through;
}

.v-cat-grid .pricing .price-sale {
    color: #c0392b;
}

.v-cat-grid .bottom-area {
    padding: 0 !important;
    width: 100%;
}

.v-cat-grid .bottom-area .m-auto {
    width: 100%;
    margin: 0 !important;
    display: flex;
    gap: 8px;
}

.v-cat-grid .bottom-area a.add-to-cart,
.v-cat-grid .bottom-area a.buy {
    height: 42px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 6px;
}

.v-cat-grid .bottom-area a.product-detail-btn {
    flex: 0 0 42px;
    width: 42px;
    background: var(--v-cat-cream);
    color: var(--v-cat-green-dark);
    border: 1px solid var(--v-cat-line);
}

.v-cat-grid .bottom-area a.product-detail-btn:hover,
.v-cat-grid .bottom-area a.product-detail-btn:focus-visible {
    background: #f1ead9;
}

.v-cat-grid .bottom-area a#add-to-cart.add-to-cart {
    flex: 1 1 auto;
    background: var(--v-cat-green) !important;
    border: 1px solid var(--v-cat-green) !important;
    color: #fff !important;
}

.v-cat-grid .bottom-area a#add-to-cart.add-to-cart:hover,
.v-cat-grid .bottom-area a#add-to-cart.add-to-cart:focus-visible {
    background: var(--v-cat-green-dark) !important;
    border-color: var(--v-cat-green-dark) !important;
}

.v-cat-grid .bottom-area a .v-btn-label {
    font-size: 0.78rem;
    white-space: nowrap;
}

.v-cat-grid .bottom-area a ion-icon {
    font-size: 16px;
    pointer-events: none;
}

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

@media (max-width: 480px) {
    .v-cat-grid .bottom-area a .v-btn-label {
        display: none;
    }
    .v-cat-grid .bottom-area a#add-to-cart.add-to-cart {
        flex: 0 0 42px;
        width: 42px;
    }
    .v-cat-grid .text {
        padding: 12px 12px 14px !important;
    }
    .v-cat-grid .text h3 {
        font-size: 0.88rem;
    }
}

/* -------------------------------------------------------------------- */
/* 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;
    }
}
