/**
 * Socios Rewards Styles
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    /* Colors */
    --socios-rewards-primary: #1c39c2;
    --socios-rewards-secondary: #FB543B;
    --socios-rewards-text: #212121;
    --socios-rewards-text-light: #4D4D4D;
    --socios-rewards-bg: #ffffff;
    --socios-rewards-bg-light: #f5f5f5;
    --socios-rewards-border: #E8EBF9;
    
    /* Spacing */
    --socios-rewards-gap: 8px;
    --socios-rewards-gap-lg: 16px;
    --socios-rewards-section-gap: 50px;
    
    /* Border Radius */
    --socios-rewards-radius: 16px;
    --socios-rewards-radius-sm: 8px;
    
    /* Transitions */
    --socios-rewards-transition: 0.2s ease;
    
    /* Typography */
    --socios-rewards-font-title: 'Sharp Grotesk', sans-serif;
    --socios-rewards-font-body: 'Manrope', sans-serif;
}

/* ==========================================================================
   Main Container
   ========================================================================== */

.socios-rewards p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Header Section
   ========================================================================== */

.socios-rewards__header {
    display: flex;
    flex-direction: column;
    gap: var(--socios-rewards-gap);
    margin-bottom: var(--socios-rewards-section-gap);
}

h1.socios-rewards__title {
    text-align: center;
}

.socios-rewards__title::after {
    content: '.';
    color: var(--socios-rewards-secondary);
}

.socios-rewards__description {
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    color: var(--socios-rewards-text-light);
}

.socios-rewards__text {
    font-family: var(--socios-rewards-font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--socios-rewards-text);
    margin: 0 0 var(--socios-rewards-gap-lg) 0;
}

.socios-rewards__text:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.socios-rewards__search {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--socios-rewards-gap);
    margin-bottom: var(--socios-rewards-section-gap);
}

.socios-rewards__search-wrapper {
    position: relative;
    background: var(--socios-rewards-bg);
    border-radius: var(--socios-rewards-radius-sm);
    padding: var(--socios-rewards-gap) var(--socios-rewards-gap-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--socios-rewards-gap);
    min-width: 400px;
    height: 56px;
}

