/* SDUHSD-style design - San Dieguito Union High School District aesthetic */
/* https://www.sduhsd.net/ */

:root {
    --sduhsd-navy: #1a365d;
    --sduhsd-navy-dark: #0f2744;
    --sduhsd-blue: #2c5282;
    --sduhsd-blue-light: #2b6cb0;
    --sduhsd-gray: #4a5568;
    --sduhsd-gray-light: #718096;
    --sduhsd-bg: #f7fafc;
    --sduhsd-white: #ffffff;
    --sduhsd-border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--sduhsd-bg);
    color: #2d3748;
    line-height: 1.5;
    min-height: 100vh;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--sduhsd-navy);
    color: white;
    padding: 12px 20px;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* Alternative Domains toast (top right) */
.alt-domains-toast {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    background: var(--sduhsd-navy);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 180px;
    animation: alt-domains-slide-in 0.4s ease-out;
    transition: opacity 0.5s ease-out;
}
.alt-domains-toast.alt-domains-faded {
    opacity: 0;
    pointer-events: none;
}
.alt-domains-toast:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

@keyframes alt-domains-slide-in {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alt-domains-toast .alt-domains-label-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
}

.alt-domains-label {
    flex: 1;
}

.alt-domains-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.alt-domains-toast.expanded .alt-domains-chevron {
    transform: rotate(180deg);
}

.alt-domains-links {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.3);
}
.alt-domains-toast.expanded .alt-domains-links {
    display: flex;
}

.alt-domains-links a {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 4px 0;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.alt-domains-links a:hover {
    color: white;
    background: rgba(255,255,255,0.15);
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

/* Top bar - SDUHSD black/navy strip */
.top-bar {
    background: var(--sduhsd-navy-dark);
    color: white;
    font-size: 0.875rem;
    padding: 8px 0;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.top-bar-schools {
    font-weight: 600;
}

.top-bar-sep {
    color: rgba(255,255,255,0.5);
}

.top-bar-link {
    color: white;
    text-decoration: none;
}
.top-bar-link:hover {
    text-decoration: underline;
}

.top-bar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    background: var(--sduhsd-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
}
.btn-login:hover {
    background: var(--sduhsd-blue-light);
}

/* Main header */
.header {
    background: var(--sduhsd-navy);
    color: white;
    padding: 32px 24px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 24px;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 10px 24px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.6);
}

.nav-btn.active {
    background: white;
    color: var(--sduhsd-navy);
    border-color: white;
}

/* Main content */
.main-content {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Profile button (in top bar) */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--sduhsd-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
}
.profile-btn:hover {
    background: var(--sduhsd-blue-light);
}

.profile-icon {
    font-size: 1em;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 32px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
}

.close,
.close-profile {
    position: absolute;
    right: 16px;
    top: 16px;
    color: var(--sduhsd-gray-light);
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}
.close:hover,
.close-profile:hover {
    color: var(--sduhsd-navy);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--sduhsd-gray);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sduhsd-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--sduhsd-blue);
    box-shadow: 0 0 0 2px rgba(44,82,130,0.2);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--sduhsd-gray-light);
    font-size: 0.8rem;
}

.user-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--sduhsd-border);
}

.profile-info { margin-top: 16px; }
.profile-stats {
    margin: 16px 0;
    padding: 16px;
    background: var(--sduhsd-bg);
    border-radius: 4px;
}
.profile-stats p { margin: 4px 0; color: var(--sduhsd-gray); }
.profile-stats strong { color: var(--sduhsd-navy); }

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    margin: 4px;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--sduhsd-navy);
    color: white;
}
.btn-primary:hover {
    background: var(--sduhsd-blue);
}

.btn-secondary {
    background: var(--sduhsd-gray);
    color: white;
}
.btn-secondary:hover {
    background: var(--sduhsd-gray-light);
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
}

.section h2 {
    font-size: 1.5rem;
    color: var(--sduhsd-navy);
    margin-bottom: 24px;
    font-weight: 700;
}

/* Search bar */
.search-bar {
    margin-bottom: 24px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--sduhsd-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--sduhsd-blue);
    box-shadow: 0 0 0 2px rgba(44,82,130,0.2);
}

