/*
Theme Name: SLV Store
Theme URI: https://winters-anvil.com/
Author: Lilia
Description: Winters Anvil - jewelry catalog theme for WooCommerce.
Version: 3.0
Text Domain: slv-store
*/

/* ============================================================
   1. RESET & BASE
============================================================ */

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #222;
    background: #f7f7f7;
}

.slv-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   2. PALETTE — LIGHT ELEGANT SILVER
============================================================ */

:root {
    --slv-silver-050: #fafafa;
    --slv-silver-100: #f4f4f4;
    --slv-silver-200: #e8e8e8;
    --slv-silver-300: #dcdcdc;
    --slv-silver-400: #c8c8c8;
    --slv-silver-500: #b5b5b5;
    --slv-silver-600: #9a9a9a;
    --slv-silver-700: #555;

    --slv-metal-highlight: #ffffff;
    --slv-metal-glow: #ededed;
    --slv-metal-shadow: #b5b5b5;

    --slv-header-bg: #2a2a2a;
    --slv-nav-bg: #1f1f1f;
    --slv-footer-bg: #2a2a2a;

    --slv-header-grad-start: #3a3a3a;
    --slv-header-grad-end:   #1f1f1f;

    --slv-footer-grad-start: #1f1f1f;
    --slv-footer-grad-end:   #3a3a3a;

    --slv-icon-color: #ffffff;

    --slv-button-bg: var(--slv-silver-200);
    --slv-button-bg-hover: var(--slv-silver-100);
    --slv-button-text: #222;

    --slv-border: var(--slv-silver-300);
    --slv-card-bg: var(--slv-silver-100);

    --slv-radius-sm: 4px;
    --slv-shadow-soft: 0 2px 6px rgba(0,0,0,0.06);
}

/* ============================================================
   2.B FOOTER GRADIENT — CONNECT TO CUSTOMIZER VARIABLES
============================================================ */

.slv-footer {
    background: linear-gradient(
        to bottom,
        var(--slv-footer-grad-start),
        var(--slv-footer-grad-end)
    ) !important;
    color: #fff;
}

/* ============================================================
   3. TOP BAR
============================================================ */

.slv-top-bar {
    background: var(--slv-nav-bg);
    color: #fff;
    font-size: 12px;
    padding: 4px 0;
    text-align: center;
}

/* ============================================================
   4. HEADER
============================================================ */

.slv-header-main {
    background: linear-gradient(
        to bottom,
        var(--slv-header-grad-start),
        var(--slv-header-grad-end)
    ) !important;
}

.slv-header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.slv-header-logo img {
    max-height: 80px;
}
@media (max-width: 768px) {
    .slv-header-logo img { max-height: 60px; }
}

.slv-header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slv-header-icons a {
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.slv-header-icon i {
    font-size: 24px !important;
    color: var(--slv-icon-color) !important;
}

/* Hamburger */
.slv-header-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.slv-header-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--slv-icon-color);
    margin: 3px 0;
}

@media (max-width: 768px) {
    .slv-hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .slv-hide-mobile { 
        display: block !important; 
    }
}
/* ============================================================
   5. NAVIGATION — FIXED FOR YOUR REAL HTML
============================================================ */

.slv-main-nav {
    background: var(--slv-nav-bg);
    border-bottom: 1px solid #000;
    z-index: 9999;
}

.slv-menu {
    list-style: none;
    display: flex;
    gap: 32px;
    margin: 0;
    padding: 0;
}

/* Top-level links */
.slv-menu > li > a {
    padding: 10px 0;
    color: #fff;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* Parent items must be positioned for dropdown */
.slv-menu > li {
    position: relative;
}

/* HIDE dropdowns by default */
.slv-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #111;
    padding: 12px 0;
    min-width: 220px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    z-index: 9999;
    margin: 0;
    list-style: none !important; /* ← removes bullets */
}

/* SHOW dropdown on hover */
.slv-menu > li:hover > .slv-submenu {
    display: block;
}

/* Submenu links */
.slv-submenu a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 16px;
    display: block;
}

.slv-submenu a:hover {
    background: #222;
}

