/* Global light/dark theme toggle */
body.theme-dark {
    background: #0f172a;
    color: #e5e7eb;
}

body.theme-dark .section-header,
body.theme-dark .fullscreen-modal-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.68)) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.theme-dark .bottom-nav {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.62), rgba(2, 6, 23, 0.42)) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.theme-dark .floating-shop-header {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.62), rgba(2, 6, 23, 0.42)) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.theme-dark .desktop-category-dropdown {
    background: #111827 !important;
    border-color: #334155 !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34) !important;
}

body.theme-dark .desktop-category-item,
body.theme-dark .desktop-category-mega-item,
body.theme-dark .desktop-category-leaf {
    color: #f8fafc;
}

body.theme-dark .desktop-category-col {
    border-left-color: rgba(255, 255, 255, 0.14);
}

body.theme-dark .desktop-category-panel-title {
    color: rgba(255, 255, 255, 0.76);
}

body.theme-dark .desktop-category-leaf {
    background: #1f2937;
}

body.theme-dark .desktop-category-item:hover,
body.theme-dark .desktop-category-item:focus-visible {
    background: rgba(255, 59, 59, 0.13);
    color: #ff3b3b;
}

body.theme-dark .shop-sort-dropdown {
    background: #111827;
    border-color: #334155;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

body.theme-dark .shop-sort-item {
    color: #f8fafc;
}

body.theme-dark .shop-sort-item:hover,
body.theme-dark .shop-sort-item.active {
    background: rgba(255, 59, 59, 0.13);
    color: #ff3b3b;
}

body.theme-dark .bottom-nav::before {
    inset: 1px !important;
    height: auto !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.035) !important;
}

body.theme-dark .floating-shop-header::before {
    background: rgba(255, 255, 255, 0.035) !important;
}

body.theme-dark .section-header h1 {
    color: #f8fafc !important;
    text-shadow: none !important;
}

body.theme-dark .passage-stores-heading h1 {
    color: #f8fafc !important;
}

body.theme-dark .passage-stores-heading p,
body.theme-dark .passage-filter-label {
    color: #cbd5e1 !important;
}

body.theme-dark .bottom-nav .nav-btn {
    color: #cbd5e1 !important;
}

body.theme-dark .bottom-nav .nav-btn.active {
    color: #f87171 !important;
    background: rgba(248, 113, 113, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.18), 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

body.theme-dark .desktop-header-nav-btn {
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.68), rgba(18, 18, 22, 0.58)) !important;
    border-color: rgba(255, 255, 255, 0.32) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

body.theme-dark .desktop-header-nav-btn:hover,
body.theme-dark .desktop-header-nav-btn:focus-visible {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(42, 42, 48, 0.78), rgba(24, 24, 30, 0.68)) !important;
    border-color: rgba(255, 255, 255, 0.42) !important;
}

body.theme-dark .desktop-header-nav-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.76), rgba(18, 18, 22, 0.66)) !important;
    border-color: rgba(255, 255, 255, 0.38) !important;
}

