/* =============================================
   RAYON — Individual Vendor Store page
   All selectors scoped to #wcfmmp-store
   (confirmed from live HTML inspect)
   ============================================= */

/* ── Remove WCFM default box-shadow ── */
#wcfmmp-store {
    box-shadow: none !important;
}

/* ── Hide WCFM banner ── */
#wcfmmp-store .wcfm_banner_area {
    display: none !important;
}

/* ── Hide WCFM store header (logo, address, social links, inquiry) ── */
#wcfm_store_header {
    display: none !important;
}

/* ── Hide sidebar ── */
#wcfmmp-store .left_sidebar {
    display: none !important;
}

/* ── Hide tabs (Products | About | Policies | Reviews) ── */
#tab_links_area {
    display: none !important;
}

/* ── Make right_side full-width once sidebar is gone ── */
#wcfmmp-store .right_side {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ── Body area: clear float layout ── */
#wcfmmp-store .body_area {
    overflow: visible;
    width: 100%;
}

/* ── Hide WCFM vendor dashboard icons (pencil/home icons on vendor's own store) ── */
img#wcfm_home,
.wcfm_home_icon,
.wcfm_vendor_dashboard_icons,
#wcfm_vendor_navigation,
a.wcfm_vendor_dashboard_link,
.wcfmmp_vendor_dashboard_icon { display: none !important; }

/* ── Page wrapper: max-width + padding ── */
#wcfmmp-store-content {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
}


/* ═══════════════════════════════════════════
   CUSTOM STORE HEADER (.rayon-store-header)
   HTML injected via wp_footer JS in functions.php
   Layout: info (left) | avatar 144px (right), centered
   ═══════════════════════════════════════════ */

/* Grid: avatar | info on row 1, buttons spanning both on row 2.
   max-width + margin:auto centers the whole block on the page. */
.rayon-store-header {
    display: grid;
    grid-template-columns: 144px 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "avatar info"
        "buttons buttons";
    column-gap: 60px;
    row-gap: 0;
    max-width: 640px;
    margin: 0 auto;
    padding: 80px 0 40px;
    border-bottom: 1px solid #e5e5e5;
}

/* Info column */
.rayon-store-info {
    grid-area: info;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Avatar column */
.rayon-store-avatar {
    grid-area: avatar;
    flex-shrink: 0;
}

.rayon-store-avatar img {
    width: 144px;
    height: 144px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #e5e5e5;
}

/* Store name */
.rayon-store-name {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 42px;
    color: #000;
    margin: 0 0 10px;
    line-height: 1.1;
}

/* abonnés · suivi on one line */
.rayon-store-stats {
    display: flex;
    gap: 20px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #000;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    background: none;
    border: none;
}

/* Country / Créations / Ventes — each on own line */
.rayon-store-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #000;
    margin: 0 0 24px;
    padding: 0;
    background: none;
    border: none;
}

.rayon-store-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #000;
}

.rayon-store-meta-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* Buttons row — spans both columns, left-aligned with avatar */
.rayon-store-actions {
    grid-area: buttons;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-top: 28px;
}

/* Both buttons: solid black, 280×47px, border-radius 8px (Figma spec) */
.rayon-store-btn,
.rayon-store-btn--outline,
.rayon-store-btn--solid,
.rayon-store-btn:visited,
.rayon-store-btn--outline:visited,
.rayon-store-btn--solid:visited,
button.wcfmmp-follow-btn,
a.wcfmmp-follow-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 280px !important;
    height: 47px !important;
    background: #1C1C1C !important;
    border: 1.5px solid #1C1C1C !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-family: 'Josefin Sans', sans-serif !important;
    font-style: normal !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: none !important;
    padding: 0 !important;
    transition: background 0.15s, border-color 0.15s;
}

.rayon-store-btn:hover,
.rayon-store-btn--outline:hover,
.rayon-store-btn--solid:hover,
button.wcfmmp-follow-btn:hover,
a.wcfmmp-follow-btn:hover {
    background: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}


/* ═══════════════════════════════════════════
   PRODUCT GRID + CARD — custom template (content-product-vendor.php)
   ═══════════════════════════════════════════ */

/* Kill WooCommerce clearfix pseudo-elements — they become ghost grid items */
#wcfmmp-store ul.products::before,
#wcfmmp-store ul.products::after {
    content: none !important;
    display: none !important;
}

/* Hide WCFM store-manager link injected above product grid */
#wcfmmp-store a[href*="store-manager"] {
    display: none !important;
}

