/* =========================================================
   SHOPTIME.TN — PAGE D'ACCUEIL
   ========================================================= */

.home-page {
    --home-blue: #1e40af;
    --home-blue-dark: #16358f;
    --home-orange: #f97316;
    --home-pink: #ec4899;
    --home-text: #172033;
    --home-muted: #64748b;
    --home-bg: #f8fafc;
    --home-border: #e2e8f0;
    overflow-x: clip;
}

.home-page .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* HEADER */

.home-header {
    position: relative;
    background: #fff;
    border-bottom: 1px solid var(--home-border);
}

.home-header .container {
    max-width: 1320px;
}

.home-header-main {
    display: grid;
    grid-template-columns: 155px minmax(250px, 1fr) auto;
    align-items: center;
    gap: 30px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.home-logo {
    display: block;
    width: 145px;
}

.home-logo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.home-search {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 50px;
    padding: 4px;
    border: 1px solid #dbe2ee;
    border-radius: 14px;
    background: #f8fafc;
    transition: border-color .2s, box-shadow .2s;
}

.home-search:focus-within {
    border-color: var(--home-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, .09);
}

.home-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--home-text);
}

.home-search input::placeholder {
    color: #94a3b8;
}

.home-search button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--home-blue), #2563eb);
    font-weight: 700;
    transition: transform .2s, background .2s;
}

.home-search button:hover {
    transform: translateY(-1px);
    background: var(--home-blue-dark);
}

.home-search button span:first-child {
    font-size: 23px;
    line-height: 1;
}

.home-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--home-orange), var(--home-pink));
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.home-header-cta:hover {
    color: #fff;
    filter: brightness(.97);
}

.home-category-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 0 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.home-category-nav a {
    flex: 0 0 auto;
    padding: 9px 13px;
    border-radius: 9px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: color .2s, background .2s;
}

.home-category-nav a:hover {
    color: var(--home-blue);
    background: #eff6ff;
}

.home-category-nav .home-nav-all {
    color: var(--home-blue);
    background: #eff6ff;
}

/* HERO : carrousel publicitaire */
/* HERO : carrousel aligné sur les autres sections */
.home-hero {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 15px 15px;
    background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
    box-sizing: border-box;
}

.home-hero-carousel {
    position: relative;
    width: calc(100% - 30px);
    max-width: 1290px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 14px;
    background: transparent;
    isolation: isolate;
}

.home-hero-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 5;
    min-height: 220px;
    max-height: 560px;
}
.home-section-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--home-orange);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.home-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility .7s ease;
}

.home-hero-slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
}

.home-hero-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.home-hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.home-hero-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    color: #1e40af;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 3px 12px rgba(15, 23, 42, .14);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s, transform .2s;
}

.home-hero-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.home-hero-arrow span {
    display: block;
    margin-top: -3px;
    font-size: 32px;
    line-height: 1;
}

.home-hero-arrow--prev { left: 18px; }
.home-hero-arrow--next { right: 18px; }

.home-hero-dots {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 14px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.home-hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .3);
    cursor: pointer;
    transition: width .2s, border-radius .2s, background .2s;
}

.home-hero-dot.is-active {
    width: 24px;
    border-radius: 8px;
    background: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .home-hero-slide,
    .home-hero-arrow,
    .home-hero-dot { transition: none; }
}

/* AVANTAGES */

.home-benefits {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--home-border);
    border-bottom: 1px solid var(--home-border);
    background: #fff;
}

.home-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-benefit {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 25px 22px;
}

.home-benefit + .home-benefit {
    border-left: 1px solid var(--home-border);
}

.home-benefit-icon {
    display: flex;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    color: var(--home-blue);
    background: #eff6ff;
    font-size: 22px;
    font-weight: 800;
}

.home-benefit:nth-child(2) .home-benefit-icon {
    color: #c2410c;
    background: #fff7ed;
}

.home-benefit:nth-child(3) .home-benefit-icon {
    color: #047857;
    background: #ecfdf5;
}

.home-benefit strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.home-benefit p {
    margin: 0;
    color: var(--home-muted);
    font-size: 12px;
    line-height: 1.6;
}

/* SECTIONS */

.home-section {
    padding: 72px 0;
}

.home-categories-section,
.home-new-section {
    background: #fff;
}

.home-promotions-section {
    background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
}

.home-featured-section {
    background: var(--home-bg);
}