body.theme-dark .passage-filter-dropdown {
    background: rgba(17, 24, 39, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
}

body.theme-dark .passage-filter-item {
    background: #1f2937 !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #e5e7eb !important;
}

body.theme-dark .passage-filter-item.active,
body.theme-dark .passage-filter-item:hover,
body.theme-dark .passage-filter-item:focus-visible {
    background: rgba(248, 113, 113, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.32) !important;
    color: #fca5a5 !important;
}

body.theme-dark .home-stories-shell {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

body.theme-dark .home-story-item,
body.theme-dark .home-story-name {
    color: #d1d5db !important;
}

body.theme-dark .home-story-avatar-inner {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.72) !important;
}

body.theme-dark .home-story-avatar.is-seen {
    background: #475569 !important;
}

body.theme-dark .home-stories-arrow {
    background: rgba(15, 23, 42, 0.82) !important;
    border-color: rgba(148, 163, 184, 0.26) !important;
    color: #cbd5e1 !important;
}

body.theme-dark .home-stories-arrow:hover,
body.theme-dark .home-stories-arrow:focus-visible {
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
}

body.theme-dark .user-profile,
body.theme-dark .account-options,
body.theme-dark .favorites-section,
body.theme-dark .passage-block,
body.theme-dark .passage-store-card,
body.theme-dark .product-card,
body.theme-dark .fullscreen-modal,
body.theme-dark .store-form-container {
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

body.theme-dark .option-item,
body.theme-dark .store-type-card,
body.theme-dark .favorite-product-card,
body.theme-dark .input-with-icon input,
body.theme-dark .select-with-icon select,
body.theme-dark .search-input,
body.theme-dark .passage-search-wrap .search-input {
    background: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
}

body.theme-dark .search-input {
    background: rgba(31, 41, 55, 0.84) !important;
}

body.theme-dark .shop-search-brand-logo-light {
    display: none !important;
}

body.theme-dark .shop-search-brand-logo-dark {
    display: block !important;
}

body.theme-dark .search-suggestions-menu {
    border-color: rgba(255, 255, 255, 0.34);
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.82), rgba(18, 18, 22, 0.74));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
}

body.theme-dark .search-suggestion-item {
    color: #ffffff;
}

body.theme-dark .search-suggestion-item:hover,
body.theme-dark .search-suggestion-item.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

body.theme-dark .search-suggestion-meta,
body.theme-dark .search-suggestions-empty {
    color: rgba(255, 255, 255, 0.72);
}

body.theme-dark .mobile-category-card {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(31, 41, 55, 0.74);
    color: #f8fafc;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

body.theme-dark .mobile-categories-header h2 {
    color: #f8fafc;
}

body.theme-dark .mobile-categories-header p,
body.theme-dark .mobile-category-copy small {
    color: rgba(255, 255, 255, 0.58);
}

body.theme-dark .account-theme-toggle-btn,
body.theme-dark .account-name-edit-btn,
body.theme-dark .account-wallet-btn {
    background: #1f2937 !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #f8fafc !important;
}

body.theme-dark .account-wallet-btn {
    background: #1f2937 !important;
    box-shadow: none !important;
}

body.theme-dark .account-wallet-btn:hover,
body.theme-dark .account-wallet-btn:focus {
    border-color: #f5365c !important;
    box-shadow: none !important;
}

body.theme-dark .account-wallet-title {
    color: #cbd5e1 !important;
}

body.theme-dark .account-wallet-copy strong,
body.theme-dark .account-wallet-panel-head strong {
    color: #ffffff !important;
}

body.theme-dark .account-wallet-icon {
    background: #0f172a !important;
    color: #f8fafc !important;
}

body.theme-dark .account-wallet-panel {
    background: #111827 !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

body.theme-dark .account-wallet-panel-head,
body.theme-dark .account-wallet-action {
    color: #f8fafc !important;
}

body.theme-dark .account-wallet-action,
body.theme-dark .wallet-empty-state,
body.theme-dark .wallet-loading-state {
    background: rgba(31, 41, 55, 0.78) !important;
}

body.theme-dark .wallet-empty-state,
body.theme-dark .wallet-loading-state {
    color: #cbd5e1 !important;
}

body.theme-dark .wallet-empty-state i,
body.theme-dark .wallet-loading-state i {
    color: #f8fafc !important;
}

body.theme-dark .account-wallet-action:hover,
body.theme-dark .account-wallet-action:focus {
    background: #f5365c !important;
    color: #ffffff !important;
}

body.theme-dark .account-wallet-transactions {
    border-top-color: rgba(148, 163, 184, 0.24) !important;
}

body.theme-dark .user-info h2 {
    color: #ffffff !important;
}

body.theme-dark .shop-product-card .product-info h3,
body.theme-dark .favorite-product-info h3,
body.theme-dark .product-info h3 {
    color: #ffffff !important;
}

body.theme-dark #shop-products-grid .shop-product-card .product-info h3 {
    color: #ffffff !important;
}

body.theme-dark .favorite-product-price,
body.theme-dark .favorite-product-store,
body.theme-dark .favorite-product-actions button {
    color: #ffffff !important;
}

body.theme-dark .favorites-section .price-normal,
body.theme-dark .favorites-section .price-discounted,
body.theme-dark .favorites-section .price-original,
body.theme-dark .favorites-section .price-stack,
body.theme-dark .favorites-section .price-stack span {
    color: #ffffff !important;
}

body.theme-dark .favorite-product-image {
    background-color: #0f172a !important;
}

body.theme-dark .favorite-product-actions {
    border-top-color: rgba(148, 163, 184, 0.22) !important;
}

body.theme-dark #storeProductsList .store-product-item,
body.theme-dark .store-product-item {
    background-color: #111827 !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35) !important;
}

body.theme-dark #storeProductsList .product-image-container-small,
body.theme-dark .product-image-container-small {
    background-color: #1f2937 !important;
}

body.theme-dark #storeProductsList .product-name,
body.theme-dark .store-product-item .product-name {
    color: #ffffff !important;
}

body.theme-dark .product-detail-info h2,
body.theme-dark .product-details-fullscreen h2 {
    color: #ffffff !important;
}

body.theme-dark .product-detail-description h3 {
    color: #ffffff !important;
}

body.theme-dark .product-detail-description p {
    color: #94a3b8 !important;
}

body.theme-dark .product-detail-category h3 {
    color: #ffffff !important;
}

body.theme-dark .product-detail-store,
body.theme-dark .product-store-title-inline,
body.theme-dark .product-store-name-inline,
body.theme-dark .product-store-actions span {
    color: #f8fafc !important;
}

body.theme-dark .product-store-link-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1)) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

