/* Shops Page Styles - Using Beauty Industry Color Theme */

/* Typography */
.page-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.page-subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--medium-gray);
    font-weight: 400;
    line-height: 1.5;
}

/* Collapsible Filter Section */
.filter-toggle-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--warm-gray);
}

.filter-toggle-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--off-white) 0%, var(--light-cream) 100%);
    border-bottom: 1px solid var(--warm-gray);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    user-select: none;
}

.filter-toggle-header:hover {
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--secondary-color) 100%);
}

.filter-toggle-title {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    gap: 0.75rem;
}

.filter-toggle-title i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.filter-stats {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--medium-gray);
    font-weight: 500;
}

.filter-toggle-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: var(--transition);
}

.filter-toggle-icon.rotated {
    transform: rotate(180deg);
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-content.expanded {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Enhanced Filter System */
.filter-system-enhanced {
    padding: 2rem 1.5rem;
    background: var(--off-white);
}

.filter-row-primary,
.filter-row-secondary {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--warm-gray);
}

.filter-group {
    margin-bottom: 0;
}

.filter-label {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.filter-label i {
    color: var(--primary-color);
}

.filter-input,
.filter-select {
    border: 2px solid var(--warm-gray);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 165, 116, 0.15);
    outline: none;
}

.filter-dropdown {
    border: 2px solid var(--warm-gray);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    background: var(--white);
    color: var(--dark-gray);
    transition: var(--transition);
    text-align: left;
}

.filter-dropdown:hover,
.filter-dropdown:focus {
    border-color: var(--primary-color);
    background: var(--off-white);
}

.filter-dropdown-menu {
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0;
    min-width: 300px;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dropdown-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.dropdown-body {
    padding: 1.25rem;
}

/* Toast Notifications */
.location-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.location-toast {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 10px;
    overflow: hidden;
    transform: translateX(100%);
    transition: var(--transition);
    opacity: 0;
}

.location-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.location-toast.success {
    border-left-color: var(--success-color);
}

.location-toast.error {
    border-left-color: var(--danger-color);
}

.location-toast.warning {
    border-left-color: var(--warning-color);
}

.location-toast.info {
    border-left-color: var(--info-color);
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--warm-gray);
    background: var(--light-cream);
}

.toast-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
}

.toast-icon.loading {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.toast-icon.success {
    background: rgba(127, 176, 105, 0.1);
    color: var(--success-color);
}

.toast-icon.error {
    background: rgba(231, 111, 81, 0.1);
    color: var(--danger-color);
}

.toast-icon.warning {
    background: rgba(244, 162, 97, 0.1);
    color: var(--warning-color);
}

.toast-icon.info {
    background: var(--secondary-color);
    color: var(--info-color);
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--charcoal);
    flex: 1;
    font-family: var(--font-body);
}

.toast-close {
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toast-close:hover {
    background: var(--warm-gray);
}

.toast-body {
    padding: 12px 16px;
}

.toast-message {
    font-size: 13px;
    color: var(--dark-gray);
    line-height: 1.4;
    margin: 0;
    font-family: var(--font-body);
}

/* Shop Cards */
.shops-grid .col-md-6.col-xl-4 {
    flex: 0 0 auto;
    width: 33.333333%;
}

.shop-card {
    border: 2px solid var(--warm-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: var(--white);
    overflow: hidden;
    height: 100%;
}

.shop-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.shop-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.shop-card:hover .card-img-top {
    transform: scale(1.05);
}

.shop-card .card-body {
    padding: 1.5rem;
}

.shop-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.shop-card .card-text {
    font-family: var(--font-body);
    color: var(--medium-gray);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.shop-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.shop-rating .fas.fa-star,
.shop-rating .far.fa-star {
    color: var(--warning-color);
    font-size: 0.9rem;
}

.shop-rating span {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--medium-gray);
    font-weight: 500;
}

/* Shop Badges */
.shop-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.shop-badge.featured-star {
    background: linear-gradient(135deg, var(--warning-color), #f39c12);
    color: var(--white);
}

.shop-badge.premium {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.shop-badge.verified {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
    color: var(--white);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 2px solid var(--primary-color);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #a67c52);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--white);
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--medium-gray);
    color: var(--medium-gray);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.btn-outline-secondary:hover {
    background: var(--medium-gray);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Results Header */
.results-header {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--warm-gray);
}

.results-header h2 {
    font-family: var(--font-heading);
    color: var(--charcoal);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.results-header .text-muted {
    color: var(--medium-gray) !important;
    font-family: var(--font-body);
}

/* Loading Spinner */
.spinner-border {
    color: var(--primary-color);
}

#loadingSpinner {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--warm-gray);
}

#loadingSpinner .text-muted {
    color: var(--medium-gray) !important;
    font-family: var(--font-body);
}

/* Enhanced Detect Location Button */
#detectLocationBtn {
    position: relative;
    overflow: hidden;
}

#detectLocationBtn.loading {
    color: transparent;
}

#detectLocationBtn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--warm-gray);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Location Status Indicators */
.location-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--medium-gray);
    margin-left: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--medium-gray);
}

.status-dot.detecting {
    background: var(--warning-color);
    animation: pulse 1.5s infinite;
}

.status-dot.success {
    background: var(--success-color);
}

.status-dot.error {
    background: var(--danger-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* No Results State */
.text-center.py-5 {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 3rem 2rem !important;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--warm-gray);
}

.text-center.py-5 h4 {
    font-family: var(--font-heading);
    color: var(--charcoal);
    font-weight: 600;
    margin-bottom: 1rem;
}

.text-center.py-5 .text-muted {
    color: var(--medium-gray) !important;
    font-family: var(--font-body);
    margin-bottom: 1.5rem;
}

.text-center.py-5 .fa-search {
    color: var(--medium-gray);
}

/* Pagination */
.pagination-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--warm-gray);
}

/* Advanced Filters */
.advanced-filters-row {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

.form-check-label {
    font-family: var(--font-body);
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(212, 165, 116, 0.25);
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
}

.btn-search,
.btn-clear {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-search {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: var(--white);
}

.btn-search:hover {
    background: linear-gradient(135deg, var(--primary-dark), #a67c52);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--white);
}

.btn-clear {
    background: transparent;
    border-color: var(--medium-gray);
    color: var(--medium-gray);
}

.btn-clear:hover {
    background: var(--medium-gray);
    color: var(--white);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .shops-grid .col-md-6.col-xl-4 {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.25rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .filter-toggle-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .filter-system-enhanced {
        padding: 1.5rem 1rem;
    }
    
    .filter-row-primary,
    .filter-row-secondary {
        padding: 1rem;
    }
    
    .shops-grid .col-md-6.col-xl-4 {
        width: 100%;
    }
    
    .location-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .location-toast {
        margin-bottom: 8px;
    }
    
    .advanced-filters-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .btn-search,
    .btn-clear {
        width: 100%;
        justify-content: center;
    }

    .filter-content.expanded {
        max-height: 80vh;
    }
}

@media (max-width: 576px) {
    .filter-dropdown-menu {
        min-width: 280px;
    }
    
    .dropdown-body {
        padding: 1rem;
    }

    .filter-content.expanded {
        max-height: 85vh;
    }
}