/* Add forms */
.add-teacher-form,
.add-product-form {
    background: white;
    border: 1px solid var(--sduhsd-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.add-teacher-form h3,
.add-product-form h3 {
    font-size: 1.15rem;
    color: var(--sduhsd-navy);
    margin-bottom: 16px;
    font-weight: 700;
}

.add-teacher-form form,
.add-product-form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.add-teacher-form .form-group,
.add-product-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.add-teacher-form input,
.add-teacher-form select,
.add-product-form input,
.add-product-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--sduhsd-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.add-teacher-form select {
    width: 100%;
    background: white;
    cursor: pointer;
}

.add-teacher-form select:focus,
.add-product-form input:focus,
.add-product-form textarea:focus {
    outline: none;
    border-color: var(--sduhsd-blue);
}

.add-teacher-form #teacherSearchInput { margin-bottom: 4px; }

.add-product-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Teachers list */
.teachers-list {
    display: grid;
    gap: 16px;
}

/* Teachers list pagination (Google-style) */
.teachers-pagination {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--sduhsd-border);
    display: flex;
    justify-content: center;
}

.teachers-pagination-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.teachers-pagination-btn {
    padding: 8px 14px;
    min-width: 80px;
    background: var(--sduhsd-navy);
    color: white;
    border: 1px solid var(--sduhsd-navy);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.teachers-pagination-btn:hover:not(:disabled) {
    background: var(--sduhsd-blue);
    border-color: var(--sduhsd-blue);
}

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

.teachers-pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.teachers-pagination-num {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: white;
    color: var(--sduhsd-navy);
    border: 1px solid var(--sduhsd-border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.teachers-pagination-num:hover {
    background: var(--sduhsd-bg);
    border-color: var(--sduhsd-blue);
}

.teachers-pagination-num.active {
    background: var(--sduhsd-navy);
    color: white;
    border-color: var(--sduhsd-navy);
}

.teachers-pagination-ellipsis {
    padding: 0 6px;
    color: var(--sduhsd-gray-light);
    font-weight: 600;
    user-select: none;
}

.teacher-card {
    background: white;
    border: 1px solid var(--sduhsd-border);
    border-radius: 8px;
    padding: 24px;
    border-left: 4px solid var(--sduhsd-navy);
}

.teacher-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.teacher-header {
    margin-bottom: 12px;
}

.teacher-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
}

.teacher-subject {
    color: var(--sduhsd-blue);
    font-weight: 600;
    font-size: 0.95rem;
}

.teacher-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.stars {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 1.35rem;
    color: #cbd5e0;
    cursor: default;
    transition: color 0.2s;
}

.star.active {
    color: #d69e2e;
}

.rating-value {
    font-weight: 700;
    color: var(--sduhsd-navy);
}

.rating-count {
    color: var(--sduhsd-gray-light);
    font-size: 0.9rem;
}

/* Admin controls */
.admin-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sduhsd-border);
}

.btn-delete-teacher {
    padding: 8px 16px;
    background: #c53030;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
}
.btn-delete-teacher:hover {
    background: #9b2c2c;
}

.ratings-list {
    margin-top: 16px;
    padding: 16px;
    background: var(--sduhsd-bg);
    border-radius: 4px;
    border: 1px solid var(--sduhsd-border);
    max-height: 140px;
    overflow-y: auto;
}

.ratings-list strong {
    display: block;
    margin-bottom: 12px;
    color: var(--sduhsd-navy);
}

.ratings-list::-webkit-scrollbar {
    width: 6px;
}

.ratings-list::-webkit-scrollbar-track {
    background: var(--sduhsd-border);
    border-radius: 3px;
}

.ratings-list::-webkit-scrollbar-thumb {
    background: var(--sduhsd-gray-light);
    border-radius: 3px;
}

.ratings-list::-webkit-scrollbar-thumb:hover {
    background: var(--sduhsd-gray);
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--sduhsd-border);
}

.rating-item:last-child { border-bottom: none; }

.btn-delete-rating {
    padding: 4px 10px;
    background: #c53030;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-delete-rating:hover {
    background: #9b2c2c;
}

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

.product-card {
    background: white;
    border: 1px solid var(--sduhsd-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.product-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--sduhsd-navy) 0%, var(--sduhsd-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2d3748;
}

.product-description {
    color: var(--sduhsd-gray);
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sduhsd-navy);
    margin-bottom: 8px;
}

