/**
 * RiverTheme — Lagoon marketplace theme
 */

:root {
    --lagoon-teal: #0D5C75;
    --clear-turquoise: #00A896;
    --crisp-coral: #FF6B6B;
    --island-sand: #F4F1EA;
    --deep-charcoal: #2b2b2b;

    --bg-page: var(--island-sand);
    --bg-card: #fff;
    --bg-card-soft: #faf8f3;
    --bg-input: #fff;
    --text-body: var(--deep-charcoal);
    --text-muted: #5c5c5c;
    --text-on-dark: #ffffff;
    --border-soft: rgba(13, 92, 117, 0.15);
    --border-input: rgba(0, 168, 150, 0.35);
    --shadow-soft: 0 8px 24px rgba(13, 92, 117, 0.08);
    --gradient-hero: linear-gradient(135deg, var(--lagoon-teal) 0%, var(--clear-turquoise) 100%);

    --bs-body-color: var(--deep-charcoal);
    --bs-body-bg: var(--island-sand);
    --bs-primary: var(--lagoon-teal);
    --bs-link-color: var(--clear-turquoise);
    --bs-link-hover-color: var(--lagoon-teal);
    --bs-border-color: var(--border-soft);
}

* { box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-page);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .logo-text {
    font-family: 'Playfair Display', serif;
    color: var(--lagoon-teal);
}

.text-muted { color: var(--text-muted) !important; }
.text-turquoise { color: var(--clear-turquoise) !important; }
.text-coral { color: var(--crisp-coral) !important; }

/* Top bar */
.top-bar {
    background: var(--lagoon-teal);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1900;
    color: var(--text-on-dark);
}

.top-bar .top-icon-link {
    color: var(--text-on-dark);
    text-decoration: none;
}

.top-bar .top-icon-link:hover {
    color: var(--clear-turquoise);
}

.top-bar [data-balance-value] {
    color: var(--clear-turquoise) !important;
    font-weight: 700;
}

.top-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--clear-turquoise);
    color: var(--text-on-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.dropdown-dark {
    background: var(--lagoon-teal);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dropdown-dark .dropdown-item {
    color: var(--text-on-dark);
}

.dropdown-dark .dropdown-item:hover,
.dropdown-dark .dropdown-item.active {
    background: rgba(0, 168, 150, 0.25);
    color: var(--text-on-dark);
}

/* Header */
.main-header {
    background: var(--lagoon-teal);
    color: var(--text-on-dark);
    border-bottom: 3px solid var(--clear-turquoise);
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-on-dark);
    letter-spacing: 0.5px;
}

.logo-accent {
    color: var(--clear-turquoise);
}

.logo-tagline {
    color: rgba(255, 255, 255, 0.85);
    display: block;
    font-size: 0.8rem;
    margin-top: 2px;
}

.logo-river { color: var(--clear-turquoise); }

/* Menu bar */
.menu-bar {
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
}

.menu-bar .nav-link-custom {
    color: var(--deep-charcoal);
    font-weight: 600;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.menu-bar .nav-link-custom:hover,
.menu-bar .nav-link-custom.active {
    color: var(--clear-turquoise);
}

.menu-nav-icon {
    color: var(--clear-turquoise);
}

/* Hero */
.hero-section {
    position: relative;
    background: var(--gradient-hero);
    color: var(--text-on-dark);
    padding: 5rem 0;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-on-dark);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 640px;
    margin: 0 auto 2rem;
}

/* Cards & sections */
.main-container {
    flex: 1;
}

.contrast-card,
.soft-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.soft-card {
    background: var(--bg-card-soft);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.section-title {
    margin: 0;
    font-size: 1.5rem;
}

.section-link {
    color: var(--clear-turquoise);
    text-decoration: none;
    font-weight: 600;
}

.section-link:hover {
    color: var(--lagoon-teal);
}

/* Product cards */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    border-color: var(--clear-turquoise);
}

.product-card-thumb {
    aspect-ratio: 16/10;
    background: var(--bg-card-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-thumb-placeholder {
    font-size: 2.5rem;
    color: var(--clear-turquoise);
    opacity: 0.5;
}

.product-card-body {
    padding: 1rem;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--deep-charcoal);
}

.product-card-title a {
    color: inherit;
    text-decoration: none;
}

.product-card-title a:hover {
    color: var(--clear-turquoise);
}

.product-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-price {
    font-weight: 700;
    color: var(--lagoon-teal);
}

.product-price-free {
    color: var(--clear-turquoise);
}

.license-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 168, 150, 0.12);
    color: var(--lagoon-teal);
    font-weight: 600;
}

