@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =============================================
   JARTIDES PRODUCTS PLUGIN — Card CSS
   ============================================= */

/* Grid */
.woocommerce ul.products,
ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    padding: 0 !important;
}
@media (max-width: 900px) {
    .woocommerce ul.products, ul.products { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 480px) {
    .woocommerce ul.products, ul.products { grid-template-columns: 1fr !important; }
}

/* Card */
ul.products li.product,
.woocommerce ul.products li.product {
    background: #ffffff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.05) !important;
    transition: box-shadow .2s, transform .2s !important;
    font-family: 'Inter', sans-serif !important;
}
ul.products li.product:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.10) !important;
    transform: translateY(-3px) !important;
}

/* Image */
ul.products li.product img,
ul.products li.product a > img {
    width: 100% !important;
    height: 200px !important;
    object-fit: contain !important;
    background: #f7f8fc !important;
    padding: 20px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: transform .3s !important;
    display: block !important;
}
ul.products li.product:hover img { transform: scale(1.05) !important; }

/* Badge top-left */
.jartides-badge {
    position: absolute !important;
    top: 11px !important;
    left: 11px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: .07em !important;
    text-transform: uppercase !important;
    padding: 4px 9px !important;
    border-radius: 6px !important;
    z-index: 10 !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.4 !important;
}
.jartides-badge--best-seller { background: #2563eb !important; color: #fff !important; }
.jartides-badge--backorder   { background: #6366f1 !important; color: #fff !important; }
.jartides-badge--new         { background: #0ea5e9 !important; color: #fff !important; }
.jartides-badge--sale        { background: #f59e0b !important; color: #fff !important; }
.jartides-badge--hot         { background: #ef4444 !important; color: #fff !important; }

/* Discount % top-right */
.jartides-discount,
.woocommerce ul.products li.product .onsale {
    position: absolute !important;
    top: 11px !important;
    right: 11px !important;
    left: auto !important;
    background: #16a34a !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    min-width: unset !important;
    min-height: unset !important;
    line-height: 1.4 !important;
    z-index: 10 !important;
    font-family: 'Inter', sans-serif !important;
}

/* Wishlist heart */
.jartides-wish {
    position: absolute !important;
    top: 40px !important;
    right: 13px !important;
    font-size: 17px !important;
    color: #d1d5db !important;
    cursor: pointer !important;
    z-index: 10 !important;
    line-height: 1 !important;
    transition: color .2s !important;
}
.jartides-wish:hover { color: #ef4444 !important; }

/* Subtitle — Peptides · 10 mg */
.jartides-subtitle {
    font-size: 11px !important;
    color: #9ca3af !important;
    margin: 13px 14px 2px !important;
    padding: 0 !important;
    font-family: 'Inter', sans-serif !important;
}

/* Title */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111 !important;
    margin: 0 14px 5px !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    font-family: 'Inter', sans-serif !important;
}
ul.products li.product .woocommerce-loop-product__title:first-of-type,
ul.products li.product h2:first-of-type {
    margin-top: 0 !important;
}

/* Stars */
ul.products li.product .star-rating {
    margin: 0 14px 5px !important;
    float: none !important;
    font-size: 12px !important;
}
ul.products li.product .star-rating::before,
ul.products li.product .star-rating span::before {
    color: #f59e0b !important;
}

/* Price */
ul.products li.product .price,
.woocommerce ul.products li.product .price {
    color: #1a56db !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 14px 10px !important;
    padding: 0 !important;
    display: block !important;
    font-family: 'Inter', sans-serif !important;
}
ul.products li.product .price del {
    color: #bbb !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    margin-right: 3px !important;
}
ul.products li.product .price ins { text-decoration: none !important; }

/* Button row */
.jartides-btn-row {
    display: flex !important;
    gap: 8px !important;
    margin: 0 14px 14px !important;
    align-items: center !important;
}

/* Add to Cart button */
ul.products li.product .button,
ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .button {
    flex: 1 !important;
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 9px !important;
    padding: 10px 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: background .2s !important;
    text-decoration: none !important;
    display: block !important;
    width: auto !important;
    margin: 0 !important;
}
ul.products li.product .button:hover { background: #1d4ed8 !important; color: #fff !important; }

/* View button */
.jartides-view-btn {
    background: #fff !important;
    color: #555 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 9px !important;
    padding: 9px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    cursor: pointer !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: border-color .2s, color .2s !important;
    display: inline-block !important;
}
.jartides-view-btn:hover { border-color: #2563eb !important; color: #2563eb !important; }

/* Single product purity */
.jartides-purity {
    font-size: 13px !important;
    color: #555 !important;
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    margin-bottom: 12px !important;
    display: inline-block !important;
}

/* Single product video */
.jartides-video-wrap {
    margin: 30px 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    padding-bottom: 56.25% !important;
    height: 0 !important;
}
.jartides-video-wrap iframe {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Admin fields styling */
.jartides-fields {
    border-top: 2px solid #2563eb !important;
    margin-top: 10px !important;
}

/* =============================================
   JARTIDES SEARCH OVERLAY
   ============================================= */

/* Trigger button */
.jartides-search-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color .2s, background .2s;
    vertical-align: middle;
}
.jartides-search-trigger:hover {
    color: #2563eb;
    background: rgba(37,99,235,.07);
}

/* Full-page overlay */
.jartides-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
}
.jartides-search-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Blur backdrop */
.jartides-search-open body > *:not(.jartides-search-overlay) {
    /* fallback for older browsers */
}
.jartides-search-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

/* Search box — slides down from top */
.jartides-search-box {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    padding: 28px 40px 32px;
    position: relative;
    transform: translateY(-30px);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}
.jartides-search-overlay.active .jartides-search-box {
    transform: translateY(0);
}

/* Close button */
.jartides-search-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color .2s, background .2s;
}
.jartides-search-close:hover {
    color: #111;
    background: #f3f4f6;
}

/* Input wrap */
.jartides-search-input-wrap {
    position: relative;
    max-width: 680px;
    margin: 0 auto 16px;
}
.jartides-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}
.jartides-search-input {
    width: 100%;
    border: 2px solid #2563eb !important;
    border-radius: 12px !important;
    padding: 14px 18px 14px 48px !important;
    font-size: 16px !important;
    font-family: 'Inter', sans-serif !important;
    color: #111 !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,.10) !important;
    box-sizing: border-box;
    transition: box-shadow .2s;
}
.jartides-search-input:focus {
    box-shadow: 0 0 0 5px rgba(37,99,235,.18) !important;
}
.jartides-search-input::placeholder { color: #9ca3af !important; }

/* Popular tags row */
.jartides-popular-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 680px;
    margin: 0 auto;
}
.jartides-popular-label {
    font-size: 12px;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}
.jartides-popular-tag {
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 4px 12px;
    text-decoration: none;
    transition: background .18s, border-color .18s, color .18s;
    white-space: nowrap;
}
.jartides-popular-tag:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

/* Mobile */
@media (max-width: 600px) {
    .jartides-search-box { padding: 20px 18px 24px; }
    .jartides-search-input { font-size: 15px !important; }
}