.product-seller {
    color: var(--sduhsd-gray-light);
    font-size: 0.85rem;
}

/* Store: Payment methods & contact */
.store-payment-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--sduhsd-border);
}

.store-payment-section h3,
.store-contact-section h3 {
    font-size: 1.25rem;
    color: var(--sduhsd-navy);
    margin-bottom: 16px;
    font-weight: 700;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: white;
    border: 2px solid var(--sduhsd-border);
    border-radius: 8px;
    font-weight: 600;
    color: var(--sduhsd-navy);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.payment-method:hover {
    border-color: var(--sduhsd-blue);
    box-shadow: 0 2px 8px rgba(44, 82, 130, 0.15);
}

.payment-method .payment-icon {
    font-size: 1.5rem;
}

.payment-method-crypto .payment-icon { color: #f7931a; }
.payment-method-cashapp .payment-icon { color: #00d632; }
.payment-method-cash .payment-icon { color: #38a169; }

.store-contact-section {
    margin-top: 32px;
    padding: 24px;
    background: white;
    border: 1px solid var(--sduhsd-border);
    border-radius: 8px;
}

.store-contact-section p {
    color: var(--sduhsd-gray);
    margin-bottom: 12px;
    line-height: 1.5;
}

.store-contact-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--sduhsd-navy);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    font-size: 1rem;
    transition: background 0.2s;
}

.store-contact-email:hover {
    background: var(--sduhsd-blue);
}

.store-contact-phone-text {
    margin-top: 16px;
    margin-bottom: 0;
}

.store-contact-phone {
    color: var(--sduhsd-blue);
    font-weight: 600;
    text-decoration: none;
}
.store-contact-phone:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--sduhsd-navy);
    color: white;
    padding: 24px 0;
    margin-top: 48px;
    width: 100%;
    box-sizing: border-box;
}

.footer-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    box-sizing: border-box;
}

.footer p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.footer-seo {
    font-size: 0.7rem;
    line-height: 1.4;
    opacity: 0.85;
    margin: 12px auto 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    max-width: 56rem;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}
.footer a:hover {
    color: white;
}

/* Teacher Detail Modal */
.teacher-detail-modal {
    overflow-y: auto;
}

body.modal-open {
    overflow: hidden;
}

.teacher-detail-modal .modal-content {
    max-width: 800px;
    max-height: 85vh;
    margin: 5vh auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.teacher-detail-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.close-teacher-detail {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 10;
}

.teacher-detail-header {
    padding: 24px;
    border-bottom: 2px solid var(--sduhsd-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    background: white;
}

.teacher-detail-title {
    flex: 1;
    min-width: 200px;
}

.detail-teacher-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sduhsd-navy);
    margin-bottom: 4px;
}

.detail-teacher-subject {
    color: var(--sduhsd-blue);
    font-weight: 600;
    font-size: 1rem;
}

.teacher-detail-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.detail-stars {
    display: flex;
    gap: 4px;
}

.detail-star {
    font-size: 1.5rem;
    color: #cbd5e0;
}

.detail-star.active {
    color: #d69e2e;
}

.detail-rating-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.detail-rating-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sduhsd-navy);
}

.detail-rating-count {
    font-size: 0.9rem;
    color: var(--sduhsd-gray-light);
}

/* Modal scrollable content */
.teacher-detail-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 85vh;
}

.write-review-form {
    padding: 24px;
    border-bottom: 2px solid var(--sduhsd-border);
    flex-shrink: 0;
    max-height: 40vh;
    overflow-y: auto;
}

.write-review-form h3 {
    font-size: 1.15rem;
    color: var(--sduhsd-navy);
    margin-bottom: 16px;
    font-weight: 700;
}

