/* =========================================
   SECRETUNDIES STORE LISTING STYLES
   
   Modern SofiaGray-inspired design
   Features:
   - Hero section with title and description
   - Search and filter bar
   - Modern store cards with gallery
   - Responsive grid layout
   - Filter modal/panel
   - SecretUndies color scheme (#f35e84)
   
   @version 1.0.0
   ========================================= */

/* =========================================
   VARIABLES & BASE STYLES
   ========================================= */

:root {
    --su-primary: #f35e84;
    --su-primary-hover: #e04d72;
    --su-bg: #fff;
    --su-text: #333;
    --su-text-light: #666;
    --su-border: #eee;
    --su-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --su-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --su-radius: 12px;
    --su-radius-sm: 8px;
}

.su-store-listing-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    z-index: 0;
    position: relative;
}

/* =========================================
   HERO SECTION
   ========================================= */

.su-store-listing-hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 60px 20px;
}

.su-store-listing-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--su-text);
    margin-bottom: 16px;
    line-height: 1.2;
}

.su-store-listing-description {
    font-size: 16px;
    color: var(--su-text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =========================================
   SEARCH & FILTER BAR
   ========================================= */

.su-store-listing-controls {
    margin-bottom: 30px;
}

.su-search-sort-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.su-search-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.su-store-search-input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 1px solid var(--su-border);
    border-radius: var(--su-radius-sm);
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.su-store-search-input:focus {
    outline: none;
    border-color: var(--su-primary);
    box-shadow: 0 0 0 3px rgba(243, 94, 132, 0.1);
}

.su-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--su-primary);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}

.su-sort-wrapper {
    min-width: 200px;
}

.su-store-sort-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--su-border);
    border-radius: var(--su-radius-sm);
    font-size: 14px;
    background: var(--su-bg);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.su-store-sort-select:focus {
    outline: none;
    border-color: var(--su-primary);
}

.su-filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--su-primary);
    color: #fff;
    border: none;
    border-radius: var(--su-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.su-filter-toggle-btn:hover {
    background: var(--su-primary-hover);
    transform: translateY(-1px);
}

.su-filter-toggle-btn:active {
    transform: translateY(0);
}

.su-filter-count {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

/* =========================================
   STORE COUNT
   ========================================= */

.su-store-count {
    margin-bottom: 25px;
    font-size: 14px;
    color: var(--su-text-light);
}

/* =========================================
   STORE GRID
   ========================================= */

.su-store-listing-grid {
    width: 100%;
}

.su-store-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* =========================================
   STORE CARD
   ========================================= */

.su-store-card {
    background: var(--su-bg);
    border-radius: var(--su-radius);
    box-shadow: var(--su-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.su-store-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--su-shadow-hover);
}

/* Header Strip with Badges */
.su-store-card-header {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--su-primary) 0%, var(--su-primary-hover) 100%);
    flex-wrap: wrap;
}

.su-store-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Media Section */
.su-store-card-media {
    position: relative;
    display: flex;
    gap: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.su-store-main-image {
    flex: 1;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--su-radius-sm);
    background: #f0f0f0;
}

.su-store-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.su-store-card:hover .su-store-main-image img {
    transform: scale(1.05);
}

.su-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s ease;
    color: var(--su-primary);
}

.su-gallery-nav:hover {
    background: var(--su-primary);
    color: #fff;
}

.su-gallery-prev {
    left: 8px;
}

.su-gallery-next {
    right: 8px;
}

.su-store-gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 80px;
}

.su-gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--su-radius-sm);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.su-gallery-thumb:hover,
.su-gallery-thumb.active {
    border-color: var(--su-primary);
}

