/* Diski Zone shop - category landing, parent and leaf pages.
   Palette is taken from the site's own brand gradient (#007105 -> #0cae13, used in
   app.css / engagement-features.css) rather than a new one, so the store reads as
   part of Diski Zone and not a bolted-on template. */

.shop-container {
    --dz-green-900: #005a04;
    --dz-green-700: #007105;
    --dz-green-500: #0cae13;
    --dz-green-300: #00c853;
    --dz-ink: #12211a;
    --dz-muted: #6b7280;
    --dz-line: #e6eae8;
    --dz-tint: #f6f8f7;

    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ---------------------------------------------------------------- hero band */

.shop-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    padding: 1.5rem 1.75rem 1.75rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--dz-green-700) 0%, var(--dz-green-500) 100%);
    color: #fff;
}

/* Touchline motif - the centre circle and halfway line of a pitch, echoing the
   stadium-grass background the rest of the site already uses. Pure CSS, no assets. */
.shop-hero::before,
.shop-hero::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.16);
}
.shop-hero::before {
    top: 50%;
    right: -70px;
    width: 260px;
    height: 260px;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}
.shop-hero::after {
    top: 0;
    bottom: 0;
    right: 60px;
    border-left: 2px solid rgba(255, 255, 255, 0.16);
}

.shop-hero > * { position: relative; z-index: 1; }

.shop-hero .breadcrumb { margin: 0 0 0.9rem; }
.shop-hero .breadcrumb ol { color: rgba(255, 255, 255, 0.75); }
.shop-hero .breadcrumb a { color: #fff; opacity: 0.9; }
.shop-hero .breadcrumb a:hover { opacity: 1; }
.shop-hero .breadcrumb li:not(:first-child)::before { color: rgba(255, 255, 255, 0.5); }

.shop-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.35rem;
}

.shop-hero h1 {
    margin: 0 0 0.35rem;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
}