.home-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.home-section-heading h2 {
    margin: 0;
    color: var(--home-text);
    font-size: clamp(27px, 3vw, 37px);
    font-weight: 850;
    letter-spacing: -.7px;
    line-height: 1.2;
}

.home-section-heading p {
    margin: 10px 0 0;
    color: var(--home-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* CATÉGORIES */

.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.home-category-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--home-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .035);
    transition: transform .22s, border-color .22s, box-shadow .22s;
}

.home-category-card:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.home-category-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
}

.home-category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform .3s;
}

.home-category-card:hover .home-category-image img {
    transform: scale(1.04);
}

.home-category-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    color: var(--home-blue);
    background: #eff6ff;
    font-size: 35px;
    font-weight: 850;
}

.home-category-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 3px 4px;
}

.home-category-info h3 {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--home-text);
    font-size: 15px;
    font-weight: 800;
}

.home-category-info > span {
    flex: 0 0 auto;
    color: var(--home-orange);
    font-size: 22px;
    transition: transform .2s;
}

.home-category-card:hover .home-category-info > span {
    transform: translateX(3px);
}

/* CARTES PRODUITS */

.home-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.home-products-grid .product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--home-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(15, 23, 42, .04);
    transition: transform .22s, box-shadow .22s, border-color .22s;
}

.home-products-grid .product-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 15px 30px rgba(15, 23, 42, .09);
}

.home-products-grid .product-card__image-link {
    display: block;
    overflow: hidden;
}

.home-products-grid .product-card__image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}

.home-products-grid .product-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform .3s;
}

.home-products-grid .product-card:hover .product-card__image {
    transform: scale(1.045);
}

.home-products-grid .product-card__badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    display: inline-block;
    max-width: calc(100% - 20px);
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
}

.home-products-grid .product-card__badge--discount {
    color: #fff;
    background: #dc2626;
}

.home-products-grid .product-card__badge--featured {
    top: 42px;
    color: var(--home-blue);
    background: #dbeafe;
}

.home-products-grid .product-card__badge--stock {
    top: auto;
    bottom: 10px;
    color: #fff;
    background: #475569;
}

.home-products-grid .product-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 15px;
}

.home-products-grid .product-card__title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    margin: 0 0 8px;
    color: var(--home-text);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-products-grid .product-card__title a:hover {
    color: var(--home-blue);
}

.home-products-grid .product-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 10px;
    color: var(--home-muted);
    font-size: 12px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-products-grid .product-card__pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 8px 0;
}

.home-products-grid .product-card__price {
    color: #ea580c;
    font-size: 19px;
    font-weight: 850;
}

.home-products-grid .product-card__old-price {
    color: #94a3b8;
    font-size: 12px;
    text-decoration: line-through;
}

.home-products-grid .product-card__availability {
    margin: 3px 0 12px;
    font-size: 11px;
    font-weight: 700;
}

.home-products-grid .product-card__availability--available {
    color: #059669;
}

.home-products-grid .product-card__availability--out {
    color: #dc2626;
}

.home-products-grid .product-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: auto;
    padding: 9px 12px;
    border-radius: 10px;
    color: #fff;
    background: var(--home-blue);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    transition: background .2s;
}

.home-products-grid .product-card__button:hover {
    color: #fff;
    background: var(--home-blue-dark);
}

.home-empty-message {
    padding: 25px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: var(--home-muted);
    text-align: center;
}

/* APPEL À L'ACTION */

