/* ══════════════════════════════════════════════════════════════════════
   PRODUCTS PAGE — Trinity Gurukul
   ══════════════════════════════════════════════════════════════════════ */

:root {
    --gold:    #D4A017;
    --gold2:   #B8860B;
    --red:     #B30012;
    --dark:    #1a1a1a;
    --muted:   #888;
    --border:  #f0e8d5;
    --light:   #fdfaf5;
    --serif:   'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --sans:    'Inter', system-ui, sans-serif;
    --radius:  12px;
}

*, *::before, *::after { box-sizing: border-box; }

/* ══════════════════════════════════════════════
   HERO — uses shop-hero from shop_enhanced.css
   ══════════════════════════════════════════════ */
.products-hero.shop-hero {
    margin-top: 80px;
}
.products-hero .shop-hero-inner {
    max-width: 860px;
}

/* Override shop-hero title size to be more contained */
.products-hero .section-title {
    font-size: clamp(1.8rem, 4vw, 3.2rem) !important;
    padding-bottom: 20px;
}
.products-hero .section-subtitle {
    font-size: 15px;
    margin-top: 10px;
}

/* Breadcrumb */
.products-breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 7px 18px;
    backdrop-filter: blur(8px);
    justify-content: center;
    max-width: 100%;
}
.products-breadcrumb a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.25s;
    white-space: nowrap;
}
.products-breadcrumb a:hover { color: var(--gold); }
.products-breadcrumb-sep {
    color: rgba(255,255,255,0.2);
    font-size: 10px;
    flex-shrink: 0;
}
.products-breadcrumb-current {
    color: rgba(255,255,255,0.8);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product count pill */
.products-hero-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 7px 20px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    color: rgba(255,255,255,0.65);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
}
.products-hero-count i {
    color: var(--gold);
    font-size: 12px;
}

/* ══════════════════════════════════════════════
   PAGE BODY
   ══════════════════════════════════════════════ */
main.shop {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0;
}
.shop-body {
    padding: 50px 5% 90px;
}

/* ══════════════════════════════════════════════
   PRODUCT GRID
   ══════════════════════════════════════════════ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 22px;
}

/* ══════════════════════════════════════════════
   PRODUCT CARD
   ══════════════════════════════════════════════ */
.prod-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.prod-card:hover { transform: translateY(-4px); }
.prod-card a { text-decoration: none; color: inherit; display: block; }

.prod-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.prod-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.prod-card:hover .prod-img-wrap img { transform: scale(1.07); }
.prod-card:hover .prod-img-wrap { box-shadow: 0 12px 36px rgba(0,0,0,0.14); }

.prod-no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 52px;
    background: linear-gradient(135deg, #fdfaf5, #ede8dc);
    color: rgba(212,160,23,0.35);
}

.prod-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--dark);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.6px;
    z-index: 3;
}

.prod-wish {
    position: absolute;
    top: 12px; right: 12px;
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.25s;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.prod-wish i { font-size: 13px; color: #ccc; transition: color 0.25s; }
.prod-wish:hover i, .prod-wish.active i { color: var(--red); }
.prod-wish:hover { transform: scale(1.12); background: #fff; }
.prod-wish.active { background: rgba(179,0,18,0.08); }
.prod-wish.active i { color: var(--red); }

.prod-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 16px 12px;
    background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 100%);
    border-radius: 0 0 var(--radius) var(--radius);
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.3s ease;
    z-index: 2;
}
.prod-card:hover .prod-overlay { opacity: 1; transform: translateY(0); }

.prod-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: #fff;
    color: #1a1a1a;
    border: none;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--sans);
    letter-spacing: 0.3px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}
.prod-cart-btn:hover { background: var(--gold); color: #fff; }

.prod-body { padding: 14px 2px 0; }
.prod-name {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 7px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.prod-price { display: flex; align-items: center; gap: 8px; }
.prod-price-now {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    font-family: var(--sans);
}
.prod-price-old {
    font-size: 12px;
    color: #bbb;
    text-decoration: line-through;
    font-family: var(--sans);
}

.prod-actions { display: none; }
.rating-display { display: none; }
.views { display: none; }

/* ══════════════════════════════════════════════
   NO PRODUCTS
   ══════════════════════════════════════════════ */
#noProductsMessage {
    text-align: center;
    padding: 70px 20px;
    background: var(--light);
    border-radius: 20px;
    border: 1px solid var(--border);
    grid-column: 1 / -1;
}
#noProductsMessage h3 {
    font-family: var(--serif);
    font-size: 22px;
    color: var(--dark);
    margin: 12px 0 6px;
}
#noProductsMessage p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* ══════════════════════════════════════════════
   RESPONSIVE — fully tuned for all screen sizes
   ══════════════════════════════════════════════ */

