/*
Theme Name: Silivia Silver
Theme URI: https://siliviasilver.com
Author: Silivia Silver
Author URI: https://siliviasilver.com
Description: Dark Luxury Elementor Theme.
Version: 1.4.0
Text Domain: silivia-silver
*/

/* 
   Silivia Silver - Dark Luxury Theme v6 (Polished)
   - Hero Layout Locking (Prevents Overlap)
   - Misty Glass Fallback for Empty Products
   - Robust Single Product Layout
*/

:root {
    --bg-dark: #0F0F0F;
    --bg-darker: #050505;
    --surface-dark: #141414;
    --border-light: rgba(255, 255, 255, 0.1);

    --text-white: #FFFFFF;
    --text-gray: #A0A0A0;

    --silver-gradient: linear-gradient(135deg, #e0e0e0 0%, #909090 50%, #ffffff 100%);

    --font-heading: 'Syne', sans-serif;
    --font-body: 'Montserrat', sans-serif;

    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
.brand-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* 
   NAVIGATION 
*/
.site-header {
    padding: 2rem 0;
    position: absolute;
    width: 100%;
    z-index: 50;
    top: 0;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Menu Toggle */
.nav-trigger-wrapper {
    position: fixed;
    top: 2rem;
    right: 5%;
    z-index: 100;
}

.nav-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.line {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: 0.4s;
}

body.menu-open .overlay-menu {
    opacity: 1;
    pointer-events: all;
}

body.menu-open .line-1 {
    transform: rotate(45deg) translate(5px, 6px);
}

body.menu-open .line-2 {
    transform: rotate(-45deg) translate(5px, -6px);
}

.overlay-menu {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.98);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.5s;
}

.menu-item {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
    display: block;
    margin: 1rem 0;
    text-align: center;
}

.menu-item:hover {
    color: #fff;
    -webkit-text-stroke: 1px #fff;
}

/* 
   HERO (Fixed Structure) 
*/
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

/* Fix: Flex Column ensures subtitle sits ABOVE title, never overlapping */
.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    /* Gap between elements */
}

.hero-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-gray);
    display: block;
    margin: 0;
    /* Let flex gap handle it */
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin: 0;
}

.text-gradient {
    background: var(--silver-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 1rem;
}

.btn:hover {
    background: #fff;
    color: #000;
}


/* 
   SAFE MODE SHOP STYLES
*/
.shop-section ul.products,
.elementor-widget-wc-products ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0;
    margin: 0;
}

/* Card */
.shop-section ul.products li.product,
.elementor-widget-wc-products ul.products li.product {
    list-style: none;
    background: #090909;
    /* Slightly lighter than pure black */
    position: relative;
    margin: 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border */
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.elementor-widget-wc-products ul.products li.product:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Image */
.product img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    display: block;
}

/* 
    MISSING IMAGE FALLBACK (Misty Glass)
    If img is missing/empty, we style the link itself
*/
.product a img[src=""],
.product a img:not([src]),
.product.no-post-thumbnail img {
    opacity: 0;
    display: none;
}

.product a.woocommerce-loop-product__link {
    display: block;
    height: 100%;
    min-height: 400px;
    position: relative;
    padding-bottom: 5rem;
    /* Space for text */
    flex-grow: 1;
}

/* Add a placeholder pattern for empty products */
.product.no-post-thumbnail a.woocommerce-loop-product__link::before,
.product a.woocommerce-loop-product__link:empty::before {
    content: 'SILIVIA';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    color: #222;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    z-index: 0;
}

/* Typography on Card */
.product .woocommerce-loop-product__title {
    padding: 0 1.5rem;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.5rem;
    z-index: 10;
    position: absolute;
    bottom: 4rem;
    left: 0;
    width: 100%;
}

.product .price {
    padding: 0 1.5rem;
    color: var(--text-gray);
    font-size: 1rem;
    display: block;
    z-index: 10;
    position: absolute;
    bottom: 2rem;
    left: 0;
}

/* Universal Button (Read More / Add to Cart) */
.product .button,
.product .added_to_cart {
    position: absolute;
    bottom: 2rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: transparent !important;
    overflow: hidden;
    z-index: 20;
    border: none;
    padding: 0;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product .button::before,
.product .added_to_cart::before {
    content: '+';
    font-size: 20px;
    color: #000;
}

.product .button:hover {
    width: auto;
    padding: 0 1.5rem;
    border-radius: 20px;
}

.product .button:hover::before {
    display: none;
}

.product .button:hover::after {
    content: 'View';
    /* Default */
    font-size: 12px;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
}

.product .add_to_cart_button:hover::after {
    content: 'Add';
}

/* 
   SINGLE PRODUCT PAGE 
*/
.single-product div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding-top: 100px;
    min-height: 100vh;
}

/* Fallback if gallery is empty (Test Product often has empty gallery) */
.single-product .woocommerce-product-gallery:empty {
    display: none;
}

/* If Gallery is gone, center content */
.single-product div.product:has(.woocommerce-product-gallery:empty) {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.single-product .summary {
    padding-top: 2rem;
}

.product_title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.single-product .price {
    font-size: 1.5rem;
    color: #ccc;
    margin-bottom: 2rem;
    display: block;
}

form.cart {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

button.single_add_to_cart_button {
    background: #fff;
    color: #000;
    border: none;
    padding: 1rem 3rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
}

/* Mobile */
@media (max-width: 1024px) {
    .shop-section ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

    .single-product div.product {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .shop-section ul.products {
        grid-template-columns: 1fr;
    }
}

/* FIX: Footer Spacing */
.site-footer {
    padding: 4rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}