/* =========================================================
   PREMIUM PRODUCT GRID - PROFESSIONAL EDITION
   Desktop: 4-Column Premium | Mobile: Button Always Visible, Sizes Hidden
========================================================= */

/* =========================================================
   MAIN GRID CONTAINER - ENHANCED
========================================================= */

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* REMOVE FLOATS - CLEAN SLATE */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce ul.products li.product::before,
.woocommerce ul.products li.product::after {
    display: none !important;
    content: none !important;
}

/* =========================================================
   PRODUCT CARD - PREMIUM ENHANCEMENTS
========================================================= */

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
}

/* CARD INNER - LUXURY FINISH */
.nk-card-inner {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.2, 0, 0, 1);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

/* PREMIUM HOVER EFFECT - SOPHISTICATED */
.nk-card-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.08);
}

/* =========================================================
   BG TEXT - SUBTLE WATERMARK
========================================================= */

.nk-bg-text {
    position: absolute;
    top: 20px;
    left: -8px;
    font-size: 64px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.03);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
    letter-spacing: -0.02em;
}

/* =========================================================
   IMAGE CONTAINER - REFINED
========================================================= */

.nk-product-image {
    position: relative;
    z-index: 5;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 20px;
    background: #f8f8f8;
}

/* IMAGE STYLING */
.nk-product-image img {
    width: 100%;
    aspect-ratio: 1/1.15;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

/* PREMIUM IMAGE HOVER */
.nk-card-inner:hover .nk-product-image img {
    transform: scale(1.05) translateY(-3px);
}

/* OPTIONAL: IMAGE OVERLAY FOR DEPTH */
.nk-product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
}

/* =========================================================
   CONTENT AREA - TYPOGRAPHY REFINEMENT
========================================================= */

.nk-product-content {
    position: relative;
    z-index: 10;
}

/* TITLE - PREMIUM TYPOGRAPHY */
.nk-product-title {
    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.nk-product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.25s ease;
}

.nk-product-title a:hover {
    color: #e53935;
}

/* PRICE - BOLD & CLEAN */
.nk-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

/* SALE PRICE STYLING */
.nk-product-price del {
    color: #999;
    font-size: 15px;
    font-weight: 500;
    margin-right: 6px;
}

.nk-product-price ins {
    text-decoration: none;
    font-weight: 800;
    color: #e53935;
}

/* =========================================================
   HOVER CONTENT - SMOOTH REVEAL (DESKTOP ONLY)
========================================================= */

.nk-hover-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0, 0, 1);
    margin-top: 0;
    border-top: 1px solid transparent;
}

/* SHOW HOVER CONTENT ON CARD HOVER (DESKTOP ONLY) */
.nk-card-inner:hover .nk-hover-content {
    max-height: 240px;
    opacity: 1;
    margin-top: 18px;
    border-top-color: rgba(0, 0, 0, 0.06);
}

/* =========================================================
   SIZES SECTION - PREMIUM INTERACTIVE
========================================================= */

.nk-product-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

/* SIZE BUTTONS - REFINED */
.nk-product-sizes span {
    min-width: 42px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.nk-product-sizes span:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: translateY(-2px);
}

/* =========================================================
   COLORS SECTION - ENHANCED VISUALS
========================================================= */

