/* =========================================
   Specialized Store Templates CSS
   ========================================= */

/* =========================================
   FOOD STORE - store_food.erb
   ========================================= */

/* Food Store Cover */
.store-food-cover {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
}

/* Food Categories Container */
.food-categories-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.food-categories-container::-webkit-scrollbar {
    height: 4px;
}

.food-categories-container::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.3);
    border-radius: 2px;
}

.food-category-bubble {
    display: inline-flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin-right: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.food-category-bubble.active {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-color: transparent;
}

.food-category-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    text-decoration: none;
    color: var(--text-color);
}

.food-category-bubble.active:hover {
    color: white;
}

/* Food Menu Item Card */
.food-menu-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.food-menu-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.food-image-container {
    height: 120px;
    overflow: hidden;
}

.food-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.food-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

.food-item-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.food-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    color: var(--text-color);
}

.food-item-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    flex-grow: 1;
}

.food-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.food-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FF6B35;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-quantity {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
}

.btn-quantity-minus {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-quantity-plus {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: none;
    color: white;
}

.btn-quantity:hover {
    transform: scale(1.1);
}

.quantity-display {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Floating Cart */
.floating-cart-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-floating-cart {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.btn-floating-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cartBadgePulse 2s ease infinite;
}

@keyframes cartBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.cart-total-preview {
    background: var(--card-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Cart Side Panel */
.cart-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--card-bg);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
}

.cart-side-panel.active {
    right: 0;
}

.cart-panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
}

.cart-panel-header .btn-close {
    filter: invert(1);
}

.cart-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-instructions {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.cart-item-price {
    font-weight: 700;
    color: #FF6B35;
}

.cart-item-quantity {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cart-panel-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
}


/* =========================================
   REAL ESTATE STORE - store_real_estate.erb
   ========================================= */

/* Real Estate Cover */
.store-real-estate-cover {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

/* Real Estate Type Container */
.real-estate-type-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.real-estate-type-bubble {
    display: inline-flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin-right: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.real-estate-type-bubble.active {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border-color: transparent;
}

.real-estate-type-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    text-decoration: none;
}

.btn-real-estate-search {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-real-estate-search:hover {
    background: linear-gradient(135deg, #1a252f 0%, #2980b9 100%);
    color: white;
}

/* Neighborhood Filters */
.neighborhood-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.btn-neighborhood-filter {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    transition: all 0.3s ease;
}

.btn-neighborhood-filter.active,
.btn-neighborhood-filter:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* View Toggle */
.view-toggle-container {
    margin-bottom: 1rem;
}

.btn-view-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
}

.btn-view-toggle.active {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border-color: transparent;
}

/* Property Card */
.property-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.property-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

.property-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.property-quick-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-card:hover .property-quick-actions {
    opacity: 1;
}

.property-details {
    padding: 1rem;
}

.property-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.property-feature {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.property-feature i {
    color: #3498db;
}

.property-price-container {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.property-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.property-operation {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* List View */
.property-list-item {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.property-list-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.property-list-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.property-list-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

/* Map View */
#propertiesMap {
    border: 1px solid var(--border-color);
}

.map-popup {
    min-width: 200px;
}

.map-popup img {
    border-radius: 4px;
}


/* =========================================
   CARS STORE - store_cars.erb
   ========================================= */

/* Cars Store Cover */
.store-cars-cover {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* Cars Type Container */
.cars-type-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.cars-type-bubble {
    display: inline-flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin-right: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.cars-type-bubble.active {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    border-color: transparent;
}

.cars-type-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 52, 96, 0.3);
    text-decoration: none;
}

.btn-cars-search {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-cars-search:hover {
    background: linear-gradient(135deg, #0d0d1a 0%, #0a264a 100%);
    color: white;
}

/* Brand Filters */
.brand-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.btn-brand-filter {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    transition: all 0.3s ease;
}

.btn-brand-filter.active,
.btn-brand-filter:hover {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    border-color: transparent;
}

/* Quick Filters */
.quick-filters-row .form-select {
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Results count and sort */
.results-count {
    font-size: 0.9rem;
}

.sort-options .form-select {
    border-radius: 20px;
}

/* Car Card */
.car-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.car-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.car-card:hover .car-image {
    transform: scale(1.05);
}

.car-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

.car-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.car-quick-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.car-card:hover .car-quick-actions {
    opacity: 1;
}

.car-details {
    padding: 1rem;
}

.car-brand-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.car-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.car-spec {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.car-spec i {
    color: #0f3460;
    font-size: 0.75rem;
}

.car-price-container {
    margin-bottom: 0.5rem;
}

.car-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f3460;
}

.financing-badge {
    font-size: 0.75rem;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

/* Compare Panel */
.compare-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.compare-panel.active {
    transform: translateY(0);
    display: block !important;
}

.compare-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.compare-panel-body {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.compare-item {
    flex: 0 0 120px;
    position: relative;
}

.compare-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

.compare-item .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.compare-panel-footer {
    margin-top: 0.75rem;
    text-align: right;
}

/* Hide item when filtered out */
.car-item.filtered-out {
    display: none !important;
}


/* =========================================
   RESPONSIVE STYLES
   ========================================= */

@media (max-width: 768px) {
    /* Food */
    .floating-cart-container {
        bottom: 80px;
        right: 15px;
    }
    
    .cart-side-panel {
        max-width: 100%;
    }
    
    /* Real Estate */
    .property-image-container {
        height: 180px;
    }
    
    .property-list-image {
        height: 150px;
    }
    
    .neighborhood-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    /* Cars */
    .car-image-container {
        height: 180px;
    }
    
    .brand-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .quick-filters-row .row {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .food-item-price,
    .cart-item-price {
        color: #FF9966;
    }
    
    .property-price {
        color: #5dade2;
    }
    
    .car-price {
        color: #5dade2;
    }
    
    .car-brand-tag {
        background: linear-gradient(135deg, #2a2a4e 0%, #1f4480 100%);
    }
}

/* Body class dark mode support */
body.dark-mode .food-item-price,
body.dark-mode .cart-item-price {
    color: #FF9966;
}

body.dark-mode .property-price {
    color: #5dade2;
}

body.dark-mode .car-price {
    color: #5dade2;
}

body.dark-mode .car-brand-tag {
    background: linear-gradient(135deg, #2a2a4e 0%, #1f4480 100%);
}