/* ≤ 1400px */
@media (max-width: 1400px) {
    main.shop { max-width: 100%; }
    .shop-body { padding: 48px 4% 80px; }
}

/* ≤ 1200px — 3 cols */
@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 26px 18px; }
}

/* ≤ 1024px */
@media (max-width: 1024px) {
    .products-hero.shop-hero { margin-top: 70px; }
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 22px 16px; }
    .shop-body { padding: 40px 4% 70px; }
}

/* ≤ 992px — bottom nav appears */
@media (max-width: 992px) {
    .products-hero.shop-hero { margin-top: 63px; }
    .shop-body { padding-bottom: 80px; }
}

/* ≤ 768px — tablet / large mobile */
@media (max-width: 768px) {
    /* Hero spacing */
    .products-hero.shop-hero { margin-top: 63px; }

    /* Breadcrumb */
    .products-breadcrumb {
        padding: 6px 12px;
        gap: 5px;
        margin-bottom: 14px;
    }
    .products-breadcrumb a { font-size: 11px; }
    .products-breadcrumb-sep { font-size: 9px; }
    .products-breadcrumb-current {
        font-size: 11px;
        max-width: 120px;
    }

    /* Eyebrow */
    .products-hero .shop-hero-eyebrow {
        font-size: 10px !important;
        gap: 8px;
        margin-top: 14px !important;
        margin-bottom: 16px;
    }

    /* Title & subtitle */
    .products-hero .section-title {
        font-size: clamp(1.6rem, 6vw, 2rem) !important;
        padding-bottom: 16px;
    }
    .products-hero .section-subtitle {
        font-size: 13px !important;
        margin-top: 8px;
    }

    /* Count pill */
    .products-hero-count {
        font-size: 11px;
        padding: 6px 16px;
        margin-top: 16px;
        gap: 6px;
    }

    /* Grid */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
    .shop-body { padding: 26px 4% 80px; }

    /* Cards — always show overlay on touch */
    .prod-overlay { opacity: 1 !important; transform: translateY(0) !important; }
    .prod-cart-btn { font-size: 10.5px; padding: 7px 14px; gap: 5px; }
    .prod-wish { width: 30px; height: 30px; }
    .prod-wish i { font-size: 11px; }
    .prod-badge { font-size: 9px; padding: 3px 8px; top: 8px; left: 8px; }
    .prod-body { padding: 10px 2px 0; }
    .prod-name { font-size: 13px; margin-bottom: 5px; }
    .prod-price-now { font-size: 13.5px; }
    .prod-price-old { font-size: 11.5px; }
}

/* ≤ 480px — small mobile */
@media (max-width: 480px) {
    .products-hero.shop-hero { margin-top: 60px; }

    /* Breadcrumb — very compact, allow wrapping */
    .products-breadcrumb {
        padding: 5px 10px;
        gap: 4px;
        margin-bottom: 10px;
        border-radius: 40px;
    }
    .products-breadcrumb a { font-size: 10px; }
    .products-breadcrumb-sep { font-size: 8px; }
    .products-breadcrumb-current {
        font-size: 10px;
        max-width: 100px;
    }

    /* Hide middle breadcrumb items on very small — keep Home + current */
    .products-breadcrumb .bc-hide-mobile { display: none; }

    /* Eyebrow */
    .products-hero .shop-hero-eyebrow {
        font-size: 9px !important;
        letter-spacing: 0.1em;
        margin-bottom: 14px;
    }

    /* Title & subtitle */
    .products-hero .section-title {
        font-size: clamp(1.4rem, 7vw, 1.7rem) !important;
        padding-bottom: 14px;
    }
    .products-hero .section-subtitle {
        font-size: 12px !important;
    }

    /* Count pill */
    .products-hero-count {
        font-size: 10.5px;
        padding: 5px 14px;
        margin-top: 12px;
    }

    /* Grid */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
    .shop-body { padding: 18px 3.5% 80px; }

    /* Cards */
    .prod-body { padding: 8px 2px 0; }
    .prod-name { font-size: 12px; }
    .prod-price-now { font-size: 13px; }
    .prod-price-old { font-size: 11px; }
    .prod-price { gap: 5px; }
    .prod-cart-btn { font-size: 10px; padding: 6px 12px; }
    .prod-wish { width: 28px; height: 28px; top: 8px; right: 8px; }
    .prod-wish i { font-size: 10px; }
}

/* ≤ 380px — extra small */
@media (max-width: 380px) {
    .product-grid { gap: 12px 8px; }
    .prod-img-wrap { border-radius: 10px; }
    .prod-name { font-size: 11.5px; }
    .prod-price-now { font-size: 12px; }
    .products-breadcrumb a,
    .products-breadcrumb-current { font-size: 9.5px; }
    .shop-body { padding: 14px 3% 80px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
