/* Pages de vente (recherche, fiche, panier). Tout est sous .vente pour ne pas toucher aux autres pages. */

.vente {
    --v-accent: #1b6ec2;
    --v-border: #e2e7ee;
    --v-soft: #f7f9fc;
    --v-muted: #6c7682;
    --v-ink: #1f2933;
}

.vente .min-w-0 {
    min-width: 0;
}

.vente .shop-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.vente .crumbs {
    font-size: 14px;
    color: var(--v-muted);
}

    .vente .crumbs a {
        color: var(--v-muted);
        text-decoration: none;
    }

        .vente .crumbs a:hover {
            color: var(--v-accent);
            text-decoration: underline;
        }

.vente .sep {
    margin: 0 4px;
    color: #a3acb6;
}

/* Bouton panier */

.vente .cart-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--v-border);
    border-radius: 999px;
    background: #fff;
    color: var(--v-ink);
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

    .vente .cart-button:hover {
        border-color: var(--v-accent);
        color: var(--v-accent);
    }

.vente .cart-count {
    min-width: 24px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--v-accent);
    color: #fff;
    font-size: 13px;
    text-align: center;
}

.vente .cart-total {
    color: var(--v-muted);
    font-weight: 500;
}

/* Recherche */

.vente .shop-search {
    position: relative;
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

    .vente .shop-search .icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #8a939d;
        font-size: 22px;
        pointer-events: none;
    }

    .vente .shop-search input {
        flex: 1 1 auto;
        padding-left: 46px;
        border-radius: 12px;
    }

    .vente .shop-search select {
        flex: 0 0 220px;
        border-radius: 12px;
    }

.vente .shop-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 991px) {
    .vente .shop-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .vente .shop-search {
        flex-wrap: wrap;
    }

        .vente .shop-search select {
            flex: 1 1 100%;
        }
}

.vente .shop-cats {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.vente .cats-title {
    padding: 0 10px 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--v-muted);
}

.vente .cat {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--v-ink);
    text-align: left;
}

    .vente .cat:hover {
        background: #e8eef7;
    }

    .vente .cat.active {
        background: var(--v-accent);
        color: #fff;
    }

    .vente .cat .name {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .vente .cat .count {
        font-size: 12px;
        opacity: 0.7;
    }

.vente .result-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #44505c;
}

.vente .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 4px 2px 10px;
    border-radius: 999px;
    background: #e2edfb;
    color: #1b5fb0;
    font-size: 13px;
}

    .vente .filter-chip button {
        border: 0;
        background: transparent;
        color: inherit;
        padding: 0 6px;
    }

.vente .added-toast {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #e6f4ea;
    color: #1e7e34;
}

    .vente .added-toast a {
        font-weight: 600;
        color: #1e7e34;
    }

.vente .empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--v-muted);
    border: 1px dashed #d3dae3;
    border-radius: 12px;
}

/* Cartes */

.vente .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.vente .product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--v-border);
    border-radius: 14px;
    background: #fff;
    transition: box-shadow 0.15s, transform 0.15s;
}

    .vente .product-card:hover {
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
        transform: translateY(-2px);
    }

.vente .product-photo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #eef3f9, #e3e9f1);
    text-decoration: none;
}

    .vente .product-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.vente .placeholder-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    color: #8a99ab;
}

.vente .ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--v-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.vente .product-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 12px 14px 14px;
}

.vente .product-cat {
    font-size: 12px;
    color: var(--v-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vente .product-name {
    margin-top: 2px;
    font-weight: 600;
    color: var(--v-ink);
    text-decoration: none;
    line-height: 1.3;
}

    .vente .product-name:hover {
        color: var(--v-accent);
    }

.vente .product-code, .vente .code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--v-muted);
}

.vente .code {
    font-weight: 600;
    color: var(--v-ink);
}

.vente .product-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.vente .price {
    display: flex;
    flex-direction: column;
    font-size: 18px;
    font-weight: 700;
    color: var(--v-ink);
    line-height: 1.1;
}

    .vente .price small {
        font-size: 12px;
        font-weight: 500;
        color: var(--v-muted);
    }

/* Fiche */

.vente .product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

@media (max-width: 991px) {
    .vente .product-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.vente .gallery {
    position: sticky;
    top: 16px;
}

.vente .gallery-main {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef3f9, #e3e9f1);
}

    .vente .gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #fff;
    }

    .vente .gallery-main .placeholder-code {
        font-size: 32px;
    }