/* Hide ▼ arrows */
.slv-arrow {
    display: none !important;
}


/* ============================================================
   6. CATEGORY BANNER
============================================================ */

.woocommerce-products-header {
    padding: 20px 0 18px !important;
    background: var(--slv-silver-200);
    border-radius: 0 0 12px 12px;
    text-align: center;
    border-bottom: 1px solid var(--slv-border);
}

.woocommerce-products-header__title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slv-metal-shadow);
    text-shadow:
        0 1px 1px rgba(255,255,255,0.6),
        0 0 6px rgba(255,255,255,0.35);
}

/* ============================================================
   7. BREADCRUMBS — METALLIC
============================================================ */

.woocommerce-breadcrumb {
    font-size: 14px;
    color: var(--slv-silver-700);
    padding: 8px 12px;
    background: linear-gradient(180deg, var(--slv-silver-050), var(--slv-silver-200));
    border: 1px solid var(--slv-silver-300);
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 20px;
}

.woocommerce-breadcrumb a {
    color: #333;
    font-weight: 600;
}
.woocommerce-breadcrumb a:hover {
    color: #000;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

/* ============================================================
   8. PRODUCT GRID
============================================================ */

ul.products {
    list-style: none;
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 32px 20px !important;
    padding: 0 !important;
    margin: 0 0 10px !important;
}

/* ============================================================
   9. PRODUCT CARD — SILVER LUXURY (RESTORED ORIGINAL)
============================================================ */

ul.products li.product {
    background: var(--slv-card-bg);
    border: 1px solid var(--slv-border);
    border-radius: 8px;
    padding: 12px !important;
    box-shadow: var(--slv-shadow-soft);
    display: flex !important;
    flex-direction: column !important;
    text-align: center;
    transition: all 0.28s ease;
}

ul.products li.product:hover {
    border-color: var(--slv-silver-500);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transform: translateY(-4px);
}

/* Image */
ul.products li.product img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px !important;
}

/* Title */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333 !important;
    margin: 0 0 2px !important;
    min-height: 40px;
    text-align: center;
}

/* Price */
ul.products li.product .price {
    color: #222 !important;
    font-weight: 800 !important;
    margin: 2px 0 4px !important;
    text-shadow:
        0 1px 1px rgba(255,255,255,0.6),
        0 0 6px rgba(255,255,255,0.35) !important;
}

/* Add to cart */
ul.products li.product .button {
    width: 100% !important;
    background: linear-gradient(180deg, var(--slv-silver-200), var(--slv-silver-400));
    color: var(--slv-button-text);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--slv-silver-500);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
    margin-top: auto !important;
}

ul.products li.product .button:hover {
    background: linear-gradient(180deg, var(--slv-silver-100), var(--slv-silver-300));
    border-color: var(--slv-silver-600);
}

/* Wishlist */
ul.products li.product .yith-wcwl-add-to-wishlist a {
    margin-top: 0 !important;
    color: #222 !important;
    font-weight: 600;
    text-shadow:
        0 1px 1px rgba(255,255,255,0.5),
        0 0 4px rgba(255,255,255,0.25);
}

ul.products li.product .yith-wcwl-add-to-wishlist a:hover {
    color: #000 !important;
    text-shadow:
        0 1px 1px rgba(255,255,255,0.6),
        0 0 6px rgba(255,255,255,0.35);
}

/* Move wishlist above button */
ul.products li.product .yith-wcwl-add-to-wishlist {
    order: 3 !important;
}

ul.products li.product .button {
    order: 4 !important;
}

/* ============================================================
   10. SALE BADGE — METALLIC
============================================================ */

.woocommerce span.onsale {
    background: linear-gradient(180deg, var(--slv-silver-200), var(--slv-silver-400));
    color: #222;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--slv-silver-500);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7),
                0 2px 6px rgba(0,0,0,0.15);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   11. PAGINATION — METALLIC
============================================================ */

.woocommerce-pagination {
    margin-top: 30px;
    margin-bottom: 40px;
}

.woocommerce-pagination ul.page-numbers {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 30px;
}

.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(180deg, var(--slv-silver-200), var(--slv-silver-400));
    border: 1px solid var(--slv-silver-500);
    color: #222;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.woocommerce-pagination ul.page-numbers li a:hover {
    background: linear-gradient(180deg, var(--slv-silver-100), var(--slv-silver-300));
    border-color: var(--slv-silver-600);
}