.su-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.su-gallery-more-badge {
    width: 80px;
    height: 80px;
    border-radius: var(--su-radius-sm);
    background: rgba(243, 94, 132, 0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.su-gallery-more-badge:hover {
    background: var(--su-primary-hover);
}

/* Store Info */
.su-store-card-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.su-store-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.su-store-name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.su-store-name a {
    color: var(--su-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.su-store-name a:hover {
    color: var(--su-primary);
}

.su-store-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.su-country-flag {
    font-size: 20px;
    line-height: 1;
}

.su-verified-badge {
    color: #1da1f2;
    font-size: 18px;
}

.su-store-bio {
    margin: 0;
    font-size: 14px;
    color: var(--su-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.su-store-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: auto;
}

.su-store-attr {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.su-attr-label {
    font-size: 11px;
    color: var(--su-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.su-attr-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--su-primary);
}

.su-rating-attr .su-attr-value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.su-rating-stars {
    color: #ffc107;
    font-size: 14px;
}

.su-rating-text {
    font-size: 12px;
    color: var(--su-text-light);
    font-weight: normal;
}

.su-online-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4caf50;
    margin-top: 8px;
}

.su-online-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Footer / CTA */
.su-store-card-footer {
    padding: 0 20px 20px;
}

.su-visit-store-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--su-primary);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: var(--su-radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.su-visit-store-btn:hover {
    background: var(--su-primary-hover);
    transform: translateY(-1px);
}

.su-visit-store-btn:active {
    transform: translateY(0);
}

/* =========================================
   PAGINATION
   ========================================= */

.su-store-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.su-pagination-list {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.su-pagination-list li {
    margin: 0;
}

.su-pagination-list a,
.su-pagination-list span {
    display: block;
    padding: 10px 16px;
    border: 1px solid var(--su-border);
    border-radius: var(--su-radius-sm);
    text-decoration: none;
    color: var(--su-text);
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.su-pagination-list a:hover {
    border-color: var(--su-primary);
    color: var(--su-primary);
    background: rgba(243, 94, 132, 0.05);
}

.su-pagination-list .current {
    background: var(--su-primary);
    color: #fff;
    border-color: var(--su-primary);
}

/* =========================================
   EMPTY STATE
   ========================================= */

.su-store-empty {
    text-align: center;
    padding: 60px 20px;
}

.su-empty-message {
    font-size: 18px;
    color: var(--su-text-light);
    margin: 0;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

@media (max-width: 991px) {
    .su-store-listing-hero {
        padding: 40px 20px;
    }
    
    .su-store-listing-title {
        font-size: 28px;
    }
    
    .su-store-cards-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .su-search-sort-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .su-search-wrapper,
    .su-sort-wrapper {
        width: 100%;
    }
    
    .su-filter-toggle-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .su-store-listing-page {
        padding: 20px 15px;
    }
    
    .su-store-listing-hero {
        padding: 30px 15px;
    }
    
    .su-store-listing-title {
        font-size: 24px;
    }
    
    .su-store-listing-description {
        font-size: 14px;
    }
    
    .su-store-cards-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .su-store-card-media {
        flex-direction: column;
    }
    
    .su-store-gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }
    
    .su-gallery-thumb,
    .su-gallery-more-badge {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .su-store-cards-wrapper {
        grid-template-columns: 1fr;
    }
    
    .su-store-listing-title {
        font-size: 22px;
    }
}

/* =========================================
   LOADING STATE
   ========================================= */

.su-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.su-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--su-border);
    border-top-color: var(--su-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* =========================================
   LOADING OVERLAY
   ========================================= */

.su-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--su-radius);
}

.su-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--su-border);
    border-top-color: var(--su-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =========================================
   BODY CLASS WHEN FILTER OPEN
   ========================================= */

body.su-filter-open {
    overflow: hidden;
}

/* =========================================
   FILTER PANEL
   ========================================= */

.su-filter-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.su-filter-panel[aria-hidden="false"] {
    display: block;
}

.su-filter-panel-content {
    max-width: 1200px;
    margin: 40px auto;
    background: var(--su-bg);
    border-radius: var(--su-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.su-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--su-border);
    position: sticky;
    top: 0;
    background: var(--su-bg);
    z-index: 10;
}

.su-filter-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--su-text);
}

.su-filter-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--su-text-light);
    cursor: pointer;
    padding: 5px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease, color 0.3s ease;
}

.su-filter-close:hover {
    background: var(--su-border);
    color: var(--su-text);
}

.su-filter-form {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.su-filter-section {
    margin-bottom: 30px;
}

.su-show-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.su-show-tab {
    padding: 10px 20px;
    border: 2px solid var(--su-primary);
    background: var(--su-bg);
    color: var(--su-primary);
    border-radius: var(--su-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.su-show-tab:hover {
    background: rgba(243, 94, 132, 0.05);
}

.su-show-tab.active {
    background: var(--su-primary);
    color: #fff;
}

.su-filter-group {
    margin-bottom: 25px;
}

.su-filter-group-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--su-text);
    margin-bottom: 12px;
}

.su-radio-group,
.su-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.su-radio-label,
.su-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--su-text);
    padding: 8px;
    border-radius: var(--su-radius-sm);
    transition: background 0.3s ease;
}

.su-radio-label:hover,
.su-checkbox-label:hover {
    background: rgba(243, 94, 132, 0.05);
}

.su-radio-label input[type="radio"],
.su-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--su-primary);
}

.su-filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--su-border);
    border-radius: var(--su-radius-sm);
    font-size: 14px;
    background: var(--su-bg);
    cursor: pointer;
}

.su-filter-select:focus {
    outline: none;
    border-color: var(--su-primary);
    box-shadow: 0 0 0 3px rgba(243, 94, 132, 0.1);
}

.su-filter-divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
    border-top: 1px solid var(--su-border);
}

.su-filter-divider span {
    position: relative;
    top: -10px;
    background: var(--su-bg);
    padding: 0 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--su-text-light);
}

.su-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.su-filter-column {
    min-width: 0;
}

.su-filter-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.su-filter-input-group span {
    font-size: 13px;
    color: var(--su-text-light);
}

.su-filter-input {
    flex: 1;
    min-width: 60px;
    padding: 8px 12px;
    border: 1px solid var(--su-border);
    border-radius: var(--su-radius-sm);
    font-size: 14px;
}

.su-filter-input:focus {
    outline: none;
    border-color: var(--su-primary);
    box-shadow: 0 0 0 3px rgba(243, 94, 132, 0.1);
}

.su-filter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-top: 1px solid var(--su-border);
    position: sticky;
    bottom: 0;
    background: var(--su-bg);
    z-index: 10;
}

.su-filter-applied-count {
    font-size: 13px;
    color: var(--su-text-light);
}

.su-filter-apply-btn {
    padding: 12px 24px;
    background: var(--su-primary);
    color: #fff;
    border: none;
    border-radius: var(--su-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.su-filter-apply-btn:hover {
    background: var(--su-primary-hover);
}

/* =========================================
   SCREEN READER TEXT
   ========================================= */

.su-screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}