/* Grid — 4 fluid columns, 40px gap (70px before 2nd column via margin below) */
#wcfmmp-store ul.products {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    column-gap: 40px !important;
    row-gap: 40px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 40px 0 60px !important;
}

/* Hide WCFM phantom li items (add-product buttons etc.) that occupy grid space */
#wcfmmp-store ul.products li.product:not(.rayon-vs-item) {
    display: none !important;
}

/* li.product — reset all WooCommerce defaults */
#wcfmmp-store ul.products li.rayon-vs-item {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

/* ── Card shell — height:100% makes all cards in a row equal height ── */
.rayon-vs-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Image area ── */
.rayon-vs-card__img-wrap {
    position: relative;
}

.rayon-vs-card__img {
    display: block;
    width: 100%;
    aspect-ratio: 275 / 352;
    object-fit: contain;
    background-color: #f5f5f5;
    height: auto;
}

.rayon-vs-card__img--empty {
    display: block;
    width: 100%;
    aspect-ratio: 275 / 352;
    background-color: #656565;
}

/* ── Wishlist button (rayon_wl_btn) — 50px black circle, top-right ── */
.rayon-vs-card__img-wrap .rayon-wl-wrap {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.rayon-vs-card__img-wrap .rayon-wl-wrap a.add_to_wishlist,
.rayon-vs-card__img-wrap .rayon-wl-wrap a.yith-wcwl-add-to-wishlist-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: #000 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    text-decoration: none !important;
    cursor: pointer;
}

.rayon-vs-card__img-wrap .rayon-wl-wrap a.add_to_wishlist:hover,
.rayon-vs-card__img-wrap .rayon-wl-wrap a.yith-wcwl-add-to-wishlist-button:hover {
    background: #333 !important;
}

/* Hide YITH-injected text/icons inside the circle */
.rayon-vs-card__img-wrap .rayon-wl-wrap span,
.rayon-vs-card__img-wrap .rayon-wl-wrap .feedback,
.rayon-vs-card__img-wrap .rayon-wl-wrap i,
.rayon-vs-card__img-wrap .rayon-wl-wrap svg { display: none !important; }

/* Outlined white heart */
.rayon-vs-card__img-wrap .rayon-wl-wrap a::before {
    content: '';
    display: block;
    width: 18px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* Filled white heart when added */
.rayon-vs-card__img-wrap .rayon-wl-wrap a.added::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
}

/* ── Info area ── */
.rayon-vs-card__info {
    display: flex;
    flex-direction: column;
    padding: 10px 10px 0;
    flex: 1;
}

.rayon-vs-card__link {
    text-decoration: none;
    color: inherit;
}

/* Title — Josefin Sans 400 20px #333 */
.rayon-vs-card__title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    letter-spacing: 0.01em;
    color: #000000;
    margin: 0;
}

/* Subtitle: type + materials */
.rayon-vs-card__subtitle {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 0;
}

.rayon-vs-card__type,
.rayon-vs-card__materials {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 110%;
    letter-spacing: -0.05em;
    color: #333333;
}

/* Bottom row: price left-aligned */
.rayon-vs-card__bottom {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 12px 0 16px;
}

.rayon-vs-card__price,
.rayon-vs-card__price .woocommerce-Price-amount {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    letter-spacing: 0.01em;
    color: #000000;
}


/* ── Responsive ── */


@media (max-width: 1024px) {
    #wcfmmp-store ul.products {
        grid-template-columns: 1fr 1fr 1fr !important;
        column-gap: 24px !important;
    }
}

@media (max-width: 768px) {
    #wcfmmp-store ul.products {
        grid-template-columns: 1fr 1fr !important;
        column-gap: 16px !important;
        row-gap: 24px !important;
    }

    .rayon-store-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
        padding: 40px 0 32px;
    }

    .rayon-store-info {
        align-items: center;
    }

    .rayon-store-name {
        text-align: center;
    }

    .rayon-store-stats,
    .rayon-store-meta {
        justify-content: center;
        align-items: center;
    }

    .rayon-store-actions {
        justify-content: center;
        gap: 16px;
    }

    .rayon-store-btn,
    .rayon-store-btn--outline,
    .rayon-store-btn--solid,
    button.wcfmmp-follow-btn,
    a.wcfmmp-follow-btn {
        width: 150px !important;
        height: 40px !important;
        font-size: 14px !important;
    }
}