/* ==========================================================================
   Homepage Shortcodes — Custom Styles
   Organized by section. Only styles that Bootstrap 5 utilities cannot handle.
   ========================================================================== */

/* ==========================================================================
   0. Data-attribute background image/color (applied via JS below)
   ========================================================================== */

/* Cards/sections with data-bg-image get background applied via JS init */

/* ==========================================================================
   1. Shortcut Cards Section
   ========================================================================== */

.shortcut-cards-section {
    position: relative;
    z-index: 10;
}

.shortcut-cards-section.shortcut-cards-overlap {
    margin-top: -60px;
    padding-top: 0;
    padding-bottom: 30px;
}

.shortcut-cards-section .card {
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-height: 44px;
    min-width: 44px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.shortcut-cards-section .card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.shortcut-cards-section .shortcut-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shortcut-cards-section .shortcut-card-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.shortcut-cards-section .shortcut-card-icon span {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
}

.shortcut-cards-section .shortcut-card-content {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   2. Project Categories Section
   ========================================================================== */

.project-categories-section .card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-height: 44px;
    min-width: 44px;
}

.project-categories-section .card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.project-categories-section .card-img-top {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.project-categories-section .card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s ease;
    pointer-events: none;
}

.project-categories-section .card:hover .card-overlay {
    background: rgba(0, 0, 0, 0.05);
}

/* Card with background image mode */
.card-bg-image {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 180px;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.card-bg-image .card-bg-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.6) 40%, transparent 70%);
    min-height: 90px;
}

.card-bg-image:hover .card-bg-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 40%, transparent 70%);
}

.card-bg-image .card-bg-overlay h3,
.card-bg-image .card-bg-overlay h5,
.card-bg-image .card-bg-overlay p {
    color: #212529;
}

.card-bg-image .card-bg-overlay .badge {
    color: #fff;
}

.product-cards-small .card-bg-image {
    min-height: 120px;
}

.product-cards-small .card-bg-image .card-bg-overlay {
    min-height: 120px;
}

/* ==========================================================================
   3. Swatches CTA Section
   ========================================================================== */

.swatches-cta-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.swatches-cta-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.swatches-cta-section .container {
    position: relative;
    z-index: 2;
}

.swatches-cta-section h2,
.swatches-cta-section p {
    color: #fff;
}

.swatches-cta-section .btn {
    min-height: 44px;
    min-width: 44px;
}

/* Swatches CTA — Small variant */
.swatches-cta-small {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.swatches-cta-small h2 {
    font-size: 1.25rem;
}

.swatches-cta-small p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem !important;
}

.swatches-cta-small .py-5 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* ==========================================================================
   4. Ecommerce Products — Marketing Badge Overlay & Arrow Visibility
   ========================================================================== */

.product-card-wrapper {
    position: relative;
}

.product-card-wrapper .marketing-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    line-height: 1.2;
}

.tp-product-arrival-arrow .swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.tp-product-arrival-arrow button {
    min-height: 44px;
    min-width: 44px;
}

/* "Voir tout" inline link button — red text, no background */
.tp-product-see-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #e12454;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.tp-product-see-all-btn:hover {
    color: #b91c3f;
}

.tp-product-see-all-btn svg {
    flex-shrink: 0;
}

/* Site Features — Small variant */
.site-features-small .tp-feature-item {
    padding: 0.5rem 0;
}

.site-features-small .tp-feature-icon {
    width: 32px;
    height: 32px;
}

.site-features-small .tp-feature-icon span {
    font-size: 1.25rem;
}

.site-features-small .tp-feature-title {
    font-size: 0.8125rem;
    margin-bottom: 0.125rem;
}

.site-features-small .tp-feature-content p {
    font-size: 0.75rem;
    margin-bottom: 0;
}

/* Small card size variant — reduces product/blog/category image height */
.product-cards-small .tp-product-thumb {
    height: 100px;
    overflow: hidden;
}

.product-cards-small .tp-product-thumb img {
    width: 100% !important;
    height: 100px !important;
    object-fit: cover !important;
}

.product-cards-small .tp-product-thumb .m-img img,
.product-cards-small .m-img img,
.product-cards-small .tp-product-item .tp-product-thumb img {
    width: 100% !important;
    height: 100px !important;
    object-fit: cover !important;
}

.product-cards-small .card-img-top {
    height: 100px !important;
    object-fit: cover !important;
}

.product-cards-small .card img {
    height: 100px !important;
    object-fit: cover !important;
}

.blog-card-section.product-cards-small .card-img-top,
.blog-card-section.product-cards-small .position-relative img {
    height: 100px !important;
    object-fit: cover !important;
}

.project-categories-section.product-cards-small .card-img-top {
    height: 100px !important;
    object-fit: cover !important;
}

/* ==========================================================================
   5. Blog Posts — Redesigned Blog Card
   ========================================================================== */

.blog-card-section .card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-height: 44px;
    min-width: 44px;
}

.blog-card-section .card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.blog-card-section .card img,
.blog-card-section .position-relative img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card-section .blog-category-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.2;
}

.blog-card-section .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-card-section .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   6. Global — Accessibility & Touch Targets
   ========================================================================== */

.shortcut-cards-section a.card,
.project-categories-section a.card,
.blog-card-section a.card {
    min-height: 44px;
    min-width: 44px;
}

.shortcut-cards-section .btn,
.project-categories-section .btn,
.blog-card-section .btn,
.swatches-cta-section .btn {
    min-height: 44px;
    min-width: 44px;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

/* ==========================================================================
   7. Responsive Adaptations (Bootstrap 5 breakpoints)
   ========================================================================== */

/* xs: below 576px — single column stack */
@media (max-width: 575.98px) {
    .shortcut-cards-section.shortcut-cards-overlap {
        margin-top: -40px;
    }

    .shortcut-cards-section .card {
        min-height: 60px;
    }

    .project-categories-section .card-img-top {
        aspect-ratio: 16 / 9;
    }

    .blog-card-section .card-img-top {
        aspect-ratio: 16 / 9;
    }
}

/* sm: 576px–767px — 2-column for shortcut cards */
@media (min-width: 576px) and (max-width: 767.98px) {

    .shortcut-cards-section .shortcut-card-icon,
    .shortcut-cards-section .shortcut-card-icon img,
    .shortcut-cards-section .shortcut-card-icon span {
        width: 40px;
        height: 40px;
    }
}

/* md: 768px+ — restore full icon sizes */
@media (min-width: 768px) {

    .shortcut-cards-section .shortcut-card-icon,
    .shortcut-cards-section .shortcut-card-icon img,
    .shortcut-cards-section .shortcut-card-icon span {
        width: 48px;
        height: 48px;
    }
}

/* lg: 992px+ — project categories tighter grid */
@media (min-width: 992px) {
    .project-categories-section .card-img-top {
        aspect-ratio: 4 / 3;
    }
}

/* Ensure minimum 14px body text across all sections */
.shortcut-cards-section,
.project-categories-section,
.swatches-cta-section,
.blog-card-section {
    font-size: max(0.875rem, 14px);
}