/* ==========================================================================
   Simply Stone Arts - New Arrivals Section & Archive Filter
   Exact Match with Site Theme Product Cards (Image 2)
   ========================================================================== */

:root {
    --ssa-color-dark: #1a1a1a;
    --ssa-color-copper: #c9a97a;
    --ssa-color-copper-hover: #b8935e;
    --ssa-color-stone: #e8e0d4;
    --ssa-color-cream: #faf7f2;
    --ssa-color-mid: #5c5043;
    --ssa-color-muted: #8a7d6e;
    --ssa-font-serif: 'Playfair Display', Georgia, serif;
    --ssa-font-body: 'EB Garamond', Georgia, serif;
    --ssa-font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --------------------------------------------------------------------------
   Section Wrapper & Headers
   -------------------------------------------------------------------------- */
.ssa-new-arrivals-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px 20px 40px;
    position: relative;
    box-sizing: border-box;
}

.ssa-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.ssa-section-subtitle {
    display: inline-block;
    font-family: var(--ssa-font-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ssa-color-copper);
    margin-bottom: 10px;
}

.ssa-section-title {
    font-family: var(--ssa-font-serif);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.25;
    color: #2b2620;
    margin: 0 0 12px;
}

.ssa-section-title em {
    font-style: italic;
    color: var(--ssa-color-copper);
    font-weight: 400;
}

.ssa-section-desc {
    font-family: var(--ssa-font-sans);
    font-size: 15px;
    color: var(--ssa-color-muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Product Grid
   -------------------------------------------------------------------------- */
.ssa-new-arrivals-wrapper ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: transparent !important;
}

.ssa-new-arrivals-wrapper ul.products::before,
.ssa-new-arrivals-wrapper ul.products::after {
    display: none !important;
    content: none !important;
}

/* --------------------------------------------------------------------------
   Product Card (Exact Match to Image 2)
   -------------------------------------------------------------------------- */
.ssa-new-arrivals-wrapper ul.products li.product,
.woocommerce .ssa-new-arrivals-wrapper ul.products li.product {
    background: #1a1a1a !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    padding: 0 0 14px 0 !important;
    margin: 0 0 24px 0 !important;
    float: none !important;
    width: 100% !important;
    position: relative !important;
    box-sizing: border-box !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: block !important;
}

.ssa-new-arrivals-wrapper ul.products li.product:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
}

.ssa-new-arrivals-wrapper ul.products li.product::after {
    content: '' !important;
    display: table !important;
    clear: both !important;
}

/* Product Card Link */
.ssa-new-arrivals-wrapper ul.products li.product .woocommerce-LoopProduct-link,
.ssa-new-arrivals-wrapper ul.products li.product a.woocommerce-loop-product__link {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Image */
.ssa-new-arrivals-wrapper ul.products li.product img,
.ssa-new-arrivals-wrapper ul.products li.product a.woocommerce-loop-product__link img {
    width: 100% !important;
    height: 290px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #fdfdfd !important;
    transition: transform 0.4s ease !important;
}

.ssa-new-arrivals-wrapper ul.products li.product:hover img {
    transform: scale(1.02) !important;
}

/* Product Title - CRISP PURE WHITE */
.ssa-new-arrivals-wrapper ul.products li.product .woocommerce-loop-product__title,
.ssa-new-arrivals-wrapper ul.products li.product h2,
.ssa-new-arrivals-wrapper ul.products li.product h2.woocommerce-loop-product__title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    padding: 14px 16px 4px !important;
    margin: 0 !important;
    line-height: 1.35 !important;
    text-align: left !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 48px !important;
    letter-spacing: 0 !important;
}

