/* Shop Directory Styles */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.directory-container {
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 20px;
}

.directory-container h1 {
    color: #2a7f40;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.directory-section {
    margin-bottom: 40px;
}

.directory-title {
    color: #2a7f40;
    margin-bottom: 20px;
    font-size: 1.8rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* Filter Panel */
.filter-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.filter-group h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #555;
}

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #2a7f40;
    box-shadow: 0 0 0 2px rgba(42, 127, 64, 0.1);
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #2a7f40;
    color: white;
    border-color: #2a7f40;
}

.btn-primary:hover {
    background-color: #1e6a34;
    border-color: #1a5f2e;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-box input[type="text"] {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: #2a7f40;
    box-shadow: 0 0 0 2px rgba(42, 127, 64, 0.1);
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.shop-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.shop-image {
    margin-bottom: 10px;
}

.shop-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid #2a7f40;
    padding: 5px;
    background: white;
}

.shop-info {
    overflow: hidden;
}

.shop-name {
    font-weight: bold;
    color: #2a7f40;
    margin: 10px 0 5px 0;
    font-size: 1.1rem;
}

.shop-location {
    color: #666;
    font-size: 0.9em;
    margin: 0 0 5px 0;
}

.shop-category {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    margin: 5px 0;
}

.view-shop-btn {
    display: inline-block;
    margin-top: 10px;
    color: #2a7f40;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.view-shop-btn:hover {
    color: #1e6a34;
    text-decoration: underline;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    margin-bottom: 10px;
}

.product-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #eee;
}

.product-info {
    overflow: hidden;
}

.product-name {
    font-weight: bold;
    color: #2a7f40;
    margin: 10px 0 5px 0;
    font-size: 1.1rem;
}

.price-tag {
    font-weight: bold;
    color: #28a745;
    margin: 5px 0;
    font-size: 1.2rem;
}

.shop-id {
    color: #666;
    font-size: 0.8em;
    margin: 5px 0;
}

.view-product-btn {
    display: inline-block;
    margin-top: 10px;
    color: #2a7f40;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.view-product-btn:hover {
    color: #1e6a34;
    text-decoration: underline;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 30px 0;
    grid-column: 1 / -1;
}

.no-results h3 {
    margin-top: 0;
    color: #333;
}

.no-results p {
    margin-bottom: 20px;
    color: #6c757d;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .directory-container {
        padding: 15px;
    }
    
    .shop-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .directory-container h1 {
        font-size: 1.8rem;
    }
    
    .filter-panel h3 {
        font-size: 1.3rem;
    }
    
    .shop-card,
    .product-card {
        padding: 10px;
    }
    
    .shop-logo,
    .product-img {
        width: 60px;
        height: 60px;
    }
}

/* Product Image Styles */
.product-image-container {
    margin-bottom: 10px;
    text-align: center;
}

.product-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #eee;
}

.product-img-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 4px;
    margin: 0 auto;
}

.product-img-placeholder i {
    font-size: 24px;
    color: #999;
}