/* Buttons */
.btn-coral,
.btn-primary {
    background: var(--crisp-coral);
    border-color: var(--crisp-coral);
    color: #fff;
    font-weight: 600;
}

.btn-coral:hover,
.btn-primary:hover,
.btn-primary:focus {
    background: #e85555;
    border-color: #e85555;
    color: #fff;
}

.btn-turquoise {
    background: var(--clear-turquoise);
    border-color: var(--clear-turquoise);
    color: #fff;
    font-weight: 600;
}

.btn-turquoise:hover {
    background: #008f7f;
    border-color: #008f7f;
    color: #fff;
}

.btn-outline-turquoise {
    border-color: var(--clear-turquoise);
    color: var(--clear-turquoise);
}

.btn-outline-turquoise:hover {
    background: var(--clear-turquoise);
    color: #fff;
}

.btn-outline-teal {
    border-color: var(--lagoon-teal);
    color: var(--lagoon-teal);
}

.btn-outline-teal:hover {
    background: var(--lagoon-teal);
    color: #fff;
}

.bg-turquoise {
    background: var(--clear-turquoise) !important;
    color: #fff;
}

/* Search / browse filters */
.browse-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-bar {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--clear-turquoise);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.search-bar .search-bar-field,
.search-bar .form-control {
    border: none;
    box-shadow: none;
    padding: 0.75rem 1.25rem;
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 0;
}

.search-bar .search-bar-submit,
.search-bar .btn {
    border-radius: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    flex-shrink: 0;
    border: none;
    box-shadow: none;
}

.browse-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

.browse-filter-select {
    flex: 1 1 180px;
    min-width: 0;
    border: 1px solid var(--border-input);
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    background-color: #fff;
}

.browse-filters-row .product-category-select {
    flex: 1 1 220px;
    max-width: none;
    min-width: 0;
}

.browse-filter-license {
    flex: 0 1 180px;
}

.browse-filter-sort {
    flex: 0 1 160px;
}

@media (max-width: 575.98px) {
    .browse-filters-row {
        flex-direction: column;
    }

    .browse-filter-select,
    .browse-filters-row .product-category-select {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
    }
}

/* Forms */
.form-control,
.form-select {
    border-color: var(--border-input);
    color: var(--text-body);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--clear-turquoise);
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 150, 0.2);
}

/* Footer */
.footer {
    background: var(--lagoon-teal);
    color: rgba(255, 255, 255, 0.9);
    margin-top: auto;
}

.footer h5 {
    color: var(--text-on-dark);
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.2rem 0;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--clear-turquoise);
}

.copyright-bar {
    background: #094a5e;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    padding: 0.75rem 0;
}

/* Auth pages */
.auth-page {
    background:
        radial-gradient(ellipse at 10% 0%, rgba(0, 168, 150, 0.12), transparent 45%),
        radial-gradient(ellipse at 90% 100%, rgba(13, 92, 117, 0.1), transparent 50%),
        var(--island-sand);
    padding: 2.5rem 0 3.5rem;
    flex: 1;
}

.auth-promo {
    padding: 2rem;
}

.auth-promo-card {
    background: var(--gradient-hero);
    color: var(--text-on-dark);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-soft);
    height: 100%;
}

.auth-promo-card h2 {
    color: var(--text-on-dark);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.auth-promo-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.auth-promo-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    opacity: 0.95;
}

.auth-promo-list i {
    color: var(--clear-turquoise);
    font-size: 1.25rem;
    margin-top: 0.1rem;
}

.auth-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.auth-card-header {
    background: var(--gradient-hero);
    color: var(--text-on-dark);
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.auth-card-header h1 {
    color: var(--text-on-dark);
    font-size: 1.35rem;
    margin: 0;
}

.auth-card-header p {
    margin: 0.35rem 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.auth-tabs {
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-card-soft);
}

.auth-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: var(--text-muted) !important;
    font-weight: 600;
    padding: 0.9rem 1rem;
    background: transparent !important;
}

