/* Pawa Digital Store - Frontend Shop */

.pds-shop {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* --- Sidebar filtres --- */
.pds-shop__sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--pds-surface, #fff);
    border: 1px solid var(--pds-border, #e5e7eb);
    border-radius: var(--pds-radius, 14px);
    padding: 22px;
}
.pds-shop__filter-group { margin-bottom: 26px; }
.pds-shop__filter-group:last-child { margin-bottom: 0; }
.pds-shop__filter-group h3 {
    font-family: var(--pds-font-display, inherit);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pds-muted, #6b7280);
    margin: 0 0 14px;
    font-weight: 700;
}
.pds-shop__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--pds-ink, #1f2430);
    margin-bottom: 10px;
    cursor: pointer;
}
.pds-shop__checkbox input { accent-color: var(--pds-violet, #6d28d9); }
.pds-shop__checkbox em {
    margin-left: auto;
    font-style: normal;
    color: var(--pds-muted, #9ca3af);
    font-size: 12px;
}
.pds-shop__price-inputs { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pds-shop__price-inputs input {
    width: 0; flex: 1; padding: 8px 10px;
    border: 1px solid var(--pds-border, #d1d5db);
    border-radius: 8px;
    font-size: 14px;
}
.pds-shop__price-inputs input:focus,
.pds-shop__filter-group select:focus {
    outline: none;
    border-color: var(--pds-violet, #6d28d9);
    box-shadow: 0 0 0 3px rgba(109,40,217,0.12);
}
.pds-shop__filter-group select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--pds-border, #d1d5db);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}
.pds-shop__btn-secondary {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1.5px solid var(--pds-blue, #1a44d4);
    color: var(--pds-blue, #1a44d4);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}
.pds-shop__btn-secondary:hover { background: var(--pds-blue, #1a44d4); color: #fff; }

/* --- Grille produits --- */
.pds-shop__main { flex: 1; }
.pds-shop__empty { color: var(--pds-muted, #6b7280); padding: 60px 0; text-align: center; font-size: 15px; }
.pds-shop__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 900px) {
    .pds-shop { flex-direction: column; }
    .pds-shop__sidebar { width: 100%; }
    .pds-shop__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .pds-shop__grid { grid-template-columns: 1fr; }
}

.pds-shop-card {
    background: var(--pds-surface, #fff);
    border: 1px solid var(--pds-border, #e5e7eb);
    border-radius: var(--pds-radius, 14px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--pds-shadow, 0 1px 3px rgba(0,0,0,0.04));
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pds-shop-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pds-shadow-lg, 0 16px 40px rgba(22,27,46,0.16));
    border-color: rgba(109,40,217,0.25);
}
.pds-shop-card__image-link { position: relative; display: block; overflow: hidden; }
.pds-shop-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    z-index: 1;
    /* La couleur de fond vient d'un style inline (par type de produit,
       voir pds_shop_get_type_badge_color()) — jamais de fond ici, il
       serait de toute façon systématiquement remplacé. */
    box-shadow: 0 3px 10px rgba(22,27,46,0.2);
}
.pds-shop-card__image {
    width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block;
    background: #f3f4f6;
    transition: transform 0.35s ease;
}
.pds-shop-card:hover .pds-shop-card__image { transform: scale(1.05); }
.pds-shop-card__image--placeholder { background: var(--pds-gradient-soft, #f3f4f6); }
.pds-shop-card__body { padding: 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.pds-shop-card__title { margin: 0; font-family: var(--pds-font-display, inherit); font-size: 16px; font-weight: 600; }
.pds-shop-card__title a { color: var(--pds-ink, #1f2430); text-decoration: none; }
.pds-shop-card__title a:hover { color: var(--pds-violet, #1a44d4); }
.pds-shop-card__description {
    margin: 0;
    font-size: 13px;
    color: var(--pds-muted, #6b7280);
    flex: 1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pds-shop-card__price {
    margin: 0;
    font-weight: 800;
    font-size: 16px;
    color: var(--pds-blue, #1a44d4); /* repli si background-clip:text n'est pas supporté — sans ça, le prix serait invisible (text-fill-color:transparent) */
    background: var(--pds-gradient, linear-gradient(135deg,#1a44d4,#6d28d9));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pds-shop-card__btn {
    display: inline-block;
    text-align: center;
    padding: 9px 18px;
    border: 1.5px solid var(--pds-blue, #1a44d4);
    color: var(--pds-blue, #1a44d4);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}
.pds-shop-card__btn:hover { background: var(--pds-blue, #1a44d4); color: #fff; }
.pds-shop-card__btn--outline { background: #fff; }
.pds-shop-card__btn--large {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--pds-gold, #f59e0b), var(--pds-gold-dark, #d97706));
    border: none;
    color: #1f2430;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(217,119,6,0.28);
}
.pds-shop-card__btn--large:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(217,119,6,0.36); }

.pds-shop__pagination { margin-top: 32px; text-align: center; }
.pds-shop__pagination .page-numbers {
    display: inline-block;
    padding: 7px 13px;
    margin: 0 3px;
    border: 1px solid var(--pds-border, #e5e7eb);
    border-radius: 999px;
    color: var(--pds-ink, #1f2430);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.pds-shop__pagination .page-numbers.current {
    background: var(--pds-gradient, linear-gradient(135deg,#1a44d4,#6d28d9));
    border-color: transparent;
    color: #fff;
}

/* --- Fiche produit --- */
.pds-shop-product { width: 100%; }
.pds-shop-product__back { display: inline-block; margin-bottom: 20px; color: var(--pds-muted, #6b7280); text-decoration: none; font-size: 14px; font-weight: 500; }
.pds-shop-product__back:hover { color: var(--pds-violet, #6d28d9); }
.pds-shop-product__layout { display: flex; gap: 40px; align-items: flex-start; width: 100%; }
.pds-shop-product__media { flex: 1; max-width: 480px; position: relative; }
.pds-shop-product__image { width: 100%; border-radius: var(--pds-radius, 14px); border: 1px solid var(--pds-border, #e5e7eb); box-shadow: var(--pds-shadow, none); }
.pds-shop-product__gallery { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pds-shop-product__gallery img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--pds-border, #e5e7eb); cursor: pointer; transition: border-color 0.15s; }
.pds-shop-product__gallery img:hover { border-color: var(--pds-violet, #6d28d9); }
.pds-shop-product__info { flex: 1.2; min-width: 0; max-width: 100%; overflow-x: hidden; }
.pds-shop-product__info h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.15; }
.pds-shop-product__lead { color: var(--pds-muted, #6b7280); font-size: 16px; line-height: 1.6; }
.pds-shop-product__meta { font-size: 14px; color: var(--pds-body, #374151); }
.pds-shop-product__description {
    margin: 0;
    line-height: 1.75;
    color: var(--pds-body, #1f2430);
    font-size: 15px;
    max-width: 100%;
    overflow-x: auto;
}
/* Filet de sécurité contre tout widget/embed tiers avec sa propre largeur
   fixe (peu importe le service — SoundCloud, Canva, etc.) collé dans une
   description produit : contraint à ne jamais dépasser le conteneur,
   plutôt que de pousser toute la page en débordement horizontal. */
.pds-shop-product__description * { max-width: 100% !important; }
/* Rend responsive toute iframe vidéo collée directement (sans wrapper
   dédié) — s'adapte à la largeur du conteneur en conservant le ratio
   16:9, même si le code source a des attributs width/height fixes. */
.pds-shop-product__description iframe,
.pds-shop-product__changelog iframe {
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}
.pds-shop-product__description-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--pds-border, #e5e7eb);
}
.pds-shop-product__description-section h2 { font-size: 22px; margin-bottom: 16px; }
.pds-shop-product__changelog { margin: 18px 0; background: var(--pds-gradient-soft, #f8f9fb); border-radius: var(--pds-radius-sm, 10px); padding: 14px 16px; font-size: 14px; max-width: 100%; overflow-x: auto; }
.pds-shop-product__changelog * { max-width: 100% !important; }

.pds-shop-offers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.pds-shop-offer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 14px 18px;
    border: 1.5px solid var(--pds-border, #e5e7eb);
    border-radius: var(--pds-radius-sm, 10px);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    max-width: 100%;
}
.pds-shop-offer:hover { border-color: rgba(109,40,217,0.4); }
.pds-shop-offer:has(input:checked) {
    border-color: var(--pds-violet, #6d28d9);
    background: var(--pds-gradient-soft, #eef1fd);
}
.pds-shop-offer input { accent-color: var(--pds-violet, #6d28d9); }
.pds-shop-offer__label { font-weight: 700; word-break: break-word; }
.pds-shop-offer__duration { color: var(--pds-muted, #6b7280); font-size: 13px; }
.pds-shop-offer__price { margin-left: auto; font-weight: 800; color: var(--pds-blue, #1a44d4); font-size: 15px; }

.pds-shop-form-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.pds-shop-form-row input:not([type="checkbox"]) {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--pds-border, #d1d5db);
    border-radius: 8px;
    font-size: 14px;
}
.pds-shop-form-row input:not([type="checkbox"]):focus {
    outline: none;
    border-color: var(--pds-violet, #6d28d9);
    box-shadow: 0 0 0 3px rgba(109,40,217,0.12);
}

.pds-shop-notice { padding: 13px 18px; border-radius: var(--pds-radius-sm, 10px); margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.pds-shop-notice--success { background: #dcfce7; color: #166534; }
.pds-shop-notice--error { background: #fee2e2; color: #991b1b; }

@media (max-width: 800px) {
    .pds-shop-product__layout { flex-direction: column; }
    .pds-shop-product__media { max-width: 100%; }
}

/* ── Produits liés (bas de fiche produit) ────────────────────────────── */
.pds-shop-related { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--pds-border, #e5e7eb); }
.pds-shop-related__title { font-size: 20px; margin-bottom: 20px; }
.pds-shop-related__grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .pds-shop-related__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .pds-shop-related__grid { grid-template-columns: 1fr; } }
/* Carte allégée : nom, prix, photo et badge de type conservés —
   description et bouton "Voir le produit" masqués (le partiel de carte
   reste partagé avec la grille principale de la boutique, qui les
   affiche toujours). */
.pds-shop-related__grid .pds-shop-card__description,
.pds-shop-related__grid .pds-shop-card__btn { display: none; }

/* ── Navigation enrichie de la barre du haut (boutique uniquement) ───── */
.pds-shop-topbar-nav { display: flex; align-items: center; gap: 22px; }
.pds-shop-topbar-nav__extra { display: flex; align-items: center; gap: 22px; }
.pds-shop-topbar-nav__link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--pds-body, #3f4557);
    text-decoration: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.pds-shop-topbar-nav__link:hover { color: var(--pds-violet, #6d28d9); }

.pds-shop-topbar-dropdown { position: relative; }
.pds-shop-topbar-dropdown__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: var(--pds-surface, #fff);
    border: 1px solid var(--pds-border, #e6e8f4);
    border-radius: var(--pds-radius-sm, 10px);
    box-shadow: var(--pds-shadow-md, 0 8px 24px rgba(22,27,46,0.1));
    padding: 8px;
    min-width: 200px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 30;
}
.pds-shop-topbar-dropdown:hover .pds-shop-topbar-dropdown__menu,
.pds-shop-topbar-dropdown:focus-within .pds-shop-topbar-dropdown__menu { display: block; }
.pds-shop-topbar-dropdown__menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--pds-body, #3f4557);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}
.pds-shop-topbar-dropdown__menu a:hover { background: var(--pds-gradient-soft, #eef1fd); color: var(--pds-violet, #6d28d9); }

.pds-shop-topbar-search {
    display: flex;
    align-items: center;
    background: var(--pds-bg, #f5f6fd);
    border: 1px solid var(--pds-border, #e6e8f4);
    border-radius: 999px;
    padding: 4px 5px 4px 14px;
}
.pds-shop-topbar-search input {
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    width: 160px;
    font-family: inherit;
    color: var(--pds-ink, #161b2e);
}
.pds-shop-topbar-search input::placeholder { color: var(--pds-muted, #9ca3af); }
.pds-shop-topbar-search button {
    background: var(--pds-gradient, linear-gradient(135deg,#1a44d4,#6d28d9));
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

/* Sous 900px, seul le lien "Boutique" reste visible dans la barre du
   haut (logo + boutique + connexion) — le reste (catégories, nouveautés,
   plus vendus, recherche, support) est masqué, par prudence après la
   session de débogage du débordement horizontal. */
@media (max-width: 900px) {
    .pds-shop-topbar-nav__extra { display: none; }
}