.nk-product-colors {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* COLOR SWATCHES - PREMIUM FINISH */
.nk-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nk-color:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* COLOR VARIATIONS */
.nk-color[data-color="black"] { background: #1a1a1a; }
.nk-color[data-color="white"] { background: #ffffff; border: 1px solid #e0e0e0; }
.nk-color[data-color="blue"] { background: #2d7aff; }
.nk-color[data-color="red"] { background: #e53935; }
.nk-color[data-color="green"] { background: #2e7d32; }
.nk-color[data-color="yellow"] { background: #f5b81b; }
.nk-color[data-color="pink"] { background: #e91e63; }
.nk-color[data-color="navy"] { background: #1a2a4f; }
.nk-color[data-color="coral"] { background: #ff6b4a; }
.nk-color[data-color="olive"] { background: #6b8e23; }

/* =========================================================
   BUTTON - PREMIUM CTA
   This stays VISIBLE on all devices
========================================================= */

.nk-product-button {
    margin-top: 4px;
}

.nk-product-button .button {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    background: #1a1a1a !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: none !important;
}

.nk-product-button .button:hover {
    background: #e53935 !important;
    transform: translateY(-2px);
}

/* =========================================================
   SALE BADGE - ELEGANT
========================================================= */

.nk-product-card .onsale,
.woocommerce span.onsale {
    top: 16px !important;
    left: 16px !important;
    right: auto !important;
    border-radius: 30px;
    background: #e53935 !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    min-width: auto !important;
    min-height: auto !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 15;
}

/* =========================================================
   DESKTOP REFINEMENTS (1200px+)
========================================================= */

@media(min-width: 1400px) {
    .woocommerce ul.products {
        gap: 32px;
    }
    
    .nk-card-inner {
        padding: 24px;
    }
    
    .nk-product-title {
        font-size: 20px;
    }
    
    .nk-product-price {
        font-size: 22px;
    }
}

/* =========================================================
   TABLET: 3 COLUMNS
========================================================= */

@media(max-width: 1024px) and (min-width: 769px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
}

/* =========================================================
   MOBILE: 2 COLUMNS - SIZES HIDDEN, BUTTON ALWAYS VISIBLE
   NO hover, NO tap-to-reveal for sizes
   Only image, title, price, and button show
========================================================= */

@media(max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }
    
    /* CARD ADJUSTMENTS FOR MOBILE */
    .nk-card-inner {
        border-radius: 20px;
        padding: 12px;
    }
    
    /* ========== KEY CHANGE: COMPLETELY HIDE SIZES & COLORS ON MOBILE ========== */
    /* Sizes and colors are NEVER visible on mobile */
    .nk-hover-content {
        display: none !important;
    }
    
    /* Make sure button container is visible and properly spaced */
    .nk-product-button {
        display: block !important;
        margin-top: 12px;
    }
    
    /* Adjust button for mobile - always visible */
    .nk-product-button .button {
        min-height: 44px;
        border-radius: 12px;
        font-size: 12px;
    }
    
    /* Mobile BG Text */
    .nk-bg-text {
        font-size: 42px;
        top: 12px;
        left: -6px;
    }
    
    /* Mobile Typography */
    .nk-product-title {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .nk-product-price {
        font-size: 16px;
    }
    
    .nk-product-price del {
        font-size: 12px;
    }
    
    /* Mobile Image */
    .nk-product-image {
        margin-bottom: 10px;
        border-radius: 14px;
    }
    
    /* Mobile Sale Badge */
    .nk-product-card .onsale,
    .woocommerce span.onsale {
        top: 10px !important;
        left: 10px !important;
        padding: 4px 10px !important;
        font-size: 10px !important;
    }
    
    /* DISABLE ALL HOVER EFFECTS ON MOBILE */
    .nk-card-inner:hover {
        transform: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
    }
    
    .nk-card-inner:hover .nk-product-image img {
        transform: none;
    }
    
    .nk-product-sizes span:hover {
        transform: none;
    }
    
    /* Button stays visible, no hover transform on mobile */
    .nk-product-button .button:hover {
        transform: none;
    }
}

/* =========================================================
   SMALL MOBILE (<=480px) - EXTRA CARE
========================================================= */

@media(max-width: 480px) {
    .woocommerce ul.products {
        gap: 12px !important;
    }
    
    .nk-card-inner {
        padding: 10px;
        border-radius: 16px;
    }
    
    .nk-product-title {
        font-size: 13px;
    }
    
    .nk-product-price {
        font-size: 15px;
    }
    
    /* Button stays visible and properly sized */
    .nk-product-button .button {
        min-height: 40px;
        font-size: 11px;
    }
}

/* =========================================================
   ACCESSIBILITY & PERFORMANCE
========================================================= */

/* REDUCED MOTION PREFERENCE */
@media (prefers-reduced-motion: reduce) {
    .nk-card-inner,
    .nk-card-inner:hover,
    .nk-product-image img,
    .nk-hover-content,
    .nk-product-button .button {
        transition: none !important;
        transform: none !important;
    }
}

/* FOCUS STATES FOR KEYBOARD NAVIGATION */
.nk-product-button .button:focus-visible,
.nk-product-sizes span:focus-visible,
.nk-color:focus-visible,
.nk-product-title a:focus-visible {
    outline: 2px solid #e53935;
    outline-offset: 2px;
}