/* MTG Card Rental Store - Styles */
/* VERSION 2: Mobile improvements - wrapping filters, 2-col cards, better banner alignment */
/* Desktop unchanged from v1 */

/* CSS Variables */
:root {
    --primary-color: #5c4d7d;
    --primary-dark: #483d64;
    --secondary-color: #c9a227;
    --background-color: #1a1a2e;
    --surface-color: #25253d;
    --surface-light: #2d2d4a;
    --text-color: #e8e8e8;
    --text-muted: #a0a0a0;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #e0b82d;
}

/* Header */
.header {
    background-color: var(--surface-color);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.logo-icon {
    font-size: 2rem;
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 500px;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--surface-light);
    border-radius: var(--border-radius);
    background-color: var(--surface-light);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--error-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#user-display {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--surface-light);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--surface-color);
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mission Banner */
.mission-banner {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--secondary-color);
    padding: 0.6rem 2rem;
    cursor: pointer;
    user-select: none;
}

.banner-teaser {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.banner-diamond {
    color: var(--secondary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

.banner-teaser strong {
    color: var(--secondary-color);
}

.banner-toggle {
    margin-left: auto;
    color: var(--secondary-color);
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.mission-banner.expanded .banner-toggle {
    transform: rotate(180deg) translateY(-2px);
}

.banner-details {
    max-width: 1400px;
    margin: 0 auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding-top: 0;
}

.mission-banner.expanded .banner-details {
    max-height: 500px;
    padding-top: 0.75rem;
}

.banner-details p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.banner-details strong {
    color: var(--text-color);
}

.banner-ps {
    font-style: italic;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* More Filters Button */
.more-filters-btn {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* Mobile-only filters in sidebar - hidden on desktop */
.mobile-only-filter {
    display: none;
}

/* Advanced Filters Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 200;
}

.sidebar-overlay.open {
    display: block;
}

.sidebar-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100%;
    background-color: var(--surface-color);
    z-index: 201;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.4);
    transition: right 0.3s ease;
}

.sidebar-panel.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--surface-light);
}

.sidebar-header h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.sidebar-close:hover {
    color: var(--text-color);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.sidebar-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--surface-light);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h4 {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.sidebar-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    margin-top: 0.75rem;
}

.sidebar-label:first-of-type {
    margin-top: 0;
}

.sidebar-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background-color: var(--surface-light);
    border: 2px solid var(--surface-light);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sidebar-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.sidebar-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background-color: var(--surface-light);
    border: 2px solid var(--surface-light);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.sidebar-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sidebar-input::placeholder {
    color: var(--text-muted);
}

.sidebar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sidebar-toggle-btn {
    padding: 0.45rem 0.75rem;
    background-color: var(--surface-light);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-toggle-btn:hover {
    background-color: var(--background-color);
}

.sidebar-toggle-btn.active {
    border-color: var(--secondary-color);
    background-color: var(--background-color);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--surface-light);
    display: flex;
    gap: 0.75rem;
}

.sidebar-apply {
    flex: 1;
}

.sidebar-clear {
    flex: 1;
}

@media (max-width: 768px) {
    .sidebar-panel {
        width: 100%;
        right: -100%;
    }
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Filters */
.filters {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.filter-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.filter-buttons {
    display: flex;
    gap: 0.25rem;
}

.color-filter,
.type-filter {
    padding: 0.5rem 1rem;
    background-color: var(--surface-light);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.color-filter:hover,
.type-filter:hover {
    background-color: var(--surface-color);
}

.color-filter.active,
.type-filter.active {
    border-color: var(--secondary-color);
    background-color: var(--surface-color);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card-item {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.card-image-container {
    aspect-ratio: 223/310;
    overflow: hidden;
    background-color: var(--surface-light);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card-item:hover .card-image {
    transform: scale(1.05);
}

.card-info {
    padding: 1rem;
}

.card-name {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-set {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.card-availability {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.available-count {
    color: var(--success-color);
}

.in-use-count {
    color: var(--warning-color);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.duration-select {
    flex: 1;
    padding: 0.5rem;
    background-color: var(--surface-light);
    border: 1px solid var(--surface-light);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
}

.duration-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.add-to-cart-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--surface-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Load More */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

#load-more {
    display: none;
}

/* Cart Page */
.cart-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.cart-item-image {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.cart-item-set {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cart-item-duration,
.cart-item-return {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--surface-light);
    border-radius: var(--border-radius);
    padding: 0.25rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.qty-btn:hover {
    background-color: var(--primary-dark);
}

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.remove-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Cart Summary */
.cart-summary {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--surface-light);
}

.cart-summary p {
    margin-bottom: 1rem;
}

.btn-checkout {
    width: 100%;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 3rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
}

.empty-cart h2 {
    margin-bottom: 0.5rem;
}

.empty-cart p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Checkout Success */
.checkout-success {
    text-align: center;
    padding: 3rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.checkout-success h2 {
    margin-bottom: 0.5rem;
}

.checkout-success p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Login Page */
/* About Page */
.about-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.about-container h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.about-container p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.login-container {
    max-width: 400px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--surface-light);
    border-radius: var(--border-radius);
    background-color: var(--surface-light);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-btn {
    width: 100%;
    margin-top: 1rem;
}

.login-error {
    display: none;
    color: var(--error-color);
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: rgba(244, 67, 54, 0.1);
    border-radius: var(--border-radius);
}

.login-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Parody Disclaimer Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background-color: var(--surface-color);
    border: 2px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    max-width: 650px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.modal-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.modal-warning {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 3px solid var(--warning-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.modal-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    opacity: 0;
    transition: var(--transition);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    background-color: var(--success-color);
}

.notification-error {
    background-color: var(--error-color);
}

.notification-info {
    background-color: var(--primary-color);
}

/* No Results */
.no-results,
.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* ============================================
   MOBILE STYLES - V2 IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    /* --- HEADER: 3 distinct rows with dividers --- */
    .header {
        padding: 0;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 0;
        padding: 0;
    }

    /* Row 1: Logo/Title - centered, ON TOP */
    .logo {
        order: 1;
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
        border-bottom: 1px solid var(--surface-light);
        font-size: 1.2rem;
        gap: 0.5rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    /* Row 2: Timer, Cart, Login */
    .header-actions {
        order: 2;
        width: 100%;
        justify-content: flex-end;
        padding: 0.5rem 1rem;
        border-bottom: 1px solid var(--surface-light);
        gap: 0.5rem;
    }

    /* Row 3: Search bar - no scroll, full width */
    .search-container {
        order: 3;
        width: 100%;
        max-width: 100%;
        padding: 0.6rem 1rem;
        gap: 0.5rem;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
    }

    #search-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* Hide user display on mobile to save space */
    #user-display {
        display: none;
    }

    /* --- MISSION BANNER: cleaner alignment --- */
    .mission-banner {
        padding: 0.5rem 1rem;
    }

    .banner-teaser {
        font-size: 0.8rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .banner-teaser > span:not(.banner-diamond):not(.banner-toggle) {
        flex: 1 1 calc(100% - 2rem);
        order: 2;
    }

    .banner-diamond {
        order: 1;
    }

    .banner-toggle {
        order: 3;
        margin-left: 0;
        margin-top: 0.25rem;
        width: 100%;
        text-align: right;
    }

    .mission-banner.expanded .banner-details {
        max-height: 600px;
    }

    .banner-details p {
        font-size: 0.8rem;
    }

    /* --- FILTERS: Hidden by default, only "More Filters" shows --- */
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    /* Hide color and type filter groups on mobile - they're in sidebar instead */
    .filter-group {
        display: none;
    }

    /* Show mobile-only filters in sidebar */
    .mobile-only-filter {
        display: block;
    }

    /* More Filters button — always visible, prominent */
    .more-filters-btn {
        width: 100%;
        margin-left: 0;
        order: 1;
    }

    /* --- CARD GRID: horizontal list on mobile --- */
    .main-content {
        padding: 1rem 0.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Card item: horizontal layout - image left, info right */
    .card-item {
        display: flex;
        flex-direction: row;
    }

    .card-image-container {
        width: 45%;
        min-width: 140px;
        max-width: 180px;
        aspect-ratio: 223/310;
    }

    .card-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 0.6rem;
    }

    .card-item {
        margin: 0;
    }

    .card-info {
        padding: 0.5rem;
    }

    .card-name {
        font-size: 0.9rem;
        white-space: normal;
        margin-bottom: 0.2rem;
    }

    .card-set {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }

    /* Availability: stack on separate lines */
    .card-availability {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
        display: flex;
        flex-direction: column;
        gap: 0.1rem;
    }

    .in-use-count {
        margin-left: 0;
        font-size: 0.75rem;
    }

    .card-actions {
        flex-direction: row;
        gap: 0.4rem;
        margin-top: auto;
    }

    .duration-select,
    .add-to-cart-btn {
        flex: 1;
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    /* --- CART PAGE --- */
    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .cart-item-controls {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
}

/* Extra small screens (under 380px) */
@media (max-width: 380px) {
    .logo span:not(.logo-icon) {
        font-size: 1rem;
    }

    .header {
        padding: 0.75rem 1rem;
    }

    .card-grid {
        gap: 0.5rem;
    }

    .card-info {
        padding: 0.5rem;
    }

    .card-name {
        font-size: 0.8rem;
    }
}

/* Page Title */
.page-title {
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.75rem;
}

.page-subtitle {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Rentals Link in Header */
.header-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.rentals-link:hover {
    color: var(--secondary-color);
}

.rentals-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--success-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rentals List */
.rentals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rental-item {
    display: flex;
    gap: 1.5rem;
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    align-items: center;
}

.rental-item-image {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: var(--border-radius);
    flex-shrink: 0;
}

.rental-item-info {
    flex: 1;
}

.rental-item-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.rental-item-qty,
.rental-item-duration,
.rental-item-started,
.rental-item-ends {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* Countdown Timer */
.rental-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--surface-light);
    border-radius: var(--border-radius);
    min-width: 150px;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.countdown-timer {
    font-size: 1.25rem;
    font-weight: bold;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--success-color);
}

.rental-countdown.urgent .countdown-timer {
    color: var(--warning-color);
    animation: pulse 1s ease-in-out infinite;
}

.rental-countdown.expired .countdown-timer {
    color: var(--error-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Empty Rentals */
.empty-rentals {
    text-align: center;
    padding: 3rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
}

.empty-rentals h2 {
    margin-bottom: 0.5rem;
}

.empty-rentals p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Active Rentals Widget (Cart Page) */
.active-rentals-widget {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.active-rentals-widget h4 {
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

.active-rentals-widget p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.active-rentals-widget .next-return {
    color: var(--text-muted);
}

.active-rentals-widget .next-return.urgent {
    color: var(--warning-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* Site Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1rem;
    background-color: var(--surface-color);
    border-top: 1px solid var(--surface-light);
    text-align: center;
    z-index: 99;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.5rem;
    align-items: center;
}

.footer-parody {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.footer-disclaimer {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.4;
    opacity: 0.8;
}

.footer-disclaimer a {
    color: var(--secondary-color);
}

.footer-about a {
    color: var(--secondary-color);
    font-size: 0.7rem;
}

/* Bottom padding so content isn't hidden behind fixed footer */
body {
    padding-bottom: 4rem;
}

/* Responsive Rentals */
@media (max-width: 768px) {
    .rental-item {
        flex-direction: column;
        text-align: center;
    }

    .rental-item-image {
        width: 150px;
        height: 210px;
    }

    .rental-countdown {
        width: 100%;
    }
}