/* Price - CRISP PURE WHITE */
.ssa-new-arrivals-wrapper ul.products li.product .price,
.ssa-new-arrivals-wrapper ul.products li.product .price * {
    color: #ffffff !important;
    font-family: 'EB Garamond', Georgia, serif !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.ssa-new-arrivals-wrapper ul.products li.product .price {
    padding: 4px 16px 14px !important;
    margin: 0 !important;
    display: block !important;
}

.ssa-new-arrivals-wrapper ul.products li.product .price del,
.ssa-new-arrivals-wrapper ul.products li.product .price del * {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 16px !important;
    margin-right: 8px !important;
    text-decoration: line-through !important;
}

.ssa-new-arrivals-wrapper ul.products li.product .price ins,
.ssa-new-arrivals-wrapper ul.products li.product .price ins * {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   Action Buttons (ADD TO CART + Wishlist + QuickView + Compare)
   -------------------------------------------------------------------------- */

/* Add to Cart / Read More Button (White pill-rectangle with black text) */
.ssa-new-arrivals-wrapper ul.products li.product a.button,
.ssa-new-arrivals-wrapper ul.products li.product .button,
.ssa-new-arrivals-wrapper ul.products li.product a.add_to_cart_button {
    display: inline-block !important;
    width: calc(100% - 64px) !important;
    margin: 0 0 12px 16px !important;
    background: #ffffff !important;
    color: #111111 !important;
    font-family: 'EB Garamond', serif !important;
    font-size: 11px !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    padding: 13px 18px !important;
    border: none !important;
    border-radius: 0 !important;
    text-align: center !important;
    font-weight: 600 !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    box-shadow: none !important;
    float: left !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    height: 40px !important;
}

.ssa-new-arrivals-wrapper ul.products li.product a.button:hover,
.ssa-new-arrivals-wrapper ul.products li.product .button:hover {
    background: #f0e8d0 !important;
    color: #111111 !important;
}

/* Wishlist Heart Icon (White circle next to ADD TO CART) */
.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-wishlist,
.ssa-new-arrivals-wrapper ul.products li.product a.shopengine_add_to_list_action,
.ssa-new-arrivals-wrapper ul.products li.product .shopengine-wishlist {
    position: absolute !important;
    right: 14px !important;
    bottom: 38px !important;
    top: auto !important;
    left: auto !important;
    width: 36px !important;
    height: 40px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    z-index: 10 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    cursor: pointer !important;
    border: none !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-wishlist:hover,
.ssa-new-arrivals-wrapper ul.products li.product a.shopengine_add_to_list_action:hover {
    transform: scale(1.08) !important;
    background: #f0e8d0 !important;
}

.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-wishlist i,
.ssa-new-arrivals-wrapper ul.products li.product a.shopengine_add_to_list_action i {
    color: #111111 !important;
    font-size: 15px !important;
    display: block !important;
}

/* Quick View Eye Icon (Right side of image) */
.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-quickview-trigger,
.ssa-new-arrivals-wrapper ul.products li.product .shopengine-quickview-trigger {
    position: absolute !important;
    top: 50% !important;
    right: 14px !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: 34px !important;
    height: 34px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    z-index: 10 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
    border: none !important;
}

.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-quickview-trigger:hover {
    transform: translateY(-50%) scale(1.1) !important;
    background: #f0e8d0 !important;
}

.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-quickview-trigger i {
    color: #111111 !important;
    font-size: 14px !important;
    display: block !important;
}

/* Compare Icon (Centered below) */
.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-comparison,
.ssa-new-arrivals-wrapper ul.products li.product .shopengine-comparison {
    position: relative !important;
    display: block !important;
    clear: both !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding-top: 6px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-comparison i {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 15px !important;
    transition: color 0.2s ease !important;
}

.ssa-new-arrivals-wrapper ul.products li.product a.shopengine-comparison:hover i {
    color: #ffffff !important;
}

/* Badges: On Sale & New Arrival */
.ssa-new-arrivals-wrapper ul.products li.product span.onsale {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    background: #111111 !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    min-width: 48px !important;
    min-height: 48px !important;
    line-height: 48px !important;
    text-align: center !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    z-index: 11 !important;
}

.ssa-badge-new-arrival {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 11 !important;
    background: #c9a97a !important;
    color: #1a1a1a !important;
    font-family: var(--ssa-font-sans) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 5px 10px !important;
    border-radius: 2px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
    border: none !important;
    pointer-events: none !important;
}

/* If product has both Sale and New badge, shift New badge right */
.ssa-new-arrivals-wrapper ul.products li.product.sale .ssa-badge-new-arrival {
    top: 12px !important;
    left: 68px !important;
}

/* Sold Out Badge */
.ssa-new-arrivals-wrapper ul.products li.product .ssa-sold-out-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: #8b0000 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    padding: 4px 8px !important;
    z-index: 12 !important;
}

/* --------------------------------------------------------------------------
   Homepage "Show More" Button
   -------------------------------------------------------------------------- */
.ssa-section-footer {
    text-align: center;
    margin-top: 45px;
    padding-top: 10px;
    clear: both;
}

.ssa-btn-show-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 44px;
    background: #1a1a1a;
    color: #ffffff !important;
    font-family: var(--ssa-font-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none !important;
    border: 1px solid #1a1a1a;
    border-radius: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.ssa-btn-show-more:hover {
    background: var(--ssa-color-copper);
    border-color: var(--ssa-color-copper);
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(201, 169, 122, 0.4);
}

.ssa-btn-show-more .ssa-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 16px;
    line-height: 1;
}

.ssa-btn-show-more:hover .ssa-arrow {
    transform: translateX(6px);
}

/* --------------------------------------------------------------------------
   Archive Page (/new-arrivals/) & Date Filter Bar
   -------------------------------------------------------------------------- */
.ssa-archive-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    box-sizing: border-box;
}

.ssa-archive-header {
    text-align: center;
    margin-bottom: 35px;
}

.ssa-archive-title {
    font-family: var(--ssa-font-serif);
    font-size: 42px;
    font-weight: 700;
    color: #2b2620;
    margin: 0 0 10px;
}

.ssa-archive-title em {
    font-style: italic;
    color: var(--ssa-color-copper);
    font-weight: 400;
}

.ssa-archive-desc {
    font-family: var(--ssa-font-sans);
    font-size: 16px;
    color: var(--ssa-color-muted);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filter Card */
.ssa-filter-card {
    background: var(--ssa-color-cream);
    border: 1px solid var(--ssa-color-stone);
    border-radius: 8px;
    padding: 28px 32px;
    margin-bottom: 35px;
    box-shadow: 0 4px 20px rgba(43, 38, 32, 0.04);
}

.ssa-filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ssa-font-serif);
    font-size: 20px;
    font-weight: 600;
    color: #2b2620;
    margin: 0 0 18px;
}

.ssa-filter-title svg {
    width: 20px;
    height: 20px;
    fill: var(--ssa-color-copper);
}

.ssa-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
}

