/* Basic Styling for MomoToys Learning Portal */

body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.main-header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 30px;
}

.main-header img {
    display: block;
}

/* Content Area */
.content-area {
    padding-bottom: 40px;
}

/* Footer */
.main-footer {
    background-color: #e9ecef;
    color: #6c757d;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 0.9em;
}

/* Product Grid */
.product-grid-container h2 {
    text-align: center;
    margin-bottom: 10px;
}

.product-grid-container p {
    text-align: center;
    margin-bottom: 30px;
    color: #6c757d;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

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

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    width: 100%;
    height: 200px; /* Adjust as needed */
    object-fit: cover;
    display: block;
}

.product-card h3 {
    padding: 15px;
    margin: 0;
    font-size: 1.1em;
}

/* Product Detail */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-info h2 {
    margin-top: 0;
}

.product-detail-image {
    width: 100%;
    max-width: 400px; /* Limit image size */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.passcode-form-container {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.passcode-form-container h3 {
    margin-top: 0;
    text-align: center;
}

.passcode-form .form-group {
    margin-bottom: 15px;
}

.passcode-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.passcode-form input[type="text"],
.passcode-form input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.passcode-form button {
    width: 100%;
    padding: 12px;
    background-color: #28a745; /* Green */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.passcode-form button:hover {
    background-color: #218838;
}

.privacy-note {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 15px;
    text-align: center;
}

/* Tutorial Page */
.tutorial-container h2 {
    text-align: center;
    margin-bottom: 30px;
}

.tutorial-list {
    margin-bottom: 40px;
}

.tutorial-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.tutorial-item h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 10px;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.pdf-link {
    display: inline-block;
    padding: 10px 15px;
    background-color: #dc3545; /* Red for PDF */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.pdf-link:hover {
    background-color: #c82333;
}

/* Related Products */
.related-products {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.related-products h3 {
    text-align: center;
    margin-bottom: 20px;
}

.product-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.product-card-small {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.product-card-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.product-card-small a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image-small {
    width: 100%;
    height: 120px; /* Smaller height */
    object-fit: cover;
    display: block;
}

.product-card-small h4 {
    padding: 10px;
    margin: 0;
    font-size: 0.95em;
}


/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 10px 15px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}
.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Error Pages */
.error-container {
    text-align: center;
    padding: 50px 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .product-detail-container {
        grid-template-columns: 1fr;
    }
}

