/* --- Component Variables --- */
:root {
    --fs-active-color: #A259FF;
    --fs-primary-text: #2C2C2C;
    --fs-secondary-text: #757575;
    --fs-card-border: #D0D0D0;
    --fs-brand-green: #4CAF50;
    --fs-bounce-duration: 0.08s;
    --fs-bounce-scale: 0.97;
}

/* --- General Structure & Header --- */
.featured-section {
    width: 100%;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.featured-header .more-info-heading {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--fs-primary-text);
    flex-shrink: 0;
}

/* --- Events For You Toggle --- */
.fs-events-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    transition: transform var(--fs-bounce-duration) ease-out;
    will-change: transform;
    background-color: var(--fs-active-color);
    color: white;
}
.fs-events-toggle:active {
    transform: scale(var(--fs-bounce-scale));
}
.fs-events-toggle .fs-toggle-text {
    font-size: 13px;
    font-weight: 600;
}
.fs-events-toggle .fs-toggle-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}
.fs-events-toggle .fs-toggle-arrow.is-expanded {
    transform: rotate(180deg);
}

/* --- Events Content Container (Push Down Animation) --- */
.fs-events-content {
    background-color: #f9f9f9;
    border-radius: 16px;
    margin-top: 15px;
    overflow: hidden;
    max-height: 0;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 0;
    transition: max-height 0.4s ease-in-out, 
                padding-top 0.4s ease-in-out, 
                padding-bottom 0.4s ease-in-out,
                margin-bottom 0.4s ease-in-out;
}
.fs-events-content.is-expanded {
    max-height: 2000px;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

/* --- Location Bar --- */
.fs-location-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    padding: 0 20px;
}
.fs-location-display {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--fs-secondary-text);
}
.fs-change-location-btn {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--fs-active-color);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* --- Carousel --- */
.fs-carousel {
    margin-bottom: 25px;
}
.fs-carousel:last-child {
    margin-bottom: 0;
}

.fs-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 20px;
}
.fs-carousel-title {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--fs-secondary-text);
    margin: 0;
}
.fs-carousel-nav {
    display: flex;
    gap: 8px;
}
.fs-carousel-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--fs-card-border);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease, transform var(--fs-bounce-duration) ease-out;
}
.fs-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.fs-carousel-arrow:disabled:active {
    transform: none;
}
.fs-carousel-arrow img {
    width: 20px;
    height: 20px;
}

.fs-carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 5px 20px;
}
.fs-carousel-track::-webkit-scrollbar { display: none; }

/* ==========================================================================
   Card Styles (Shared and Specific)
   ========================================================================== */

/* --- Card Base --- */
.fs-card, .fs-carousel-card {
    display: block;
    border: 1px solid var(--fs-card-border);
    border-radius: 16px;
    background-color: #ffffff;
    padding: 15px;
    text-decoration: none;
}
.fs-card:active, .fs-carousel-card:active {
    transform: scale(var(--fs-bounce-scale));
}
.fs-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.fs-info-container {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* --- "Featured For You" Vertical List Cards --- */
.fs-card {
    margin-bottom: 15px;
}
.fs-card:last-child {
    margin-bottom: 0;
}

/* --- "Events For You" Horizontal Carousel Cards --- */
.fs-carousel-card {
    flex-shrink: 0;
    width: clamp(280px, 80vw, 420px);
}

/* --- Card Content Elements (Shared) --- */
.fs-social-proof-wrapper, .fs-creator-wrapper, .fs-event-date-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}
.fs-social-proof-icon, .fs-creator-icon, .fs-event-date-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.fs-social-proof-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--fs-active-color);
}
.fs-creator-name, .fs-event-date-wrapper span {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--fs-primary-text);
}

/* --- Text Truncation --- */
.fs-product-title, .fs-product-description, .fs-creator-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fs-product-title { -webkit-line-clamp: 2; }
.fs-product-description { -webkit-line-clamp: 3; }
.fs-creator-name { -webkit-line-clamp: 1; }

/* --- Text Styling & Spacing --- */
.fs-product-title {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--fs-primary-text);
    line-height: 1.4;
    margin-top: 4px;
}
.fs-product-description {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--fs-secondary-text);
    line-height: 1.5;
    margin-top: 8px;
}
.fs-product-price {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--fs-brand-green);
    margin-top: 8px;
}
.fs-creator-wrapper {
    margin-top: 6px;
}
.fs-event-date-wrapper {
    margin-top: 6px;
}

/* --- Thumbnail & Arrow Containers --- */
.fs-thumbnail-container,
.fs-arrow-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.fs-thumbnail-container {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background-color: #f0f0f0;
    overflow: hidden;
}
.fs-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fs-arrow-icon {
    width: 24px;
    height: 24px;
}

/* --- Loaders & Empty States --- */
.fs-loader {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}
.fs-card-list > .fs-loader {
    display: flex;
}
.fs-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--fs-active-color);
    animation: fs-spin 1s linear infinite;
}
@keyframes fs-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.fs-carousel-empty, .fs-empty-message {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--fs-secondary-text);
    padding: 20px;
    line-height: 1.6;
    text-align: center;
}
.fs-carousel-empty a {
    color: var(--fs-active-color);
    font-weight: 500;
    text-decoration: none;
}

.custom-dialog-overlay-web {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}
.custom-dialog-overlay-web.visible {
    opacity: 1;
    visibility: visible;
}
.custom-dialog-content-web {
    background-color: white;
    padding: 20px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.25s ease-out;
}
.custom-dialog-overlay-web.visible .custom-dialog-content-web {
    transform: scale(1);
}
.dialog-header-web {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}
.dialog-select {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--fs-card-border);
    border-radius: 10px;
    margin-bottom: 15px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232C2C2C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}
.dialog-buttons-web {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.dialog-button-web {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}
.dialog-button-web.secondary {
    background-color: #f0f0f0;
    color: var(--fs-primary-text);
}