/* Tailwind CSS is included via CDN in the HTML, but custom styles here */
/* Custom styles for the plugin, mimicking the original PHP page's look */
.etude-marketplace-container {
    font-family: 'Inter', sans-serif;
    background-color: #f4f7f6; /* Light background */
    color: #333;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 1200px; /* Constrain width */
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    color: #2c3e50;
}

.search-button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.search-button:hover {
    background-color: #2980b9;
}

.scroll-container {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}

.classes-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    padding: 10px 0;
    gap: 20px;
    flex-grow: 1;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.classes-container::-webkit-scrollbar {
    display: none;
}

.scroll-button {
    background-color: rgba(0, 0, 0, 0.1);
    color: #666;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.scroll-button:hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: #333;
}

.scroll-button.left {
    left: -15px; /* Adjust as needed */
}

.scroll-button.right {
    right: -15px; /* Adjust as needed */
}

.class-item {
    flex: 0 0 auto; /* Do not grow, do not shrink, base size auto */
    width: 300px; /* Fixed width for each card */
    min-width: 300px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #e0e0e0;
}

.class-item:hover {
    transform: translateY(-5px);
}

.class-box-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.class-box {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.class-box h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #34495e;
    margin-bottom: 10px;
}

.class-box p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.4;
}

.class-box p strong {
    color: #333;
}

.class-image {
    width: 100%;
    height: 180px; /* Fixed height for images */
    overflow: hidden;
    background-color: #f0f0f0; /* Placeholder background */
    display: flex;
    align-items: center;
    justify-content: center;
}

.class-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.purchase-btn {
    background-color: #2ecc71;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    width: 100%;
}

.purchase-btn:hover {
    background-color: #27ae60;
}

.show-dates-btn {
    background-color: #9b59b6;
    margin-top: 10px;
}

.show-dates-btn:hover {
    background-color: #8e44ad;
}

.dates-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
    display: none; /* Hidden by default */
}

.date-item {
    background-color: #ecf0f1;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    border: 1px solid #dcdcdc;
}

.date-item p {
    margin-bottom: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .class-item {
        width: 280px;
        min-width: 280px;
    }
    .scroll-button {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    .scroll-button.left {
        left: 0px;
    }
    .scroll-button.right {
        right: 0px;
    }
    .page-title {
        font-size: 1.5rem;
    }
}