.auth-tabs .nav-link i {
    color: var(--clear-turquoise);
}

.auth-tabs .nav-link.active {
    color: var(--lagoon-teal) !important;
    background: #fff !important;
    border-bottom: 3px solid var(--crisp-coral);
}

.auth-tabs .nav-link.active i {
    color: var(--lagoon-teal);
}

.auth-tabs .nav-link:hover:not(.active) {
    color: var(--lagoon-teal) !important;
    background: rgba(0, 168, 150, 0.06) !important;
}

.auth-card-body {
    padding: 1.5rem;
}

.auth-input-icon {
    color: var(--clear-turquoise);
    background: var(--bg-card-soft);
    border-color: var(--border-input);
}

.auth-input-group .form-control {
    border-color: var(--border-input);
}

.auth-input-group .form-control:focus {
    border-color: var(--clear-turquoise);
    box-shadow: none;
}

.auth-input-group:focus-within .auth-input-icon {
    border-color: var(--clear-turquoise);
    color: var(--lagoon-teal);
}

.auth-link {
    color: var(--clear-turquoise);
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    color: var(--lagoon-teal);
    text-decoration: underline;
}

.auth-footer-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-header-gradient {
    background: var(--gradient-hero) !important;
    border: none;
    color: var(--text-on-dark);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.captcha-question {
    font-weight: 700;
    color: var(--lagoon-teal);
    font-size: 1.1rem;
    white-space: nowrap;
}

.alert-success .alert-link {
    color: var(--lagoon-teal);
}

.alert-success .alert-link:hover {
    color: var(--clear-turquoise);
}

.refer-qr-img {
    display: inline-block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 2px solid var(--clear-turquoise);
    background: #fff;
    padding: 0.75rem;
    box-shadow: var(--shadow-soft);
}

.card-header-gradient h2,
.card-header-gradient h5,
.card-header-gradient h6 {
    color: var(--text-on-dark);
}

.balance-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.balance-display-lg .balance-value {
    font-size: 1.75rem;
}

.balance-refresh-btn {
    color: var(--clear-turquoise);
    padding: 0.15rem 0.4rem;
}

.balance-refresh-btn:hover {
    color: var(--crisp-coral);
}

.top-bar .balance-refresh-btn:hover {
    color: var(--crisp-coral);
}

.balance-display-dropdown {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.credits-dropdown-menu {
    min-width: 11rem;
}

.balance-dropdown-header {
    padding: 0.65rem 0.75rem;
    white-space: nowrap;
}

.balance-dropdown-line strong {
    font-weight: 700;
}

.balance-refresh-btn:disabled {
    opacity: 0.5;
}

.deposit-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.deposit-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.badge-approved { background: #2ecc71; color: #fff; }
.badge-failed { background: #e74c3c; color: #fff; }
.badge-refunded { background: #7f8c8d; color: #fff; }
.badge-pending { background: #f39c12; color: #fff; }

.product-upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(13, 92, 117, 0.55);
    backdrop-filter: blur(4px);
}

.product-upload-overlay[hidden] {
    display: none !important;
}

.product-upload-overlay-card {
    width: min(100%, 420px);
    padding: 2rem 1.75rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

body.product-upload-active {
    overflow: hidden;
}

.product-steps {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.product-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #9ca3af;
}

.product-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    border: 2px solid currentColor;
    font-size: 0.8rem;
}

.product-step.is-active {
    color: var(--lagoon-teal);
}

.product-step.is-done {
    color: var(--clear-turquoise);
}

.product-step-divider {
    flex: 1;
    min-width: 2rem;
    height: 2px;
    background: var(--border-soft);
    border-radius: 1px;
}

.product-draft-badge {
    display: inline-flex;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: #666;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.product-media-add {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    border: 2px dashed rgba(0, 168, 150, 0.45);
    background: rgba(0, 168, 150, 0.04);
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.product-media-add-icon {
    font-size: 1.5rem;
    color: var(--clear-turquoise);
}

.product-media-add:hover {
    border-color: var(--clear-turquoise);
    background: rgba(0, 168, 150, 0.1);
    color: #1a1a1a;
}

.product-media-add.is-uploading {
    pointer-events: none;
    opacity: 0.7;
    border-style: solid;
}

.product-media-add.is-uploading .product-media-add-icon {
    animation: product-upload-pulse 0.9s ease-in-out infinite;
}

@keyframes product-upload-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.92); }
}

.product-media-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #f3f4f6;
}

.product-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn-google {
    background: #fff;
    color: var(--deep-charcoal);
    border: 1px solid var(--border-input);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 1px 3px rgba(13, 92, 117, 0.1);
}

.btn-google:disabled {
    background: var(--bg-card-soft);
    color: var(--text-muted);
    opacity: 1 !important;
}

.btn-google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    flex-shrink: 0;
}

.btn-google:hover {
    background: #fff;
    color: var(--deep-charcoal);
    border-color: var(--clear-turquoise);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 92, 117, 0.12);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

.auth-divider-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

/* Chat */
.chat-room-card { overflow: hidden; }

.chat-room-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-card-soft);
}