body.theme-dark .product-store-link-btn span,
body.theme-dark .product-store-link-btn i {
    color: #f8fafc !important;
}

body.theme-dark .product-jump-feedback-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1)) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #f8fafc !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.38) !important;
}

body.theme-dark .product-jump-feedback-btn span,
body.theme-dark .product-jump-feedback-btn i {
    color: #f8fafc !important;
}

body.theme-dark .view-in-channel-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)) !important;
    border-color: rgba(255, 255, 255, 0.34) !important;
    color: #f8fafc !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

body.theme-dark .product-detail-store {
    background: linear-gradient(135deg, rgba(32, 32, 36, 0.68), rgba(18, 18, 22, 0.58)) !important;
    backdrop-filter: blur(30px) saturate(180%) contrast(110%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(110%) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 15px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

body.theme-dark .store-details-header,
body.theme-dark #storeDetailsHeader {
    background: #111827 !important;
    border-bottom-color: rgba(148, 163, 184, 0.22) !important;
    color: #e5e7eb !important;
}

body.theme-dark .store-details-header h2,
body.theme-dark .store-details-name,
body.theme-dark .store-description-text,
body.theme-dark .store-province-text,
body.theme-dark .store-description-toggle,
body.theme-dark .store-header-btn.btn-channel {
    color: #f8fafc !important;
}

body.theme-dark .passage-wholesale-story-title,
body.theme-dark .passage-retail-story-title {
    color: #ffffff !important;
}

body.theme-dark .passage-store-name,
body.theme-dark .passage-store-description {
    color: #ffffff !important;
}

body.theme-dark .store-channel-subtle,
body.theme-dark .copyable-channel-id,
body.theme-dark .channel-id-text,
body.theme-dark .channel-copy-icon {
    color: #ffffff !important;
}

body.theme-dark .store-province-badge {
    background: #fff1f2 !important;
    color: #ef4444 !important;
    border: 1px solid #ffe4e6 !important;
}

body.theme-dark .store-province-text {
    color: #ef4444 !important;
}

body.theme-dark .store-details-identity,
body.theme-dark .store-details-top-row,
body.theme-dark .store-details-cta {
    background: transparent !important;
}

body.theme-dark .store-description-block,
body.theme-dark .owner-store-description-editor {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.theme-dark #storeModal,
body.theme-dark #productModal,
body.theme-dark #storeModal .fullscreen-modal-content,
body.theme-dark #productModal .fullscreen-modal-content,
body.theme-dark .store-register-intro,
body.theme-dark .store-form-container {
    background: #111827 !important;
    color: #f8fafc !important;
}

body.theme-dark .store-register-intro h3,
body.theme-dark .store-register-intro p,
body.theme-dark .form-section-title,
body.theme-dark .form-hint,
body.theme-dark .warning-text h4,
body.theme-dark .warning-text p,
body.theme-dark .terms-text {
    color: #f8fafc !important;
}

body.theme-dark .form-section-title {
    border-bottom-color: rgba(148, 163, 184, 0.24) !important;
}

body.theme-dark .store-type-card,
body.theme-dark .store-type-button,
body.theme-dark .contact-request-box,
body.theme-dark .warning-box,
body.theme-dark .terms-box,
body.theme-dark .contact-btn {
    background: #1f2937 !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #ffffff !important;
}

body.theme-dark .store-type-card h4,
body.theme-dark .store-type-card p,
body.theme-dark .contact-status,
body.theme-dark .contact-btn i,
body.theme-dark .submit-store-btn i,
body.theme-dark .terms-link,
body.theme-dark .warning-icon,
body.theme-dark .terms-icon,
body.theme-dark .store-type-card i {
    color: #ffffff !important;
}

body.theme-dark .contact-btn:hover,
body.theme-dark .submit-store-btn:hover {
    background: #374151 !important;
}

body.theme-dark .submit-store-btn {
    background: #2196f3 !important;
    border-color: #2196f3 !important;
    color: #ffffff !important;
}

body.theme-dark .submit-store-btn:hover {
    background: #0b7dda !important;
    border-color: #0b7dda !important;
}

body.theme-dark #storeModal .input-with-icon input,
body.theme-dark #storeModal .select-with-icon select,
body.theme-dark #storeModal .form-control,
body.theme-dark #storeModal textarea,
body.theme-dark #storeModal select,
body.theme-dark #storeModal input[type="file"],
body.theme-dark #productModal input,
body.theme-dark #productModal textarea,
body.theme-dark #productModal select,
body.theme-dark #productModal input[type="file"] {
    background: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.34) !important;
}