.home-final-cta {
    padding: 60px 0;
    color: #fff;
    background:
        radial-gradient(ellipse at 95% 5%, rgba(236, 72, 153, .30), transparent 32%),
        linear-gradient(120deg, #1e40af 0%, #1d4ed8 58%, #4338ca 100%);
}

.home-final-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.home-final-cta .home-section-kicker {
    color: #fed7aa;
}

.home-final-cta h2 {
    max-width: 730px;
    margin: 0;
    color: #fff;
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 850;
    line-height: 1.25;
}

.home-final-cta p {
    margin: 12px 0 0;
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.7;
}

.home-btn-light {
    flex: 0 0 auto;
    color: var(--home-blue);
    background: #fff;
}

.home-btn-light:hover {
    color: var(--home-blue-dark);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
}

/* FOOTER */

.home-footer {
    padding-top: 45px;
}

.home-footer-logo {
    display: inline-block;
    width: 180px;
    max-width: 100%;
    padding: 5px;
    border-radius: 12px;
    background: #fff;
}

.home-footer-logo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.home-footer .footer-brand p {
    max-width: 350px;
    line-height: 1.8;
}

.home-footer .footer-bottom {
    flex-wrap: wrap;
}

/* TABLETTES */

@media (max-width: 1050px) {
    .home-header-main {
        grid-template-columns: 120px minmax(180px, 1fr);
        gap: 18px;
    }

    .home-logo {
        width: 115px;
    }

    .home-header-cta {
        display: none;
    }

    .home-categories-grid,
    .home-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-category-image {
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* MOBILES */

@media (max-width: 700px) {
    .home-hero-track {
        /* Correspond au ratio des images mobiles : 1080 x 1350 */
        aspect-ratio: 4 / 5;
        min-height: 0;
        max-height: none;
    }

    .home-hero-slide img {
        object-fit: cover;
        object-position: center;
    }

    .home-hero-arrow {
        width: 34px;
        height: 34px;
    }

    .home-hero-arrow--prev { left: 10px; }
    .home-hero-arrow--next { right: 10px; }
    .home-hero-arrow span { font-size: 27px; }
    .home-hero-dots { bottom: 10px; }

    .home-header .container {
        width: min(calc(100% - 24px), 1200px);
    }

    .home-header-main {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 12px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .home-logo {
        width: 88px;
    }

    .home-search {
        min-height: 43px;
    }

    .home-search input {
        padding: 8px;
        font-size: 12px;
    }

    .home-search button {
        min-height: 35px;
        padding: 6px 9px;
        gap: 3px;
        font-size: 11px;
    }

    .home-search button span:first-child {
        font-size: 19px;
    }

    .home-search button span:last-child {
        display: none;
    }

    .home-category-nav {
        gap: 3px;
        padding-bottom: 9px;
    }

    .home-category-nav a {
        padding: 8px 10px;
        font-size: 12px;
    }

    .home-btn {
        width: 100%;
        min-height: 49px;
    }

    .home-benefits-grid {
        grid-template-columns: 1fr;
    }

    .home-benefit {
        padding: 15px 5px;
    }

    .home-benefit + .home-benefit {
        border-top: 1px solid var(--home-border);
        border-left: 0;
    }

    .home-section {
        padding: 48px 0;
    }

    .home-section-heading {
        margin-bottom: 22px;
    }

    .home-section-heading h2 {
        font-size: 28px;
    }

    .home-section-heading p {
        font-size: 13px;
    }

    .home-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .home-category-card {
        padding: 8px;
        border-radius: 14px;
    }

    .home-category-image {
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: 9px;
    }

    .home-category-info {
        padding: 10px 2px 3px;
    }

    .home-category-info h3 {
        font-size: 13px;
    }

    .home-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .home-products-grid .product-card {
        border-radius: 13px;
    }

    .home-products-grid .product-card__content {
        padding: 10px;
    }

    .home-products-grid .product-card__title {
        min-height: 39px;
        font-size: 13px;
    }

    .home-products-grid .product-card__description {
        font-size: 11px;
    }

    .home-products-grid .product-card__price {
        font-size: 16px;
    }

    .home-products-grid .product-card__old-price {
        font-size: 11px;
    }

    .home-products-grid .product-card__button {
        min-height: 39px;
        font-size: 11px;
    }

    .home-products-grid .product-card__badge {
        top: 7px;
        left: 7px;
        padding: 4px 6px;
        font-size: 9px;
    }

    .home-products-grid .product-card__badge--featured {
        top: 33px;
    }

    .home-products-grid .product-card__badge--stock {
        top: auto;
        bottom: 7px;
    }

    .home-final-cta {
        padding: 42px 0;
    }

    .home-final-cta-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 22px;
    }

    .home-final-cta h2 {
        font-size: 28px;
    }

    .home-footer {
        padding-top: 35px;
    }

    .home-footer-logo {
        width: 150px;
    }
    .home-hero {
    padding: 0;

}

}

@media (max-width: 360px) {
    .home-header-main {
        grid-template-columns: 75px minmax(0, 1fr);
        gap: 8px;
    }

    .home-logo {
        width: 73px;
    }

    .home-search input {
        font-size: 11px;
    }

    .home-products-grid {
        gap: 8px;
    }

    .home-products-grid .product-card__content {
        padding: 8px;
    }

    .home-products-grid .product-card__price {
        font-size: 14px;
    }
}
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    padding: 13px 21px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    transition: transform .2s, box-shadow .2s, background .2s;
}