.chat-purchases-panel {
    padding: 0.75rem 1rem;
    background: rgba(0, 168, 150, 0.08);
    border-bottom: 1px solid var(--border-soft);
}

.chat-purchase-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chat-purchase-list li {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}

.chat-purchase-list a {
    color: var(--lagoon-teal);
    text-decoration: none;
    font-weight: 600;
}

.chat-messages {
    min-height: 320px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-page);
}

.chat-bubble {
    max-width: 80%;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
}

.chat-bubble-mine {
    margin-left: auto;
    background: var(--clear-turquoise);
    color: #fff;
}

.chat-bubble-theirs {
    background: #fff;
    border: 1px solid var(--border-soft);
}

.chat-bubble-time {
    display: block;
    opacity: 0.7;
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

.chat-compose {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-soft);
}

.chat-thread-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-soft);
    text-decoration: none;
    color: inherit;
}

.chat-thread-row:hover {
    background: var(--bg-card-soft);
}

.chat-thread-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--clear-turquoise);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Product detail */
.product-category-select {
    max-width: 100%;
    font-size: 0.875rem;
}

.product-category-select optgroup {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--lagoon-teal, #00a896);
    background: #f8f9fa;
}

.product-category-select option {
    font-weight: 400;
    color: #1a1a1a;
    padding: 0.2rem 0;
}

.product-category-badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.search-bar .product-category-select {
    min-width: 200px;
    max-width: 260px;
}

.product-gallery-tabs .nav-link {
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-body);
}

.product-gallery-tabs .nav-link.active {
    background: var(--clear-turquoise);
}

.product-photo-screen-block:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.product-summary {
    color: var(--text-main, #1a1a1a);
    line-height: 1.6;
}

.product-gallery-carousel {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #0f1419;
}

.product-gallery-carousel .carousel-inner {
    direction: rtl;
}

.product-gallery-carousel .carousel-item {
    direction: ltr;
}

.product-gallery-slide-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0;
    border: none;
}

/* Mobile screenshots — tall phone frame, natural aspect, no stretch */
.product-gallery-carousel--mobile {
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.product-gallery-carousel--mobile .carousel-inner {
    min-height: min(72vh, 640px);
}

.product-gallery-carousel--mobile .carousel-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(72vh, 640px);
    padding: 1.25rem 0.75rem;
}

.product-gallery-slide-img--mobile {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(68vh, 600px);
    aspect-ratio: unset;
    object-fit: contain;
    margin: 0 auto;
}

.product-gallery-carousel .carousel-control-prev,
.product-gallery-carousel .carousel-control-next {
    width: 12%;
}

.product-gallery-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--clear-turquoise);
}

.product-description-html {
    line-height: 1.7;
    word-wrap: break-word;
}

.product-description-html h2,
.product-description-html h3,
.product-description-html h4,
.product-description-html h5,
.product-description-html h6 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.product-description-html p {
    margin-bottom: 1rem;
}

.product-description-html ul,
.product-description-html ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.product-description-html img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.75rem 0;
}

.product-description-html pre,
.product-description-html code {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    font-size: 0.9em;
}