.woocommerce-pagination ul.page-numbers li .current {
    background: linear-gradient(180deg, var(--slv-silver-300), var(--slv-silver-500));
    border-color: var(--slv-silver-600);
    color: #000;
}

/* ============================================================
   12. FOOTER
============================================================ */

.site-footer {
    background: linear-gradient(
        to top,
        var(--slv-footer-grad-start),
        var(--slv-footer-grad-end)
    ) !important;
    padding: 10px 0;
}

/* ============================================================
   13. RESPONSIVE
============================================================ */

@media (max-width: 1024px) {
    ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
    ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================================
   14. HEADER SEARCH — RESTORED
============================================================ */

.slv-header-search form {
    display: flex !important;
    background: #000 !important;
    border: 1px solid #000 !important;
    border-radius: 4px !important;
    height: 32px !important;
    width: auto !important;        /* auto so input+button fit */
    overflow: hidden !important;   /* button sits inside */
}

/* SHRUNK SEARCH BOX */
.slv-header-search input[type="search"] {
    background: #000 !important;
    color: #d0d0d0 !important;
    border: none !important;
    padding: 0 8px !important;
    height: 32px !important;
    line-height: 32px !important;
    border-radius: 4px 0 0 4px !important;
    box-sizing: border-box !important;
    width: 110px !important;       /* ← SHRINKED SEARCH BOX */
    flex: none !important;         /* ← STOP STRETCHING */
}

/* BUTTON (unchanged, you like it) */
.slv-header-search input[type="submit"].search-submit {
    background: #333 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 0 4px 4px 0 !important;
    padding: 0 8px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.slv-header-search input[type="submit"].search-submit:hover {
    background: #444 !important;
}

/* ============================================================
   15. MOBILE MENU — FINAL FIXED VERSION
============================================================ */

/* Mobile nav container */
.slv-mobile-nav { 
    display: none; 
    background: #000; 
    padding: 0 !important;
}

.slv-mobile-nav.slv-mobile-nav-open { 
    display: block !important; 
}

/* Show hamburger ONLY on mobile */
@media (max-width: 768px) {
    .slv-hide-desktop {
        display: flex !important;
    }
}

/* Hide hamburger on desktop */
@media (min-width: 769px) {
    .slv-hide-desktop {
        display: none !important;
    }
}

/* Mobile menu list */
.slv-mobile-menu li {
    list-style: none;
    border-bottom: 1px solid #2a2a2a;
    margin: 0 !important;
}

/* Mobile menu links */
.slv-mobile-menu li a {
    display: block;
    padding: 5px 10px !important;
    font-size: 15px;
    color: #c8c8c8;
    text-decoration: none !important;
}

/* Mobile menu hover */
.slv-mobile-menu li a:hover {
    background: #111;
    color: #fff;
}

/* Hamburger button */
.slv-header-hamburger {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

/* Hamburger lines */
.slv-header-hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--slv-icon-color, #fff);
    border-radius: 3px;
    margin: 2px 0; /* ← THIS controls spacing */
}

/* Fix alignment on mobile */
@media (max-width: 768px) {
    .slv-header-hamburger {
        margin-left: auto !important;
        position: relative;
        right: 0;
    }
}

/* ============================================================
   16. ICON FIXES
============================================================ */

.slv-header-icon {
    width: 28px !important;
    height: 28px !important;
}

.slv-header-icon svg,
.slv-header-icon img,
.slv-header-icon i {
    color: var(--slv-icon-color) !important;
    fill: var(--slv-icon-color) !important;
}

/* ============================================================
   17. SLV STRUCTURE PROTECTION BLOCK — DO NOT EDIT OR REMOVE
============================================================ */

/* 1) REMOVE WooCommerce pseudo-elements that steal the first grid cell */
ul.products::before,
ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none !important;
    display: none !important;
}

/* 2) DISABLE WooCommerce floats (critical for grid) */
ul.products li.product,
.woocommerce ul.products li.product {
    float: none !important;
    width: auto !important;      /* let the grid control width */
    margin: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
}

/* 3) FIX Add to Cart button position */
ul.products li.product .button {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: auto !important;
}

@media (max-width: 768px) {
    .slv-header-icons {
        display: flex !important;
        align-items: center;
        gap: 12px;
    }
}

/* ============================================================
   18. FIX HEADER CONTAINER WIDTH ON MOBILE
============================================================ */

@media (max-width: 768px) {

    /* Make the header container full width on mobile */
    .slv-header-main .slv-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box !important;
    }

    /* Allow search bar to shrink */
    .slv-header-search {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    /* Prevent icons + hamburger from shrinking */
    .slv-header-icons,
    .slv-header-hamburger {
        flex-shrink: 0 !important;
    }

    /* Make hamburger lines visible */
    .slv-header-hamburger span {
        background: #ffffff !important;
        width: 26px !important;
        height: 3px !important;
        display: block !important;
        margin: 4px 0;
    }
}

/* =====================================================
   19. GLOBAL CONTENT WRAPPER FIX -STOPS PAGE FULL WIDTH
   =================================================== */

.site-main,
.entry-content,
.single-product .product,
.page .entry-content,
.single .entry-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ====================================================
   20. SLV BANNER TITLE FIX and DOUBLED BANNER REMOVE
   ================================================== */

.woocommerce-products-header,
.woocommerce-products-header__title,
.page-title {
    display: none !important;
}


.slv-banner-title {
    /* your existing layout rules */
    text-align: center !important;
    display: block !important;
    margin: 0 auto 24px auto !important;
    padding: 0 20px !important;
    max-width: 1200px !important;
    box-sizing: border-box !important;

    /* VISUAL STYLE — soft black text + silver outline */
    color: #111; /* soft black */
    font-size: 26px; /* NOT huge */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;

    /* thin bright silver outline */
    text-shadow:
        -1px -1px 0 #d9d9d9,
         1px -1px 0 #d9d9d9,
        -1px  1px 0 #d9d9d9,
         1px  1px 0 #d9d9d9;
}

/* ============================================================
   21A. SLV ABOUT PAGE — TYPOGRAPHY & LAYOUT
============================================================ */

.slv-about-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.7;
    color: #222;
}

