:root {
    --venz-bg: #fafafa;
    --venz-fg: #1f2937;
    --venz-accent: #ef4444;
}

body {
    background: var(--venz-bg);
    color: var(--venz-fg);
}

.storefront-main {
    min-height: 60vh;
}

/* Mega menu */
.main-menu .megamenu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    z-index: 1000;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.main-menu .nav-item:hover .megamenu,
.main-menu .nav-item:focus-within .megamenu {
    display: block;
}

/* Product card */
.product-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: .5rem;
    overflow: hidden;
    transition: all .2s ease-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.product-card .product-image {
    position: relative;
    aspect-ratio: 3/4;
    background: #fff;
    overflow: hidden;
}

.product-card .product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card .product-gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-card .product-image img,
.product-card .product-gallery-slides .gallery-slide {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.product-card .product-gallery-slides .gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .25s ease;
}

.product-card .product-gallery-slides .gallery-slide.active {
    opacity: 1;
}

.product-card .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity .2s ease, background .15s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

.product-card .gallery-nav:hover {
    background: #fff;
}

.product-card .gallery-prev { left: .5rem; }
.product-card .gallery-next { right: .5rem; }

@media (hover: hover) {
    .product-card .product-image.has-gallery .gallery-nav,
    .product-card .product-image.has-gallery .gallery-progress {
        opacity: 0;
    }

    .product-card .product-image.has-gallery:hover .gallery-nav,
    .product-card .product-image.has-gallery:hover .gallery-progress {
        opacity: 1;
    }
}

@media (hover: none) {
    .product-card .product-image.has-gallery .gallery-nav,
    .product-card .product-image.has-gallery .gallery-progress {
        opacity: 1;
    }
}

.product-card .gallery-progress {
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: .5rem;
    z-index: 2;
    display: flex;
    gap: 3px;
    transition: opacity .2s ease;
}

.product-card .gallery-segment {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, .5);
    border-radius: 1px;
    transition: background .2s ease;
}

.product-card .gallery-segment.active {
    background: rgba(31, 41, 55, .85);
}

.product-card .product-badges {
    position: absolute; top: .5rem; left: .5rem;
    display: flex; flex-direction: column; gap: .25rem;
    z-index: 2;
}

