/* =============================================================
   Tent Store Elementor Addon - Main Stylesheet
   Covers: Flagship Carousel + Use Case Grid widgets
   ============================================================= */

/* ─── Shared Utilities ─────────────────────────────────────── */

.tent-flagship-carousel-wrapper *,
.tent-use-case-grid-wrapper * {
    box-sizing: border-box;
}

/* ================================================================
   1. FLAGSHIP MODELS CAROUSEL WIDGET
   ================================================================ */

.tent-flagship-carousel-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    padding: 0 0 20px;
}

.tent-carousel-heading {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: #1a1a1a;
}

.tent-carousel-viewport {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.tent-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: none;
    transition: transform 0.5s ease;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.tent-carousel-slide {
    flex: 0 0 auto !important;
    width: var(--tent-slide-width, 31vw);
    max-width: none !important;
    min-width: 0;
    padding: 0;
    transition: width 0.5s ease;
}

.tent-carousel-slide.tent-slide-featured {
    width: var(--tent-featured-slide-width, 36vw);
}

.tent-slide-image {
    position: relative;
    width: 100%;
    height: 420px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transform: translateZ(0);
}

.tent-slide-featured .tent-slide-image {
    height: 480px;
}

.tent-slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.3s ease;
}

.tent-carousel-slide:hover .tent-slide-overlay {
    background: rgba(0, 0, 0, 0.55);
}

.tent-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px 20px;
    z-index: 2;
}

.tent-slide-desc {
    font-size: 0.85rem;
    color: #f0f0f0;
    margin: 0 0 8px;
    line-height: 1.5;
}

.tent-slide-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.tent-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tent-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e05a1e;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.tent-carousel-btn:hover {
    background: #c44a10;
    transform: translateY(-50%) scale(1.08);
}

.tent-carousel-prev { left: 6px; }
.tent-carousel-next { right: 6px; }

@media (max-width: 768px) {
    .tent-carousel-track { gap: 10px; }

    .tent-carousel-slide,
    .tent-carousel-slide.tent-slide-featured {
        width: var(--tent-mobile-slide-width, 85vw);
    }

    .tent-slide-image,
    .tent-slide-featured .tent-slide-image {
        height: 320px;
    }
}


/* ================================================================
   2. SHOP BY USE CASE GRID WIDGET
   ================================================================ */

.tent-use-case-grid-wrapper {
    width: 100%;
}

/* Optional heading above the grid */
.tent-grid-heading {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 24px;
    color: #1a1a1a;
}

/* CSS Grid — column count controlled by the --tent-columns custom property set inline */
.tent-use-case-grid {
    display: grid;
    grid-template-columns: repeat(var(--tent-columns, 2), 1fr);
    gap: 4px;
    width: 100%;
}

/* ── Single Tile ─────────────────────────────────────────── */

.tent-use-case-tile {
    position: relative;
    height: 420px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: block;         /* works as both <div> and <a> */
    text-decoration: none;
    cursor: pointer;
}

/* Dark overlay sits on top of the background image */
.tent-tile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}

/* Zoom effect: the background image scales on hover */
.tent-zoom-enabled .tent-use-case-tile {
    overflow: hidden;
}

.tent-zoom-enabled .tent-use-case-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 0;
}

/* We handle zoom via a JS-added class rather than a pseudo-element
   because background-image is on the element itself; see tent-addon.js */
.tent-zoom-enabled .tent-use-case-tile:hover {
    background-size: 110%;   /* simple zoom via background-size */
    transition: background-size 0.5s ease;
}

/* Content block inside the tile (label + optional subtitle) */
.tent-tile-content {
    position: absolute;
    z-index: 2;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Label Position Variants ─────────────────────────────── */

/* center: vertically and horizontally centered */
.tent-label-center .tent-tile-content {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    text-align: center;
}

/* bottom-left: pinned to bottom-left corner */
.tent-label-bottom-left .tent-tile-content {
    bottom: 0;
    left: 0;
}

/* bottom-center: pinned to bottom, text centered */
.tent-label-bottom-center .tent-tile-content {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Label: large bold uppercase text (matches the screenshot style) */
.tent-tile-label {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    line-height: 1.2;
}

/* Optional subtitle below the label */
.tent-tile-subtitle {
    font-size: 0.9rem;
    color: #dddddd;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
    /* Force single column on small screens */
    .tent-use-case-grid {
        grid-template-columns: 1fr !important;
    }

    .tent-use-case-tile {
        height: 260px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet: max 2 columns even if 3 or 4 set */
    .tent-use-case-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
