/**
 * Entrepreneur Simulator - Marketplace Styles
 * Styles for marketplace and business pages
 */

/* Marketplace Container */
.es-marketplace-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Marketplace Header */
.es-marketplace-header {
    margin-bottom: 40px;
}

.es-marketplace-header h1 {
    margin: 0 0 20px 0;
    font-size: 42px;
    color: #2c3e50;
    font-weight: 700;
}

.es-marketplace-search {
    display: flex;
    gap: 10px;
    max-width: 600px;
}

.es-marketplace-search input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.es-marketplace-search input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Featured Section */
.es-featured-section {
    margin-bottom: 50px;
}

.es-featured-section h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.es-featured-section h2:before {
    content: "⭐";
    font-size: 32px;
}

/* Sections */
.es-businesses-section,
.es-products-section {
    margin-bottom: 50px;
}

.es-businesses-section h2,
.es-products-section h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

/* Business Card Layouts */
.es-businesses-grid,
.es-businesses-list {
    display: grid;
    gap: 25px;
}

.es-businesses-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.es-businesses-list {
    grid-template-columns: 1fr;
}

/* Business Card */
.es-business-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.es-business-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.es-business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.es-business-card:hover:before {
    transform: scaleX(1);
}

.es-business-card img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 15px;
}

.es-business-card h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    color: #2c3e50;
}

.es-business-card .es-business-type {
    color: #3498db;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.es-business-card .es-business-tagline {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.es-business-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #95a5a6;
}

.es-business-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.es-business-card .es-btn {
    width: 100%;
    margin-top: 10px;
}

/* Products Grid */
.es-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Product Card */
.es-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.es-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.es-product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f8f9fa;
}

.es-product-card h4 {
    margin: 15px 20px 5px 20px;
    font-size: 18px;
    color: #2c3e50;
}

.es-product-card .es-product-type {
    margin: 0 20px 10px 20px;
    color: #3498db;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.es-product-card .es-product-description {
    margin: 0 20px 15px 20px;
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}

.es-product-card .es-product-price {
    margin: 0 20px 10px 20px;
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

.es-product-card .es-product-stock {
    margin: 0 20px 15px 20px;
    font-size: 12px;
    color: #95a5a6;
}

.es-product-card .es-btn {
    margin: 0 20px 20px 20px;
    width: calc(100% - 40px);
}

/* Business Page */
.es-business-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.es-business-page .es-business-header {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 40px;
}

.es-business-page .es-business-logo {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.es-business-page .es-business-header h1 {
    margin: 0 0 10px 0;
    font-size: 42px;
}

.es-business-page .es-business-tagline {
    font-size: 18px;
    margin: 0;
    opacity: 0.95;
}

/* Business Info */
.es-business-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.es-business-description {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    line-height: 1.8;
    color: #34495e;
}

.es-business-stats {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.es-business-stats .es-stat {
    margin-bottom: 25px;
}

.es-business-stats .es-stat:last-child {
    margin-bottom: 0;
}

.es-business-stats .es-stat-label {
    display: block;
    font-size: 13px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.es-business-stats .es-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

/* Business Products Section */
.es-business-products {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.es-business-products h2 {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 28px;
    color: #2c3e50;
}

/* Filters */
.es-marketplace-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.es-filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.es-filter-item {
    display: flex;
    flex-direction: column;
}

.es-filter-item label {
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.es-filter-item select,
.es-filter-item input {
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
}

/* Product List View (Alternative) */
.es-product-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.es-product-list .es-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Purchase Modal */
.es-purchase-modal .es-modal-content {
    max-width: 500px;
}

.es-purchase-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.es-purchase-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.es-purchase-detail-row:last-child {
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 2px solid #dee2e6;
    font-weight: 700;
    font-size: 18px;
}

.es-quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.es-quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.es-quantity-btn:hover {
    background: #3498db;
    color: white;
}

.es-quantity-display {
    font-size: 24px;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
}

/* No Results */
.es-no-results {
    text-align: center;
    padding: 80px 20px;
    color: #95a5a6;
}

.es-no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.es-no-results p {
    font-size: 18px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .es-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .es-business-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .es-marketplace-header h1 {
        font-size: 32px;
    }

    .es-marketplace-search {
        flex-direction: column;
    }

    .es-businesses-grid {
        grid-template-columns: 1fr;
    }

    .es-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .es-business-page .es-business-header {
        padding: 40px 20px;
    }

    .es-business-page .es-business-header h1 {
        font-size: 32px;
    }

    .es-business-page .es-business-logo {
        width: 100px;
        height: 100px;
    }

    .es-filter-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .es-products-grid {
        grid-template-columns: 1fr;
    }
}