.vente .gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

    .vente .gallery-thumbs button {
        width: 64px;
        height: 64px;
        padding: 0;
        overflow: hidden;
        border: 2px solid transparent;
        border-radius: 10px;
        background: #fff;
    }

        .vente .gallery-thumbs button.active {
            border-color: var(--v-accent);
        }

    .vente .gallery-thumbs img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.vente .product-title {
    margin: 2px 0 8px;
    font-size: 30px;
    font-weight: 700;
}

.vente .price-big {
    font-size: 28px;
    font-weight: 700;
    color: var(--v-ink);
    margin-bottom: 12px;
}

.vente .price-unit {
    margin-left: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--v-muted);
}

.vente .product-description {
    color: #44505c;
}

.vente .opt-group {
    margin: 16px 0;
}

.vente .opt-label {
    margin-bottom: 6px;
    color: #44505c;
}

.vente .opt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vente .chip {
    min-width: 48px;
    padding: 8px 14px;
    border: 1px solid #cfd7e1;
    border-radius: 10px;
    background: #fff;
    color: var(--v-ink);
    font-weight: 500;
}

    .vente .chip:hover {
        border-color: var(--v-accent);
    }

    .vente .chip.selected {
        border-color: var(--v-accent);
        background: #e2edfb;
        color: #1b5fb0;
        box-shadow: inset 0 0 0 1px var(--v-accent);
    }

.vente .set-box {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid var(--v-border);
    border-radius: 12px;
    background: var(--v-soft);
}

.vente .set-title {
    margin-bottom: 6px;
    font-weight: 600;
}

.vente .set-table {
    width: 100%;
}

    .vente .set-table td {
        padding: 4px 6px;
        vertical-align: top;
        border-top: 1px solid var(--v-border);
    }

    .vente .set-table tr:first-child td {
        border-top: 0;
    }

    .vente .set-table .qty {
        width: 48px;
        white-space: nowrap;
        color: var(--v-muted);
    }

.vente .buy-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-top: 20px;
}

.vente .stepper {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #cfd7e1;
    border-radius: 10px;
    background: #fff;
}

    .vente .stepper button {
        width: 40px;
        border: 0;
        background: transparent;
        font-size: 20px;
        color: var(--v-ink);
    }

        .vente .stepper button:hover {
            background: #eef3f9;
        }

    .vente .stepper input {
        width: 56px;
        border: 0;
        text-align: center;
        font-weight: 600;
        -moz-appearance: textfield;
    }

        .vente .stepper input::-webkit-outer-spin-button,
        .vente .stepper input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

.vente .stepper-sm button {
    width: 30px;
    font-size: 16px;
}

.vente .stepper-sm input {
    width: 44px;
}

.vente .features {
    margin-top: 40px;
    max-width: 720px;
}

    .vente .features h2 {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .vente .features table {
        width: 100%;
        border-collapse: collapse;
    }

    .vente .features th, .vente .features td {
        padding: 8px 12px;
        border-top: 1px solid var(--v-border);
    }

    .vente .features th {
        width: 40%;
        font-weight: 500;
        color: var(--v-muted);
        background: var(--v-soft);
    }

/* Panier */

.vente .cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 991px) {
    .vente .cart-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.vente .cart-lines {
    overflow: hidden;
    border: 1px solid var(--v-border);
    border-radius: 14px;
    background: #fff;
}

.vente .cart-line {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--v-border);
}

    .vente .cart-line:first-child {
        border-top: 0;
    }

.vente .cart-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef3f9, #e3e9f1);
    text-decoration: none;
}

    .vente .cart-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .vente .cart-photo .placeholder-code {
        font-size: 12px;
    }

.vente .choice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.vente .choice {
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef1f5;
    color: #44505c;
    font-size: 13px;
}

.vente .cart-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.vente .line-total {
    font-size: 18px;
    font-weight: 700;
}

.vente .pick-list {
    margin-top: 24px;
    padding: 16px;
    border: 1px solid var(--v-border);
    border-radius: 14px;
    background: #fff;
}

    .vente .pick-list h2 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 4px;
    }

.vente .summary {
    position: sticky;
    top: 16px;
    padding: 20px;
    border: 1px solid var(--v-border);
    border-radius: 14px;
    background: var(--v-soft);
}

.vente .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #44505c;
}

    .vente .summary-row.total {
        padding-top: 8px;
        border-top: 1px solid var(--v-border);
        font-size: 20px;
        font-weight: 700;
        color: var(--v-ink);
    }

@media (max-width: 575px) {
    .vente .cart-line {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .vente .cart-photo {
        width: 64px;
        height: 64px;
    }

    .vente .cart-price {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
}