.product-description-html pre {
    padding: 1rem;
    overflow-x: auto;
}

.product-description-html blockquote {
    border-left: 3px solid var(--clear-turquoise);
    padding-left: 1rem;
    color: #555;
    margin: 1rem 0;
}

.product-gallery img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
}

.product-license-option {
    border: 2px solid var(--border-soft);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.product-license-option:hover,
.product-license-option.selected {
    border-color: var(--clear-turquoise);
    background: rgba(0, 168, 150, 0.06);
}

.version-timeline {
    border-left: 3px solid var(--clear-turquoise);
    padding-left: 1rem;
    margin-left: 0.5rem;
}

.version-timeline-item {
    margin-bottom: 1.25rem;
}

/* Seller dashboard */
.stat-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.stat-tile strong {
    display: block;
    font-size: 1.75rem;
    color: var(--lagoon-teal);
}

.refer-stat-card h3 {
    color: var(--lagoon-teal);
}

.seller-menu-bar {
    background: #59d4b5;
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    position: relative;
    z-index: 1890;
}

.seller-menu-scroll {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.seller-menu-scroll::-webkit-scrollbar {
    height: 4px;
}

.seller-menu-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.seller-menu-link:hover {
    color: #1a1a1a;
    background: #fff;
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}

.seller-menu-link.is-active {
    color: #1a1a1a;
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.seller-menu-link-accent {
    color: #1a1a1a;
    border-color: rgba(26, 26, 26, 0.2);
}

.seller-menu-link-accent:hover,
.seller-menu-link-accent.is-active {
    color: #1a1a1a;
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
}

.seller-menu-link.disabled {
    opacity: 0.45;
}

.admin-menu-bar {
    background: #f0ece9;
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    position: relative;
    z-index: 1895;
}

.admin-menu-scroll {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.admin-menu-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    margin-right: 0.35rem;
    border-radius: 999px;
    background: rgba(196, 140, 145, 0.18);
    color: #1a1a1a;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.admin-menu-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
    transition: var(--transition);
}

.admin-menu-link:hover {
    color: #c48c91;
    background: rgba(196, 140, 145, 0.12);
    border-color: rgba(196, 140, 145, 0.25);
}

.admin-menu-link.is-active {
    color: #1a1a1a;
    background: #c48c91;
    border-color: #c48c91;
}

.guide-card-img,
.guide-hero-img {
    width: 100%;
    object-fit: cover;
}

.guide-card-img {
    height: 180px;
}

.guide-hero-img {
    max-height: 420px;
}

.guide-card-placeholder {
    height: 180px;
    background: rgba(64, 224, 208, 0.08);
}

.guide-gallery-thumb {
    max-height: 120px;
    width: 100%;
    object-fit: cover;
}

.guide-content {
    line-height: 1.7;
    color: var(--deep-charcoal);
}

.guide-content img,
.guide-content-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

.guide-content h2,
.guide-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.guide-content a {
    color: var(--crisp-coral);
}

/* Mobile nav */
.mobile-nav {
    background: var(--lagoon-teal);
}

.mobile-nav .nav-link {
    color: var(--text-on-dark);
    padding: 0.65rem 0;
}

.mobile-nav .nav-link:hover {
    color: var(--clear-turquoise);
}

.balance-refresh-btn {
    color: var(--clear-turquoise);
    padding: 0;
    border: none;
    background: transparent;
}

.balance-spin {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 991.98px) {
    .hero-section { padding: 3.5rem 0; }
}

/* RTL — Arabic, Urdu */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .dropdown-menu-end {
    --bs-position: start;
}

html[dir="rtl"] .product-description-html ul,
html[dir="rtl"] .product-description-html ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

html[dir="rtl"] .product-description-html blockquote {
    border-right: 3px solid var(--clear-turquoise);
    border-left: none;
    padding-right: 1rem;
    padding-left: 0;
}

html[dir="rtl"] .auth-input-group .input-group-text:first-child {
    border-radius: 0 0.375rem 0.375rem 0;
}

html[dir="rtl"] .carousel-control-prev {
    left: auto;
    right: 0;
}

html[dir="rtl"] .carousel-control-next {
    right: auto;
    left: 0;
}