.socios-rewards__search-icon {
    height: 14px;
    width: 14px;
    min-width: 14px;
    background-image: url(../images/search-icon.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

.socios-rewards__search-input {
    width: 100%;
    padding: 12px 48px 12px 48px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    border: none !important;
    background-color: var(--socios-rewards-bg);
    color: var(--socios-rewards-text);
    transition: border-color var(--socios-rewards-transition);
}

.socios-rewards__search-input:focus {
    outline: none;
}

.socios-rewards__search-input::placeholder {
    color: var(--socios-rewards-text-light);
}

.socios-rewards__search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 4px !important;
    cursor: pointer !important;
    color: var(--socios-rewards-text-light) !important;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color var(--socios-rewards-transition);
    background-color: transparent !important;
}

.socios-rewards__search-clear:hover {
    color: var(--socios-rewards-text) !important;
}

/* ==========================================================================
   Filter Tabs
   ========================================================================== */

.socios-rewards__filters {
    margin-bottom: 24px;
    overflow: hidden;
}

.socios-rewards__filters-scroll {
    display: flex;
    gap: var(--socios-rewards-gap);
    justify-content: center;
    overflow-x: auto;
    padding-bottom: var(--socios-rewards-gap);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.socios-rewards__filters-scroll::-webkit-scrollbar {
    display: none;
}

.socios-rewards__filter-btn {
    flex-shrink: 0;
    padding: 10px 20px !important;
    font-size: 14px !important;
    color: var(--socios-rewards-primary) !important;
    background-color: transparent !important;
    border: 2px solid var(--socios-rewards-primary) !important;
    transition: all var(--socios-rewards-transition);
    white-space: nowrap;
    line-height: 1em !important;
}

.socios-rewards__filter-btn:hover {
    background-color: rgb(0, 0, 0, 0.05) !important;
}

.socios-rewards__filter-btn--active,
.socios-rewards__filter-btn--active:hover {
    background-color: var(--socios-rewards-primary) !important;
    border-color: var(--socios-rewards-primary);
    color: #ffffff !important;
}

/* ==========================================================================
   Content Section
   ========================================================================== */

.socios-rewards__content {
    padding: 24px 0;
    min-height: 400px;
    position: relative;
}

/* ==========================================================================
   Rewards Grid
   ========================================================================== */

.socios-rewards__grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

@media (max-width: 1024px) {
    .socios-rewards__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .socios-rewards__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .socios-rewards__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Product Card
   ========================================================================== */

.socios-rewards__card {
    position: relative;
    border-radius: var(--socios-rewards-radius);
    background-color: var(--socios-rewards-bg);
    overflow: hidden;
    transition: transform var(--socios-rewards-transition);
    border: solid 1px var(--socios-rewards-border);
}

.socios-rewards__card:hover {
    transform: translateY(-4px);
}

.socios-rewards__card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.socios-rewards__card-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: var(--socios-rewards-bg-light);
    overflow: hidden;
    border-radius: 16px;
}

.socios-rewards__card-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(45deg,#000 25%,rgba(0,0,0,.7) 50%,#000 75%);
    mask-image: linear-gradient(45deg,#000 25%,rgba(0,0,0,.7) 50%,#000 75%);
    -webkit-mask-size: 800%;
    mask-size: 800%;
    -webkit-mask-position: 0;
    mask-position: 0;
}

.socios-rewards__card:hover .socios-rewards__card-image {
    transition: mask-position 1.5s ease,-webkit-mask-position 1.5s ease;
    -webkit-mask-position: 120%;
    mask-position: 120%;
    opacity: 1;
}

.socios-rewards__card-content {
    padding: 8px;
}

.socios-rewards__card-category {
    letter-spacing: 0.5px;
    background-color: var(--socios-rewards-bg);
    padding: var(--socios-rewards-gap) 12px;
    border-radius: 100px;
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-family: var(--socios-rewards-font-title);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1em;
    color: var(--socios-rewards-text);
}

.socios-rewards__card-partner {
    display: flex;
    align-items: center;
    gap: var(--socios-rewards-gap);
    margin-top: 4px;
    min-height: 27px;
}

.socios-rewards__card-partner-logo {
    width: 24px;
    height: 24px !important;
    object-fit: contain;
}

.socios-rewards__card-partner-name {
    font-family: var(--socios-rewards-font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--socios-rewards-text);
}

.socios-rewards__card-date {
    font-family: var(--socios-rewards-font-title);
    font-size: 12px;
    font-weight: 600;
    color: var(--socios-rewards-secondary);
    text-align: center;
    min-height: 12px;
    line-height: 1em;
    margin-top: var(--socios-rewards-gap);
}

.socios-rewards__card-title {
    font-size: 15px !important;
    line-height: 1em !important;
    letter-spacing: 0px !important;
    color: var(--socios-rewards-text);
    overflow: hidden;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    height: 54px;
    margin: 0;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.socios-rewards__loading,
.socios-rewards__loading-more {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 0;
}

.socios-rewards__loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(233, 233, 233, 0.5);
    z-index: 10;
}

.socios-rewards__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--socios-rewards-bg-light);
    border-top-color: var(--socios-rewards-primary);
    border-radius: 50%;
    animation: socios-spin 0.65s linear infinite;
}

@keyframes socios-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   No Results
   ========================================================================== */

.socios-rewards__no-results {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px var(--socios-rewards-gap-lg);
    text-align: center;
    width: 100%;
}

.socios-rewards__no-results-title {
    font-family: var(--socios-rewards-font-title);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--socios-rewards-text);
}

.socios-rewards__no-results-text {
    margin-bottom: 24px;
}

.socios-rewards__no-results-text p {
    font-family: var(--socios-rewards-font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--socios-rewards-text);
}

/* ==========================================================================
   Sentinel (for infinite scroll)
   ========================================================================== */

.socios-rewards__sentinel {
    height: 1px;
    width: 100%;
}

/* ==========================================================================
   Error State
   ========================================================================== */

.socios-rewards__error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1;
}

.socios-rewards__error p {
    font-size: 16px;
    color: var(--socios-rewards-text-light);
    margin-bottom: var(--socios-rewards-gap-lg);
}

.socios-rewards__retry-btn {
    padding: 12px 24px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    background-color: var(--socios-rewards-primary) !important;
    border: none !important;
    border-radius: var(--socios-rewards-radius-sm) !important;
    cursor: pointer !important;
    transition: background-color var(--socios-rewards-transition);
}

.socios-rewards__retry-btn:hover {
    background-color: #152d9e !important;
}

/* ==========================================================================
   Screen Reader Text (Accessibility)
   ========================================================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .socios-rewards__title {
        font-size: 24px;
    }

    .socios-rewards__text {
        font-size: 14px;
    }

    .socios-rewards__search-wrapper {
        min-width: auto;
        max-width: 100%;
        width: 100%;
    }

    .socios-rewards__no-results-title {
        font-size: 24px;
    }

    .socios-rewards__no-results-image img {
        width: 160px;
        height: 160px;
    }

    .socios-rewards__filters {
        width: calc(100% + 32px);
        margin-left: -16px;
    }

    .socios-rewards__filters-scroll {
        justify-content: flex-start;
        padding: 0 16px;
    }
}