* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f7;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.shop-directory {
    padding: 40px 0;
}

.shop-directory-header {
    margin-bottom: 30px;
    text-align: center;
}

.shop-directory-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.shop-directory-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Reduced from 240px */
    gap: 15px; /* Reduced from 20px */
    margin-top: 20px; /* Reduced from 25px */
}

.shop-card {
    background-color: #fff;
    border-radius: 8px; /* Reduced from 10px */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07); /* Reduced shadow */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Make logo container much smaller */
.shop-logo-container {
    padding: 10px; /* Reduced from 15px */
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 160px; /* Reduced from 220px */
    border-bottom: 1px solid #f0f0f0;
}

.shop-logo {
    object-fit: contain;
}

/* Further reduce text and padding in info section */
.shop-info {
    padding: 12px; /* Reduced from 15px */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.shop-name {
    font-size: 14px; /* Reduced from 16px */
    font-weight: 600;
    color: #333;
    margin-bottom: 4px; /* Reduced from 6px */
}

.shop-location {
    font-size: 12px; /* Reduced from 13px */
    color: #666;
    margin-bottom: 8px; /* Reduced from 10px */
    display: flex;
    align-items: flex-start;
    gap: 5px; /* Reduced from 6px */
}

.shop-location svg {
    min-width: 14px; /* Reduced from 16px */
    height: 14px; /* Added specific height */
    margin-top: 2px; /* Reduced from 3px */
}

.shop-location-text {
    line-height: 1.3; /* Reduced from 1.4 */
    word-wrap: break-word;
    flex: 1;
}

.shop-category {
    background-color: #e9f5ff;
    color: #0078d7;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 99px;
    display: inline-block;
    margin-top: auto;
}

/* Further reduce footer size */
.shop-card-footer {
    padding: 8px 12px; /* Reduced from 12px 15px */
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-shop-btn, .tnc-card-btn {
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    font-size: 11px;
}

.view-shop-btn {
    background-color: #007bff;
    color: white;
}

.view-shop-btn:hover {
    background-color: #0056b3;
}

.tnc-card-btn {
    background-color: #ff7300;
    color: white;
}

.tnc-card-btn:hover {
    background-color: #e06700;
}

.shop-contact {
    display: flex;
    align-items: center;
    margin-top: 4px;
    padding: 2px 6px;
    background-color: #e8f5e9;
    border-radius: 4px;
    font-size: 12px;
    color: #2e7d32;
    max-width: fit-content;
    font-weight: 500;
}

.shop-contact svg {
    margin-right: 4px;
    flex-shrink: 0;
    width: 13px;
    height: 13px;
}

.shop-contact-text {
    word-break: break-word;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); /* Reduced from 200px */
        gap: 12px; /* Reduced from 15px */
    }
    
    .shop-logo-container {
        height: 140px; /* Reduced from 120px */
    }
}

@media (max-width: 480px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr); /* Show 2 cards per row on mobile */
        gap: 10px;
    }
    
    .shop-logo-container {
        height: 140px;
    }
    
    .shop-info {
        padding: 8px;
    }
    
    .shop-card-footer {
        padding: 6px 8px;
    }
}