.teacher-detail-reviews {
    padding: 24px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.review-stars-input {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.review-star {
    font-size: 2rem;
    color: #cbd5e0;
    cursor: pointer;
    transition: color 0.2s;
}

.review-star.active {
    color: #d69e2e;
}

.review-star:hover {
    color: #f6ad55;
}

#reviewText {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--sduhsd-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

#reviewText:focus {
    outline: none;
    border-color: var(--sduhsd-blue);
    box-shadow: 0 0 0 2px rgba(44,82,130,0.2);
}

.teacher-detail-reviews h3 {
    font-size: 1.15rem;
    color: var(--sduhsd-navy);
    margin-bottom: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.reviews-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    min-height: 0;
    margin-bottom: 16px;
}

.reviews-container::-webkit-scrollbar {
    width: 8px;
}

.reviews-container::-webkit-scrollbar-track {
    background: var(--sduhsd-bg);
    border-radius: 4px;
}

.reviews-container::-webkit-scrollbar-thumb {
    background: var(--sduhsd-gray-light);
    border-radius: 4px;
}

.reviews-container::-webkit-scrollbar-thumb:hover {
    background: var(--sduhsd-gray);
}

.review-item {
    background: var(--sduhsd-bg);
    border: 1px solid var(--sduhsd-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.review-author {
    font-weight: 700;
    color: var(--sduhsd-navy);
    font-size: 0.95rem;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-star-small {
    font-size: 1rem;
    color: #cbd5e0;
}

.review-star-small.active {
    color: #d69e2e;
}

.review-text {
    color: var(--sduhsd-gray);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-reviews {
    text-align: center;
    color: var(--sduhsd-gray-light);
    padding: 40px 20px;
    font-style: italic;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--sduhsd-border);
    flex-shrink: 0;
}

.pagination-info {
    color: var(--sduhsd-gray);
    font-weight: 600;
}

.pagination-btn {
    padding: 8px 16px;
    background: var(--sduhsd-navy);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
}

.pagination-btn:hover {
    background: var(--sduhsd-blue);
}

.clickable-teacher-name {
    transition: color 0.2s;
}

.clickable-teacher-name:hover {
    color: var(--sduhsd-blue);
}

/* Product Detail Modal */
.product-detail-modal {
    overflow-y: auto;
}

.product-detail-modal .modal-content {
    max-width: 560px;
    max-height: 90vh;
    margin: 5vh auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.product-detail-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.close-product-detail {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 10;
    color: var(--sduhsd-gray-light);
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}
.close-product-detail:hover {
    color: var(--sduhsd-navy);
}

.product-detail-header {
    padding: 24px;
    border-bottom: 2px solid var(--sduhsd-border);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: white;
}

.product-detail-image-wrap {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sduhsd-navy) 0%, var(--sduhsd-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.product-detail-image-wrap.product-detail-image-placeholder {
    background: linear-gradient(135deg, var(--sduhsd-navy) 0%, var(--sduhsd-blue) 100%);
}

.product-detail-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-title-wrap {
    flex: 1;
    min-width: 180px;
}

.product-detail-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sduhsd-navy);
    margin-bottom: 8px;
}

.product-detail-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--sduhsd-blue);
    margin-bottom: 4px;
}

.product-detail-seller {
    font-size: 0.9rem;
    color: var(--sduhsd-gray-light);
}

.product-detail-body {
    padding: 24px;
    border-bottom: 2px solid var(--sduhsd-border);
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.product-detail-body h3 {
    font-size: 1.1rem;
    color: var(--sduhsd-navy);
    margin-bottom: 12px;
    font-weight: 700;
}

.product-detail-description {
    color: var(--sduhsd-gray);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.product-detail-actions {
    padding: 24px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    background: white;
    border-top: 1px solid var(--sduhsd-border);
}

.product-detail-quantity {
    margin: 0;
    max-width: 100px;
}

.product-detail-quantity input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sduhsd-border);
    border-radius: 4px;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .top-bar-right {
        margin-left: 0;
        width: 100%;
    }
    .header { padding: 24px 16px; }
    .title { font-size: 1.5rem; }
    .subtitle { font-size: 0.9rem; }
    .nav { flex-direction: column; }
    .nav-btn { width: 100%; }
    .container { padding: 24px 16px; }
    .products-grid { grid-template-columns: 1fr; }
    
    .teacher-detail-modal .modal-content {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .teacher-detail-header {
        flex-direction: column;
    }
    
    .teacher-detail-rating {
        align-items: flex-start;
    }
    
    .reviews-container {
        max-height: 300px;
    }
    
    .product-detail-modal .modal-content {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .product-detail-header {
        flex-direction: column;
    }
    
    .product-detail-image-wrap {
        width: 100%;
        height: 160px;
    }
}