.product-card .badge-new { background: #10b981; color: #fff; }
.product-card .badge-sale { background: var(--venz-accent); color: #fff; }
.product-card .badge-bestseller { background: #f59e0b; color: #fff; }

.product-card .product-body {
    padding: .75rem;
    display: flex; flex-direction: column; gap: .25rem;
    flex: 1;
}

.product-card .product-brand { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; }
.product-card .product-name { font-size: .9rem; color: var(--venz-fg); text-decoration: none; line-height: 1.3; min-height: 2.6em; }
.product-card .product-name:hover { color: var(--venz-accent); }

.product-card .price-line { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.product-card .price-current { font-weight: 700; font-size: 1rem; }
.product-card .price-old { color: #9ca3af; text-decoration: line-through; font-size: .85rem; }
.product-card .price-discount { background: var(--venz-accent); color: #fff; font-size: .7rem; padding: .1rem .35rem; border-radius: .25rem; }

.product-card .color-swatches { display: flex; gap: .25rem; margin-top: .25rem; }
.product-card .color-swatch {
    width: 18px; height: 18px; border-radius: 50%;
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

/* Hero */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    color: #fff;
    border-radius: .75rem;
    padding: 4rem 2rem;
    overflow: hidden;
}
.hero-banner::after {
    content: "";
    position: absolute; top: 0; right: 0; bottom: 0; width: 50%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.05) 100%);
}

.section-heading {
    display: flex; justify-content: space-between; align-items: center;
    margin: 3rem 0 1rem;
}
.section-heading h2 {
    font-size: 1.5rem; font-weight: 700; margin: 0;
}

/* Detail page */
.product-gallery {
    position: sticky; top: 80px;
}
.product-gallery .main-image {
    width: 100%; aspect-ratio: 3/4; background: #f8fafc; border-radius: .5rem;
    overflow: hidden;
}
.product-gallery .main-image img { width: 100%; height: 100%; object-fit: contain; object-position: center top; }
.product-gallery .thumbs { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.product-gallery .thumbs button {
    width: 64px; height: 80px; padding: 0; border: 2px solid transparent; border-radius: .25rem;
    background: #f8fafc; overflow: hidden; cursor: pointer;
}
.product-gallery .thumbs button.active { border-color: var(--venz-fg); }
.product-gallery .thumbs img { width: 100%; height: 100%; object-fit: contain; object-position: center top; }

.variant-group { margin-bottom: 1rem; }
.variant-group label.group-label {
    display: block; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
    color: #6b7280; margin-bottom: .5rem;
}

.color-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.color-option {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent;
    cursor: pointer; padding: 0; background-clip: content-box; box-sizing: border-box;
    overflow: hidden; position: relative;
}
.color-option--photo {
    width: 56px; height: 80px; border-radius: .35rem; border: 1px solid #d1d5db;
    background: #fff;
}
.color-option--photo.selected { border-color: var(--venz-fg); border-width: 2px; }
.color-option.selected { border-color: var(--venz-fg); }
.color-option.disabled { opacity: .3; cursor: not-allowed; }
.color-option img, .color-option .swatch-fill { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; }
.color-option--photo img {
    border-radius: .25rem;
    object-fit: contain;
    object-position: center top;
}

.size-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.size-option {
    min-width: 48px; padding: .5rem .75rem; border: 1.5px solid #d1d5db; border-radius: .375rem;
    background: #fff; cursor: pointer; font-size: .9rem; font-weight: 600; color: #111;
}
.size-option.selected {
    background: #111; color: #fff; border-color: #111;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--venz-fg, #c96);
}
.size-option.disabled,
.size-option:disabled {
    background: #f3f4f6; color: #b0b0b0; border-color: #e5e7eb;
    opacity: 1; cursor: not-allowed; text-decoration: line-through;
    text-decoration-thickness: 1.5px; box-shadow: none;
}

.price-block { margin: 1rem 0; }
.price-block .price-current { font-size: 1.6rem; font-weight: 700; }
.price-block .price-old { color: #9ca3af; text-decoration: line-through; }

.breadcrumb-row { padding: .75rem 0; font-size: .85rem; }

/* Listing sidebar */
.listing-filters .filter-group { border-bottom: 1px solid #e5e7eb; padding: 1rem 0; }
.listing-filters .filter-group h6 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }

/* Login modal */
#signinModal .modal-content {
    border-radius: .75rem;
}

#signinModal .modal-title {
    font-weight: 700;
}

#signinModal .venz-auth-tabs {
    gap: .5rem;
}

#signinModal .venz-auth-tabs .nav-item {
    flex: 1 1 0;
}

#signinModal .venz-auth-tab {
    color: var(--venz-fg);
    font-weight: 600;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    background: #fff;
    text-transform: none;
}

#signinModal .venz-auth-tab:hover {
    color: var(--venz-accent);
    border-color: var(--venz-accent);
}

#signinModal .venz-auth-tab.active {
    background: var(--venz-accent);
    border-color: var(--venz-accent);
    color: #fff;
}

#signinModal .venz-auth-submit {
    min-height: 48px;
    background: var(--venz-accent);
    border-color: var(--venz-accent);
    color: #fff;
    font-weight: 600;
    border-radius: .5rem;
}

#signinModal .venz-auth-submit:hover,
#signinModal .venz-auth-submit:focus {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

#signinModal .venz-auth-submit:disabled {
    background: #fca5a5;
    border-color: #fca5a5;
}

#signinModal .form-control:focus {
    border-color: var(--venz-accent);
    box-shadow: 0 0 0 .2rem rgba(239, 68, 68, .15);
}

#signinModal .form-check-input:checked {
    background-color: var(--venz-accent);
    border-color: var(--venz-accent);
}

#signinModal .form-check-input:focus {
    border-color: var(--venz-accent);
    box-shadow: 0 0 0 .2rem rgba(239, 68, 68, .15);
}
