/* =========================================
   MISTIVA STITCH SHOP STYLES
   ========================================= */

:root {
    --stitch-bg: #000000;
    --stitch-text: #ffffff;
    --stitch-gold: #D4AF37;
    --stitch-zinc-500: #71717a;
    --stitch-zinc-800: #27272a;
    --stitch-zinc-900: #18181b;
    --stitch-font-serif: 'Playfair Display', serif;
    --stitch-font-sans: 'Public Sans', sans-serif;
}

/* Utilities */
.stitch-accent-line {
    width: 4rem;
    /* w-16 */
    height: 0.25rem;
    /* h-1 */
    background-color: var(--stitch-gold);
    margin: 0 auto 1.5rem;
    /* mx-auto mb-6 */
}

.stitch-mb-20 {
    margin-bottom: 5rem;
}

body.woocommerce-shop,
body.tax-product_cat {
    background-color: var(--stitch-bg);
    color: var(--stitch-text);
    font-family: var(--stitch-font-sans);
}

/* =========================================
   HERO (Based on Stitch Product Hero)
   ========================================= */
.stitch-shop-hero {
    position: relative;
    padding: 4rem 1.5rem;
    background-color: var(--stitch-bg);
    border-bottom: 1px solid var(--stitch-zinc-900);
    text-align: center;
    margin-bottom: 3rem;
}

.stitch-shop-title {
    font-family: var(--stitch-font-serif);
    font-size: 3rem;
    color: var(--stitch-text);
    margin-bottom: 0.5rem;
}

.stitch-shop-desc {
    color: var(--stitch-zinc-500);
    font-size: 0.875rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =========================================
   CATEGORY ROW (Based on Stitch Thumbnails)
   ========================================= */
.stitch-category-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 4rem;
    justify-content: flex-start;
    /* Left align on mobile, center on desktop managed via container */
    scrollbar-width: none;
}

.stitch-category-row::-webkit-scrollbar {
    display: none;
}

.stitch-cat-card {
    flex: 0 0 100px;
    text-align: center;
    text-decoration: none;
}

.stitch-cat-img-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    /* Circular as requested */
    overflow: hidden;
    border: 1px solid var(--stitch-zinc-800);
    margin: 0 auto 0.5rem;
    background-color: var(--stitch-zinc-900);
    transition: border-color 0.3s;
}

.stitch-cat-card:hover .stitch-cat-img-wrap {
    border-color: var(--stitch-gold);
}

.stitch-cat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stitch-cat-name {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--stitch-zinc-500);
    transition: color 0.3s;
}

.stitch-cat-card:hover .stitch-cat-name {
    color: var(--stitch-gold);
}

/* =========================================
   PRODUCT GRID (Stitch "You May Also Admire")
   ========================================= */
ul.products {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 640px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================
   PRODUCT CARD (Stitch Replica)
   ========================================= */
li.product {
    position: relative;
    /* "group" behavior handled via :hover on li.product */
}

/* Image Wrapper: aspect-square bg-zinc-900 rounded-xl overflow-hidden mb-6 relative */
.stitch-product-image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: var(--stitch-zinc-900);
    border-radius: 0.75rem;
    /* rounded-xl */
    overflow: hidden;
    margin-bottom: 1.5rem;
    /* mb-6 */
}

.stitch-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s duration-700 ease-out;
}

/* Hover Scale */
li.product:hover .stitch-product-img {
    transform: scale(1.1);
}

/* Overlay: absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 */
.stitch-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

li.product:hover .stitch-overlay,
/* Force visible on mobile touch if needed, or rely on distinct click */
.stitch-overlay.mobile-visible {
    opacity: 1;
}

/* Button: bg-white text-black px-6 py-2 text-[10px] uppercase font-bold tracking-widest rounded-full */
.stitch-quick-view-btn {
    background-color: #ffffff;
    color: #000000;
    padding: 0.5rem 1.5rem;
    font-size: 0.625rem;
    /* 10px */
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s;
}

.stitch-quick-view-btn:hover {
    transform: scale(1.05);
}

/* Info */
.stitch-product-title {
    font-family: var(--stitch-font-serif);
    font-size: 1.125rem;
    /* text-lg */
    margin-bottom: 0.25rem;
    color: var(--stitch-text);
    line-height: 1.2;
}

.stitch-product-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

li.product:hover .stitch-product-title a {
    color: var(--stitch-gold);
}

.stitch-product-cat {
    color: var(--stitch-zinc-500);
    font-size: 0.625rem;
    /* 10px */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.stitch-product-price {
    color: var(--stitch-gold);
    font-weight: 500;
    font-size: 1rem;
}