/* ==========================================================================
   MAD-VF STORE - GLOBAL RESPONSIVE STYLESHEET
   ========================================================================== */

/* --- 1. BASE & RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: #f4f4f4;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* --- 2. LAYOUT CONTAINERS --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.text-center {
    text-align: center;
}

/* Spacing utilities */
.spacer-sm { margin-top: 20px; }
.spacer-md { margin-top: 40px; }
.spacer-lg { margin-top: 60px; }

/* --- 3. RESPONSIVE GRIDS (For Store.php and Library.php) --- */
.catalog-grid {
    display: grid;
    /* Creates fluid columns adapting to the screen. Min 300px, Max 1 fraction */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-items: center;
    align-items: start;
    padding: 20px 0;
}

.catalog-item {
    background-color: #111111;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    max-width: 360px; /* Limits maximum width to prevent image pixelation */
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.05);
}

.catalog-item img, 
.catalog-item video {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin-bottom: 15px;
}

/* --- 4. ITEM DETAILS LAYOUT (For storeitemdetails.php) --- */
.details-layout {
    display: flex;
    flex-direction: row;
    gap: 40px;
    background-color: #111111;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333333;
}

.details-media {
    flex: 1;
    min-width: 300px;
}

.details-media img, 
.details-media video,
.details-media iframe {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.details-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive Split: Stack elements vertically on smaller screens */
@media (max-width: 768px) {
    .details-layout {
        flex-direction: column;
        padding: 15px;
    }
}

/* --- 5. FORMS & INPUTS (For Login, Registration, Account) --- */
.form-container {
    background-color: #111111;
    max-width: 450px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333333;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    background-color: #222222;
    border: 1px solid #444444;
    color: #ffffff;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: #7f8c8d;
}

/* Elements using images as buttons (legacy support for .png buttons) */
.btn-image {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    display: inline-block;
}

.btn-image-sm { max-width: 200px; }
.btn-image-md { max-width: 300px; }
.btn-image-lg { max-width: 400px; }

/* --- 6. UTILITIES & MESSAGES --- */
.alert-box {
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #ff7675;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #55efc4;
}

/* --- 7. TEXT BUTTONS (Img replacement) --- */
.btn-text {
    display: inline-block;
    padding: 15px 30px;
    background-color: #e74c3c;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin: 10px;
}
.btn-text:hover { background-color: #c0392b; transform: translateY(-2px); }
.btn-text-secondary { background-color: #7f8c8d; }
.btn-text-secondary:hover { background-color: #95a5a6; }
.btn-block { display: block; width: 100%; margin: 10px 0; }

/* Pages Title */
.page-title {
    font-size: 32px; color: #ffffff; margin-bottom: 30px;
    text-transform: uppercase; font-weight: 600; letter-spacing: 1px;
}

/* Error Messages */
.alert-msg { font-size: 22px; color: #ff7675; margin: 20px 0; font-weight: bold; }
.success-msg { font-size: 22px; color: #55efc4; margin: 20px 0; font-weight: bold; }

/* --- 8. CUSTOM MODAL POPUP (T&C) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); display: none; 
    justify-content: center; align-items: center; z-index: 9999;
}
.modal-box {
    background: #111111; border: 1px solid #444; padding: 40px;
    border-radius: 12px; max-width: 500px; text-align: center;
}
.modal-text { color: #fff; font-size: 18px; margin-bottom: 30px; line-height: 1.5; }