.shop-hero-sub {
    margin: 0;
    max-width: 46rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

/* Stat strip - real figures, not decoration. */
.shop-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.shop-stat { display: flex; flex-direction: column; }
.shop-stat-value { font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.shop-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

/* ------------------------------------------------------------- breadcrumbs */

.breadcrumb { margin: 0 0 1.25rem; background: transparent; padding: 0; }
.breadcrumb ol {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    font-size: 0.85rem; color: var(--dz-muted);
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li:not(:first-child)::before { content: '\203A'; margin-right: 0.5rem; color: #cbd5e1; }
.breadcrumb a { color: var(--dz-green-700); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ------------------------------------------------------------- section head */

.shop-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; margin: 0 0 0.85rem;
}
.shop-section-head h2 {
    margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--dz-ink);
    letter-spacing: -0.01em;
}
.shop-section-head .shop-section-meta {
    font-size: 0.8rem; color: var(--dz-muted); white-space: nowrap;
}

/* ------------------------------------------------------------------- tiles */

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.subcategory-tile {
    display: flex; flex-direction: column;
    min-width: 0;                       /* lets grid children actually shrink */
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--dz-line);
    border-radius: 0.85rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.subcategory-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(12, 174, 19, 0.45);
    box-shadow: 0 10px 22px rgba(0, 90, 4, 0.12);
}

/* Fixed pixel height, not aspect-ratio alone: product photos are large and of
   mixed dimensions, and an unconstrained img here rendered at natural size. */
.tile-media {
    display: flex; align-items: center; justify-content: center;
    height: 168px;
    padding: 0.9rem;
    background: var(--dz-tint);
    border-bottom: 1px solid var(--dz-line);
    overflow: hidden;
}
.tile-media img,
.subcategory-tile img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}
.subcategory-tile:hover .tile-media img { transform: scale(1.05); }
.tile-media-placeholder { font-size: 2rem; color: #c7d2cc; }

.tile-body { padding: 0.85rem 1rem 1rem; }
.tile-name { font-size: 1rem; font-weight: 700; color: var(--dz-ink); margin-bottom: 0.2rem; }
.tile-count {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--dz-green-700);
}

/* ----------------------------------------------------- sub-category filters */

.shop-filters {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    margin: 0 0 1.25rem;
}
.shop-filter {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--dz-line);
    border-radius: 2rem;
    background: #fff;
    color: var(--dz-ink);
    font-size: 0.84rem; font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.shop-filter:hover { border-color: var(--dz-green-500); color: var(--dz-green-700); }
.shop-filter.is-active {
    background: linear-gradient(135deg, var(--dz-green-700) 0%, var(--dz-green-500) 100%);
    border-color: transparent;
    color: #fff;
}
.shop-filter .count {
    font-size: 0.72rem; font-weight: 700;
    opacity: 0.65;
}

/* ------------------------------------------------------------ product cards */

.product-card {
    display: flex; flex-direction: column; height: 100%;
    background: #fff;
    border: 1px solid var(--dz-line);
    border-radius: 0.85rem;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(12, 174, 19, 0.45);
    box-shadow: 0 10px 22px rgba(0, 90, 4, 0.12);
}

.product-img-container {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    height: 190px;
    padding: 0.9rem;
    background: var(--dz-tint);
    border-bottom: 1px solid var(--dz-line);
    overflow: hidden;
}
/* Same containment rule as the category tiles: product photos are large and of
   mixed dimensions, so cap both axes and never let the intrinsic size through. */
.product-img-container img {
    display: block;
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}
.product-card:hover .product-img-container img { transform: scale(1.05); }

.product-badge {
    position: absolute; top: 0.6rem;
    font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    padding: 0.25rem 0.5rem; border-radius: 0.35rem;
    color: #fff; z-index: 2;
}
.badge-featured { left: 0.6rem; background: var(--dz-green-700); }
.badge-sale { right: 0.6rem; background: #dc2626; }

.product-body { display: flex; flex-direction: column; flex: 1; padding: 0.8rem 0.9rem 0.9rem; }
.product-cat {
    display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--dz-muted); margin-bottom: 0.25rem;
}
/* Says a product has colours or sizes to pick, so a grouped item does not read
   as a single fixed option. */
.product-options {
    padding: 0.12rem 0.4rem; border-radius: 0.3rem;
    background: rgba(12, 174, 19, 0.12); color: var(--dz-green-700);
    letter-spacing: 0.06em;
}
.product-name { font-size: 0.9rem; font-weight: 600; line-height: 1.35; margin: 0 0 0.6rem; }
.product-name a { color: var(--dz-ink); text-decoration: none; }
.product-name a:hover { color: var(--dz-green-700); }

.product-foot {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 0.5rem; margin-top: auto;
}
.product-price { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.price-now { font-size: 1rem; font-weight: 800; color: var(--dz-ink); }
.price-was { font-size: 0.8rem; color: #9ca3af; text-decoration: line-through; }

/* ------------------------------------------------------------- empty state */

.shop-empty {
    background: #fff; border: 1px solid var(--dz-line); border-radius: 0.85rem;
    padding: 2.5rem 1.5rem; text-align: center;
}
.shop-empty i { font-size: 2.5rem; color: #c7d2cc; }
.shop-empty h3 { font-size: 1.05rem; font-weight: 700; color: var(--dz-ink); margin: 0.75rem 0 0.35rem; }
.shop-empty p { color: var(--dz-muted); margin: 0 0 1rem; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 992px) {
    .shop-hero h1 { font-size: 1.9rem; }
}

@media (max-width: 768px) {
    .shop-container { padding: 1rem; }
    .subcategory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shop-hero { padding: 1.25rem 1.25rem 1.4rem; border-radius: 0.85rem; }
    .shop-hero h1 { font-size: 1.6rem; }
    .shop-hero-sub { font-size: 0.88rem; }
    .shop-hero::before { right: -110px; width: 200px; height: 200px; }
    .shop-hero::after { right: 20px; }
    .shop-stats { gap: 0.5rem 1.4rem; }
    .tile-media { height: 140px; }
    .tile-body { padding: 0.7rem 0.85rem 0.9rem; }
    .tile-name { font-size: 0.92rem; }
}

@media (max-width: 768px) {
    .product-img-container { height: 160px; }
}

@media (max-width: 480px) {
    .subcategory-grid { gap: 0.7rem; }
    .shop-hero h1 { font-size: 1.4rem; }
    .shop-hero::before, .shop-hero::after { display: none; }
    .shop-stat-value { font-size: 1rem; }
    .tile-media { height: 116px; padding: 0.6rem; }
    .tile-name { font-size: 0.85rem; }
    .tile-count { font-size: 0.64rem; }
    .product-img-container { height: 138px; padding: 0.6rem; }
    .product-body { padding: 0.65rem 0.7rem 0.75rem; }
    .product-name { font-size: 0.84rem; }
    .price-now { font-size: 0.92rem; }
    .shop-filter { font-size: 0.78rem; padding: 0.35rem 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
    .subcategory-tile,
    .product-card,
    .shop-filter,
    .tile-media img,
    .product-img-container img { transition: none; }
    .subcategory-tile:hover,
    .product-card:hover { transform: none; }
    .subcategory-tile:hover .tile-media img,
    .product-card:hover .product-img-container img { transform: none; }
}

.subcategory-tile:focus-visible,
.shop-filter:focus-visible,
.product-name a:focus-visible,
.mega-link:focus-visible {
    outline: 3px solid var(--dz-green-300, #00c853);
    outline-offset: 2px;
}