/* Section titles */
.slv-about-page h1 {
    font-size: 2.4rem;
    margin-bottom: 25px;
    color: #111;
}

.slv-about-page h2 {
    font-size: 1.9rem;
    margin-top: 50px;
    margin-bottom: 20px;
    text-align: left;
    font-weight: 600;
    color: #111;
    border-left: 4px solid var(--slv-silver-500);
    padding-left: 12px;
}

/* Paragraph spacing */
.slv-about-page p {
    margin-bottom: 20px;
}

/* Bullet lists */
.slv-about-page ul {
    margin: 15px 0 25px 25px;
}

/* ============================================================
   21B. SLV VIDEO FRAME — MATCHES THEME AESTHETIC
============================================================ */

.slv-video-center {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.slv-video-frame {
    width: 100%;
    max-width: 900px;
    border-radius: 8px;
    overflow: hidden;

    background: linear-gradient(
        to bottom,
        var(--slv-silver-200),
        var(--slv-silver-300)
    );
    border: 1px solid var(--slv-silver-400);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.slv-video-frame iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

/* ============================================================
   22. ADDING 2ND GLOBAL GRID 
============================================================ */
/* 2x2 universal grid */
.slv-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 40px 0;
}

/* Optional: card styling */
.slv-grid-2x2 .slv-card {
    background: #f8f8f8;
    padding: 22px 26px;
    border-radius: 8px;
    border: 1px solid #e3e3e3;
}

/* Mobile stays 2 columns */
@media (max-width: 600px) {
    .slv-grid-2x2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Disable WordPress block spacing inside homepage container */
.slv-page-content > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