.ssa-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 200px;
}

.ssa-filter-field label {
    font-family: var(--ssa-font-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ssa-color-mid);
}

.ssa-filter-field input[type="date"] {
    background: #ffffff;
    border: 1px solid #d5cbbf;
    border-radius: 4px;
    padding: 10px 14px;
    font-family: var(--ssa-font-sans);
    font-size: 14px;
    color: #2b2620;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 44px;
    box-sizing: border-box;
}

.ssa-filter-field input[type="date"]:focus {
    border-color: var(--ssa-color-copper);
    box-shadow: 0 0 0 3px rgba(201, 169, 122, 0.2);
}

.ssa-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
}

.ssa-btn-filter-apply {
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 0 24px;
    height: 44px;
    font-family: var(--ssa-font-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ssa-btn-filter-apply:hover {
    background: var(--ssa-color-copper);
    border-color: var(--ssa-color-copper);
}

.ssa-btn-filter-reset {
    background: #ffffff;
    color: var(--ssa-color-mid);
    border: 1px solid #d5cbbf;
    border-radius: 4px;
    padding: 0 20px;
    height: 44px;
    font-family: var(--ssa-font-sans);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ssa-btn-filter-reset:hover {
    background: #f0ebe1;
    color: #2b2620;
    border-color: var(--ssa-color-muted);
}

/* Quick Presets */
.ssa-filter-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px dashed var(--ssa-color-stone);
}

.ssa-preset-label {
    font-family: var(--ssa-font-sans);
    font-size: 12px;
    font-weight: 700;
    color: var(--ssa-color-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-right: 4px;
}

.ssa-preset-btn {
    background: #ffffff;
    border: 1px solid var(--ssa-color-stone);
    color: var(--ssa-color-mid);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--ssa-font-sans);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ssa-preset-btn:hover {
    border-color: var(--ssa-color-copper);
    color: var(--ssa-color-copper);
}

.ssa-preset-btn.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    font-weight: 600;
}

/* Filter Status Bar */
.ssa-filter-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding: 12px 18px;
    background: rgba(232, 224, 212, 0.35);
    border-left: 3px solid var(--ssa-color-copper);
    border-radius: 4px;
    font-family: var(--ssa-font-sans);
    font-size: 14px;
    color: #2b2620;
}

.ssa-status-count {
    font-weight: 700;
    color: var(--ssa-color-copper);
}

/* Empty State */
.ssa-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--ssa-color-cream);
    border-radius: 8px;
    border: 1px dashed var(--ssa-color-stone);
    margin: 30px 0;
}

.ssa-empty-state h3 {
    font-family: var(--ssa-font-serif);
    font-size: 26px;
    color: #2b2620;
    margin: 0 0 10px;
}

.ssa-empty-state p {
    font-family: var(--ssa-font-sans);
    font-size: 15px;
    color: var(--ssa-color-muted);
    max-width: 480px;
    margin: 0 auto 20px;
}

/* Loading Overlay */
.ssa-products-container {
    position: relative;
    min-height: 200px;
    transition: opacity 0.25s ease;
}

.ssa-products-container.loading {
    opacity: 0.4;
    pointer-events: none;
}

.ssa-loading-indicator {
    display: none;
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background: #1a1a1a;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--ssa-font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.ssa-products-container.loading + .ssa-loading-indicator,
.ssa-loading-indicator.active {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ssa-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ssa-spin 0.8s linear infinite;
}

@keyframes ssa-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .ssa-new-arrivals-wrapper ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .ssa-new-arrivals-wrapper {
        padding: 20px 15px 30px;
    }
    .ssa-section-title {
        font-size: 30px;
    }
    .ssa-archive-title {
        font-size: 32px;
    }
    .ssa-filter-card {
        padding: 20px;
    }
    .ssa-new-arrivals-wrapper ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    .ssa-new-arrivals-wrapper ul.products li.product img {
        height: 220px !important;
    }
    .ssa-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .ssa-filter-field {
        width: 100%;
    }
    .ssa-filter-actions {
        width: 100%;
    }
    .ssa-btn-filter-apply, .ssa-btn-filter-reset {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .ssa-new-arrivals-wrapper ul.products {
        grid-template-columns: repeat(1, 1fr) !important;
    }
    .ssa-new-arrivals-wrapper ul.products li.product img {
        height: 280px !important;
    }
}