body.theme-dark #storeModal .input-with-icon input::placeholder,
body.theme-dark #productModal input::placeholder {
    color: #cbd5e1 !important;
}

body.theme-dark #storeModal textarea::placeholder,
body.theme-dark #productModal textarea::placeholder,
body.theme-dark #storeModal select,
body.theme-dark #storeModal .form-group label,
body.theme-dark #productModal .form-group label,
body.theme-dark #productModal .checkbox-label,
body.theme-dark #productModal .info-text,
body.theme-dark #productModal .info-text p,
body.theme-dark #storeModal .form-control option {
    color: #e5e7eb !important;
}

body.theme-dark #productModal .info-box {
    background: #1f2937 !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
}

body.theme-dark #productModal .info-icon {
    color: #ffffff !important;
}

body.theme-dark #storeModal .input-icon {
    color: #cbd5e1 !important;
}

body.theme-dark #storeModal .terms-box,
body.theme-dark #storeModal .warning-box,
body.theme-dark #storeModal .contact-request-box {
    box-shadow: none !important;
}

/* Explicit light-mode reset for recently customized sections */
body.theme-light .product-detail-description h3 {
    color: #555 !important;
}

body.theme-light .product-detail-description p {
    color: #666 !important;
}

body.theme-light .product-detail-category h3 {
    color: #555 !important;
}

body.theme-light .store-header-btn.btn-chat .store-chat-label,
body.theme-light .store-header-btn.btn-chat .chat-btn-icon {
    color: #111827 !important;
}
