/* ============================================
   MAISON DOUCE - SHOP STYLES
   ============================================ */

@font-face {
    font-family: 'ThankYou';
    src: url('/static/Birds.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Shaded';
    src: url('/static/Shaded.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* HOME PAGE STYLES */
.hero {
    text-align: left;
    margin: 0;
    padding: 120px 80px 120px 20%;
    background-image: var(--hero-bg-image, url('/static/img/Fond1.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero h1,
.hero p,
.hero .cta-button {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 48px;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 64px;
    font-weight: 400;
    display: block;
    margin-bottom: 5px;
    font-family: 'Shaded', cursive;
}

.hero-title {
    font-size: 70px;
    font-weight: bold;
    display: block;
    letter-spacing: 2px;
    font-family: 'ThankYou', cursive;
    color: #FFD700;
}

.hero p {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 700px;
}

.cta-button {
    display: inline-block;
    padding: 10px 25px;
    background-color: #FFD700;
    color: #000000;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.5);
}

.cta-button:hover {
    background-color: #FFC700;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.7);
}

.section-title {
    font-size: 32px;
    color: #5a4a40;
    margin-bottom: 30px;
    margin-top: 20px;
    text-align: center;
    padding: 0 20px;
}

/* CATEGORY CARD STYLES */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.category-card {
    position: relative;
    aspect-ratio: 1 / 0.8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: scale(1.02);
}

.category-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.7);
    padding: 5px;
    border-radius: 8px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.category-name {
    font-size: 22px;
    font-weight: bold;
    color: #5a4a40;
    margin-bottom: 8px;
}

.category-content p {
    font-size: 14px;
    color: #7a6a60;
    margin: 0;
    line-height: 1.4;
}

/* PRODUCT GRID & CARDS */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.product-card-wrapper {
    display: contents;
}

.product-card {
    background: transparent;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
    min-width: 0;
    width: 100%;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* CAROUSEL STYLES */
.product-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    pointer-events: auto;
}

.product-unavailable {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 5;
}

.product-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: #f0f0f0;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-images {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.carousel-image.active {
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 3px;
    transition: background-color 0.3s;
    z-index: 90;
    pointer-events: auto;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn-prev {
    left: 5px;
}

.carousel-btn-next {
    right: 5px;
}

/* RTL Carousel buttons */
html[dir="rtl"] .carousel-btn-prev {
    left: auto;
    right: 5px;
}

html[dir="rtl"] .carousel-btn-next {
    left: 5px;
    right: auto;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 90;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
    pointer-events: auto;
}

.dot.active {
    background-color: rgba(255, 255, 255, 1);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #ddd;
    pointer-events: auto;
    overflow: hidden;
}

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

.product-info {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: normal;
    color: #333;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-price {
    font-size: 11px;
    font-weight: normal;
    color: #333;
    margin: 0;
    padding: 0;
}

.product-button {
    padding: 10px 20px;
    background-color: #8b7355;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
    font-weight: bold;
}

.product-button:hover {
    background-color: #a68f7a;
}

.product-button.disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    pointer-events: none;
}

/* CATEGORY PAGE STYLES */
.breadcrumb {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.breadcrumb a {
    color: #8b7355;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.category-header {
    margin-bottom: 40px;
    text-align: center;
}

.category-header h1 {
    font-size: 36px;
    color: #5a4a40;
    margin-bottom: 10px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.category-header p {
    font-size: 16px;
    color: #666;
}


/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .product-container {
        gap: 30px;
        padding: 20px;
    }
}

@media (max-width: 800px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0 10px;
    }

    .product-card-wrapper {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .product-card {
        width: 100% !important;
        min-width: 0 !important;
    }

    .product-image-wrapper {
        width: 100% !important;
    }

    .product-image,
    .product-carousel {
        width: 100% !important;
        aspect-ratio: 1 !important;
        height: auto !important;
    }

    .carousel-images {
        aspect-ratio: 1;
        width: 100%;
    }

    .carousel-image {
        width: 100% !important;
    }
}

@media (max-width: 600px) {
    .category-header {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .hero {
        padding: 80px 20px;
        margin-bottom: 0;
        text-align: left;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 42px;
    }

    .hero-title {
        font-size: 46px;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .cta-button {
        padding: 10px 25px;
        font-size: 16px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 30px;
        padding: 0 8px;
        width: 100%;
        max-width: 100%;
    }

    .product-card {
        min-width: 0;
        width: 100% !important;
        overflow: hidden;
    }

    .product-card-wrapper {
        display: block;
        width: 100% !important;
        min-width: 0;
    }

    .product-image-wrapper {
        width: 100% !important;
        min-width: 0;
    }

    .product-image,
    .product-carousel {
        aspect-ratio: 1;
        height: auto;
        width: 100% !important;
    }

    .carousel-image {
        width: 100% !important;
        object-fit: cover;
    }

    .carousel-btn {
        padding: 4px 6px;
        font-size: 12px;
    }

    .carousel-btn-prev {
        left: 2px;
    }

    .carousel-btn-next {
        right: 2px;
    }

    html[dir="rtl"] .carousel-btn-prev {
        left: auto;
        right: 2px;
    }

    html[dir="rtl"] .carousel-btn-next {
        left: 2px;
        right: auto;
    }

    .carousel-dots {
        bottom: 5px;
        gap: 5px;
    }

    .dot {
        width: 6px;
        height: 6px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        margin-bottom: 30px;
        padding: 0 5px;
    }

    .category-content {
        padding: 15px 10px;
        max-width: 90%;
    }

    .category-name {
        font-size: 10px;
    }

    .category-content p {
        display: none;
    }

    .product-image {
        aspect-ratio: 1;
    }

    .product-carousel {
        aspect-ratio: 1;
    }

    .product-image-container {
        height: 300px;
    }

    .product-details h1 {
        font-size: 24px;
    }

    .product-price {
        font-size: 1rem;
    }

    .contact-buttons-primary {
        grid-template-columns: 1fr;
    }

    .order-section {
        padding: 1.5rem;
    }

    .order-header h2 {
        font-size: 1.375rem;
    }

    .contact-button-secondary {
        padding: 0.625rem 0.9375rem;
        font-size: 0.8125rem;
    }

    .trust-badges {
        grid-template-columns: 1fr 1fr;
        gap: 0.625rem;
    }

    .trust-badges .badge {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    .product-description-section {
        padding: 1.25rem;
    }

    /* Product detail carousel on mobile */
    .product-left-column .product-carousel {
        height: auto;
        max-height: 60vh;
    }
}

/* PRODUCT DETAIL CAROUSEL STYLES */
.product-left-column .product-carousel {
    height: auto;
    background-color: #f9f7f5;
    border-radius: 1.5rem;
    max-height: 100%;
}

.product-left-column .carousel-images {
    aspect-ratio: auto;
}

.product-left-column .carousel-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f7f5;
    width: 100%;
    height: auto;
    min-height: 300px;
}

.product-left-column .carousel-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 70vh;
}

.product-left-column .carousel-btn {
    padding: 0.75rem 0.9rem;
    font-size: 1.25rem;
}

.product-left-column .carousel-dots {
    bottom: 1rem;
}

.product-left-column .dot {
    width: 0.625rem;
    height: 0.625rem;
}


.info-image {
    max-width: 100%;
    display: block; /* Assure que l'image est un bloc */
    margin: 0 auto; /* Centre l'image horizontalement */
    text-align: center; /* Centre le contenu textuel si nécessaire */
}

/* ============================================
   PAGINATION STYLES
   ============================================ */

.pagination-info-container {
    text-align: center;
    margin: 1rem 0;
}

.pagination-info-container span {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-top {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.pagination-bottom {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.pagination-btn {
    padding: 0.6rem 1rem;
    border: 2px solid #e0d7d0;
    background-color: white;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #c4a57b;
    color: white;
    border-color: #c4a57b;
    transform: translateY(-2px);
}

.pagination-btn.active,
.pagination-btn:disabled {
    background-color: #c4a57b;
    color: white;
    border-color: #c4a57b;
    cursor: default;
}

.pagination-btn:disabled {
    opacity: 0.6;
}

.pagination-ellipsis {
    padding: 0.6rem 0.5rem;
    color: #999;
    font-weight: 500;
}

/* Loading Spinner */
.loading-spinner {
    display: none; /* Pas utilisé en mode client-side */
}

/* Error Message */
.error-message {
    display: none; /* Pas utilisé en mode client-side */
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination-info-container {
        margin: 0.5rem 0;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        min-width: 35px;
    }
    
    .pagination-buttons {
        gap: 0.3rem;
    }
}
