/* Compact Shop Cards CSS */
/* Optimized for better space utilization and preventing text cutoff */

/* Shop Card Container Improvements */
.shops-scroll-container {
    position: relative;
    overflow: hidden;
    padding: 0 10px;
}

.shops-horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.shops-horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.shops-horizontal-scroll::-webkit-scrollbar-track {
    background: rgba(212, 165, 116, 0.1);
    border-radius: 3px;
}

.shops-horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Compact Shop Card Wrapper */
.shop-card-wrapper {
    flex: 0 0 350px; /* Fixed width for consistency */
    max-width: 350px;
    min-height: 350px; /* Ensure consistent height */
}

/* Compact Shop Card */
/* Unified Luxury Card Styling */
.shop-card-wrapper .shop-card,
.shop-card {
    height: 100%;
    border: 1px solid #e6d3b0; /* subtle gold edge */
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.shop-card-wrapper .shop-card:hover,
.shop-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Increased Image Section */
.shop-card .card-img-top {
    height: 170px; /* Increased from 120px for better visual impact */
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.shop-card:hover .card-img-top { transform: none; }

/* Improved Badge Positioning */
.shop-card .shop-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f5e6c9;
    color: #3a2f21;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(212, 165, 116, 0.35);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.shop-card .shop-badge.accredited {
    background: rgba(34, 197, 94, 0.95);
    color: white;
    border-color: rgba(34, 197, 94, 0.3);
}

.shop-card .shop-badge.featured-star {
    background: rgba(251, 191, 36, 0.95);
    color: white;
    border-color: rgba(251, 191, 36, 0.3);
}

.shop-card .shop-badge.premium {
    background: rgba(147, 51, 234, 0.95);
    color: white;
    border-color: rgba(147, 51, 234, 0.3);
}

.shop-card .shop-badge.verified {
    background: rgba(59, 130, 246, 0.95);
    color: white;
    border-color: rgba(59, 130, 246, 0.3);
}

.shop-card .shop-badge .badge-count {
    font-size: 0.65rem; /* Smaller badge count */
    opacity: 0.9;
}

/* More Compact Card Body */
.shop-card .card-body {
    padding: 8px; /* Reduced from 12px */
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Shop Info Section */
.shop-card .shop-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px; /* Reduced from 6px */
}

/* More Compact Shop Title */
.shop-card .shop-title {
    font-size: 0.9rem; /* Reduced from 1rem */
    font-weight: 600;
    line-height: 1.2; /* Tighter line height */
    margin: 0 0 2px 0; /* Reduced margin */
    color: var(--charcoal);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.4rem; /* Slightly reduced height */
}

/* More Compact Location */
.shop-card .shop-location {
    font-size: 0.75rem; /* Reduced from 0.8rem */
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    gap: 3px; /* Reduced gap */
    margin-bottom: 3px; /* Reduced margin */
    line-height: 1.1; /* Tighter line height */
}

.shop-card .shop-location i {
    color: var(--primary-color);
    font-size: 0.7rem; /* Slightly smaller icon */
    flex-shrink: 0;
}

.shop-card .shop-location .btn-xs {
    display: none; /* Hide the inline view button to save space */
}

/* More Compact Rating */
.shop-card .shop-rating {
    display: flex;
    align-items: center;
    gap: 4px; /* Reduced gap */
    margin-bottom: 3px; /* Reduced margin */
}

.shop-card .shop-rating .stars {
    display: flex;
    gap: 1px;
}

.shop-card .shop-rating .stars i {
    font-size: 0.7rem; /* Slightly smaller stars */
    color: #fbbf24;
}

.shop-card .shop-rating .rating-text {
    font-size: 0.7rem; /* Reduced from 0.75rem */
    color: var(--medium-gray);
    white-space: nowrap;
}

/* More Compact Key Detail */
.shop-card .shop-key-detail {
    font-size: 0.7rem; /* Reduced from 0.75rem */
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    gap: 3px; /* Reduced gap */
    margin-bottom: 3px; /* Reduced margin */
    line-height: 1.1; /* Tighter line height */
}

.shop-card .shop-key-detail i {
    font-size: 0.65rem; /* Smaller icon */
    flex-shrink: 0;
}

/* More Compact Description */
.shop-card .shop-description {
    font-size: 0.75rem; /* Reduced from 0.8rem */
    line-height: 1.2; /* Tighter line height */
    color: var(--medium-gray);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-height: 2.4rem; /* Slightly reduced height */
}

/* More Compact Footer */
.shop-card .card-footer {
    padding: 6px 8px 8px 8px; /* Reduced padding */
    background: transparent;
    border: none;
    margin-top: auto;
}

.shop-card .card-footer .d-flex {
    gap: 4px; /* Reduced gap */
}

.shop-card .card-footer .btn-sm {
    padding: 4px 8px; /* Reduced padding */
    font-size: 0.7rem; /* Smaller font */
    font-weight: 500;
    border-radius: 5px; /* Smaller radius */
    transition: all 0.2s ease;
}

.shop-card .card-footer .btn-outline-secondary {
    border-color: var(--medium-gray);
    color: var(--medium-gray);
}

.shop-card .card-footer .btn-outline-secondary:hover {
    background: var(--medium-gray);
    color: white;
    transform: translateY(-1px);
}

.shop-card .card-footer .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.shop-card .card-footer .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .shop-card-wrapper {
        flex: 0 0 300px;
        max-width: 300px;
        min-height: 320px;
    }
    
    .shop-card .card-img-top {
        height: 140px; /* Increased from 100px */
    }
    
    .shop-card .shop-title {
        font-size: 0.85rem; /* Slightly smaller */
    }
    
    .shop-card .shop-location,
    .shop-card .shop-description {
        font-size: 0.7rem; /* Smaller text */
    }
    
    .shop-card .card-footer .btn-sm {
        padding: 4px 6px; /* More compact buttons */
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .shop-card-wrapper {
        flex: 0 0 250px;
        max-width: 250px;
        min-height: 300px;
    }
    
    .shop-card .card-img-top {
        height: 120px; /* Increased from 90px */
    }
    
    .shop-card .card-body {
        padding: 6px; /* More compact */
    }
    
    .shop-card .card-footer {
        padding: 4px 6px 6px 6px; /* More compact */
    }
}

/* Scroll Navigation Buttons */
.scroll-nav-container {
    position: relative;
    margin-bottom: 20px;
}

.scroll-nav-buttons {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.scroll-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scroll-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.scroll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading and Empty States */
#featuredShopsLoading,
#regularShopsLoading {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#featuredShopsEmpty,
#regularShopsEmpty {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Ensure proper spacing between sections */
#featuredShopsSection,
#regularShopsSection {
    padding: 3rem 0;
}

/* Fix for text overflow in all elements */
.shop-card * {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure buttons don't break layout */
.shop-card .btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
