/*
 * TUNÇKOL Journal3 2026 Luxury Trust Dark/Light Toggle V3
 * Safe visual override for OpenCart 3.x + Journal3 storefront.
 * It activates only when html[data-tk-theme="dark"] is present.
 */

:root {
  --tk-toggle-z: 999999;
  --tk-toggle-radius: 999px;
}

html[data-tk-theme="dark"] {
  color-scheme: dark;
  --tk-bg: #07111f;
  --tk-bg-soft: #0b1628;
  --tk-surface: #0f1b2d;
  --tk-surface-2: #122033;
  --tk-surface-3: #172943;
  --tk-border: rgba(255,255,255,.10);
  --tk-border-strong: rgba(217,181,109,.32);
  --tk-text: #f6f7fb;
  --tk-text-soft: #d9deea;
  --tk-muted: #aeb7c8;
  --tk-muted-2: #7f8da5;
  --tk-gold: #d9b56d;
  --tk-gold-2: #f0d99a;
  --tk-green: #2fc27b;
  --tk-danger: #ff7373;
  --tk-shadow: 0 18px 55px rgba(0,0,0,.44);
  --tk-shadow-soft: 0 12px 35px rgba(0,0,0,.30);
}

html[data-tk-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(217,181,109,.10), transparent 34rem),
    linear-gradient(180deg, #07111f 0%, #0a1424 45%, #07111f 100%) !important;
  color: var(--tk-text) !important;
}

/* Core surfaces */
html[data-tk-theme="dark"] .site-wrapper,
html[data-tk-theme="dark"] .page,
html[data-tk-theme="dark"] .journal-loading-overlay,
html[data-tk-theme="dark"] #content,
html[data-tk-theme="dark"] .container,
html[data-tk-theme="dark"] .main-products,
html[data-tk-theme="dark"] .checkout,
html[data-tk-theme="dark"] .account-page,
html[data-tk-theme="dark"] .information-page {
  color: var(--tk-text);
}

/* Header, menu and navigation */
html[data-tk-theme="dark"] header,
html[data-tk-theme="dark"] .header,
html[data-tk-theme="dark"] .journal-header,
html[data-tk-theme="dark"] .top-bar,
html[data-tk-theme="dark"] .desktop-main-menu,
html[data-tk-theme="dark"] .mobile-main-menu,
html[data-tk-theme="dark"] .menu-dropdown,
html[data-tk-theme="dark"] .mega-menu,
html[data-tk-theme="dark"] .mobile-menu,
html[data-tk-theme="dark"] .mobile-wrapper,
html[data-tk-theme="dark"] .mobile-header,
html[data-tk-theme="dark"] .sticky-header,
html[data-tk-theme="dark"] .dropdown-menu {
  background: rgba(15,27,45,.96) !important;
  color: var(--tk-text) !important;
  border-color: var(--tk-border) !important;
  box-shadow: var(--tk-shadow-soft);
  backdrop-filter: blur(14px);
}

html[data-tk-theme="dark"] header a,
html[data-tk-theme="dark"] .header a,
html[data-tk-theme="dark"] .journal-header a,
html[data-tk-theme="dark"] .main-menu a,
html[data-tk-theme="dark"] .dropdown-menu a,
html[data-tk-theme="dark"] .mobile-menu a,
html[data-tk-theme="dark"] .breadcrumb a {
  color: var(--tk-text-soft) !important;
}

html[data-tk-theme="dark"] header a:hover,
html[data-tk-theme="dark"] .header a:hover,
html[data-tk-theme="dark"] .journal-header a:hover,
html[data-tk-theme="dark"] .main-menu a:hover,
html[data-tk-theme="dark"] .dropdown-menu a:hover,
html[data-tk-theme="dark"] .mobile-menu a:hover {
  color: var(--tk-gold-2) !important;
}

/* Cards, boxes, modules */
html[data-tk-theme="dark"] .module,
html[data-tk-theme="dark"] .module-products,
html[data-tk-theme="dark"] .module-categories,
html[data-tk-theme="dark"] .module-title,
html[data-tk-theme="dark"] .box,
html[data-tk-theme="dark"] .panel,
html[data-tk-theme="dark"] .well,
html[data-tk-theme="dark"] .category-info,
html[data-tk-theme="dark"] .product-info,
html[data-tk-theme="dark"] .product-details,
html[data-tk-theme="dark"] .product-options,
html[data-tk-theme="dark"] .product-tabs,
html[data-tk-theme="dark"] .cart-content,
html[data-tk-theme="dark"] .cart-totals,
html[data-tk-theme="dark"] .checkout-section,
html[data-tk-theme="dark"] .quick-checkout,
html[data-tk-theme="dark"] .journal-popup,
html[data-tk-theme="dark"] .modal-content,
html[data-tk-theme="dark"] .popup-wrapper,
html[data-tk-theme="dark"] .side-column,
html[data-tk-theme="dark"] .filter,
html[data-tk-theme="dark"] .manufacturer,
html[data-tk-theme="dark"] .blog-post,
html[data-tk-theme="dark"] .article {
  background: linear-gradient(180deg, rgba(18,32,51,.98), rgba(13,24,40,.98)) !important;
  color: var(--tk-text) !important;
  border-color: var(--tk-border) !important;
  box-shadow: var(--tk-shadow-soft);
}

/* Product cards */
html[data-tk-theme="dark"] .product-thumb,
html[data-tk-theme="dark"] .product-layout .product-thumb,
html[data-tk-theme="dark"] .product-grid .product-thumb,
html[data-tk-theme="dark"] .product-list .product-thumb,
html[data-tk-theme="dark"] .swiper-slide .product-thumb {
  background: linear-gradient(180deg, rgba(18,32,51,.99), rgba(11,22,40,.99)) !important;
  border: 1px solid var(--tk-border) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.26) !important;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

html[data-tk-theme="dark"] .product-thumb:hover,
html[data-tk-theme="dark"] .product-layout .product-thumb:hover {
  transform: translateY(-3px);
  border-color: var(--tk-border-strong) !important;
  box-shadow: 0 24px 55px rgba(0,0,0,.38) !important;
}

html[data-tk-theme="dark"] .product-thumb .caption,
html[data-tk-theme="dark"] .product-thumb .name,
html[data-tk-theme="dark"] .product-thumb .description,
html[data-tk-theme="dark"] .product-thumb .stats,
html[data-tk-theme="dark"] .product-thumb .button-group {
  color: var(--tk-text-soft) !important;
}

html[data-tk-theme="dark"] .product-thumb .name a,
html[data-tk-theme="dark"] .product-title a,
html[data-tk-theme="dark"] h1,
html[data-tk-theme="dark"] h2,
html[data-tk-theme="dark"] h3,
html[data-tk-theme="dark"] h4,
html[data-tk-theme="dark"] .title,
html[data-tk-theme="dark"] .module-title span {
  color: var(--tk-text) !important;
}

html[data-tk-theme="dark"] .product-thumb .image,
html[data-tk-theme="dark"] .product-image {
  background: #ffffff !important;
}

/* Prices, badges, stock */
html[data-tk-theme="dark"] .price,
html[data-tk-theme="dark"] .product-price,
html[data-tk-theme="dark"] .price-new,
html[data-tk-theme="dark"] .price-wrapper,
html[data-tk-theme="dark"] .cart-total {
  color: var(--tk-gold-2) !important;
  text-shadow: 0 0 20px rgba(217,181,109,.18);
}

html[data-tk-theme="dark"] .price-old,
html[data-tk-theme="dark"] .price-tax,
html[data-tk-theme="dark"] .product-stats,
html[data-tk-theme="dark"] .text-muted,
html[data-tk-theme="dark"] small,
html[data-tk-theme="dark"] .help,
html[data-tk-theme="dark"] .help-block {
  color: var(--tk-muted) !important;
}

html[data-tk-theme="dark"] .label,
html[data-tk-theme="dark"] .badge,
html[data-tk-theme="dark"] .product-label,
html[data-tk-theme="dark"] .stock,
html[data-tk-theme="dark"] .in-stock {
  border-color: var(--tk-border) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
}

/* Buttons */
html[data-tk-theme="dark"] .btn,
html[data-tk-theme="dark"] button,
html[data-tk-theme="dark"] input[type="button"],
html[data-tk-theme="dark"] input[type="submit"],
html[data-tk-theme="dark"] .button,
html[data-tk-theme="dark"] .btn-cart,
html[data-tk-theme="dark"] .btn-primary,
html[data-tk-theme="dark"] .product-thumb .button-group a {
  border-radius: 999px !important;
  border-color: rgba(217,181,109,.34) !important;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

html[data-tk-theme="dark"] .btn-cart,
html[data-tk-theme="dark"] .btn-primary,
html[data-tk-theme="dark"] button[type="submit"],
html[data-tk-theme="dark"] #button-cart,
html[data-tk-theme="dark"] .quick-checkout-button-confirm,
html[data-tk-theme="dark"] .checkout-button {
  background: linear-gradient(135deg, #d9b56d, #f0d99a) !important;
  color: #101827 !important;
  border-color: #f0d99a !important;
  box-shadow: 0 14px 32px rgba(217,181,109,.28) !important;
  font-weight: 700 !important;
}

html[data-tk-theme="dark"] .btn-cart:hover,
html[data-tk-theme="dark"] .btn-primary:hover,
html[data-tk-theme="dark"] button[type="submit"]:hover,
html[data-tk-theme="dark"] #button-cart:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(217,181,109,.38) !important;
}

html[data-tk-theme="dark"] .btn-default,
html[data-tk-theme="dark"] .btn-secondary,
html[data-tk-theme="dark"] .button-group a:not(.btn-cart) {
  background: rgba(255,255,255,.06) !important;
  color: var(--tk-text-soft) !important;
  border-color: var(--tk-border) !important;
}

/* Forms */
html[data-tk-theme="dark"] input,
html[data-tk-theme="dark"] select,
html[data-tk-theme="dark"] textarea,
html[data-tk-theme="dark"] .form-control,
html[data-tk-theme="dark"] .input-group-addon {
  background: rgba(7,17,31,.88) !important;
  color: var(--tk-text) !important;
  border-color: var(--tk-border) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

html[data-tk-theme="dark"] input:focus,
html[data-tk-theme="dark"] select:focus,
html[data-tk-theme="dark"] textarea:focus,
html[data-tk-theme="dark"] .form-control:focus {
  border-color: rgba(217,181,109,.72) !important;
  box-shadow: 0 0 0 3px rgba(217,181,109,.16) !important;
}

html[data-tk-theme="dark"] ::placeholder {
  color: var(--tk-muted-2) !important;
}

/* Tables, checkout, account */
html[data-tk-theme="dark"] table,
html[data-tk-theme="dark"] .table,
html[data-tk-theme="dark"] .table-bordered,
html[data-tk-theme="dark"] .cart-table,
html[data-tk-theme="dark"] .compare-table,
html[data-tk-theme="dark"] .checkout-cart {
  background: var(--tk-surface) !important;
  color: var(--tk-text-soft) !important;
  border-color: var(--tk-border) !important;
}

html[data-tk-theme="dark"] table tr,
html[data-tk-theme="dark"] .table tr,
html[data-tk-theme="dark"] table td,
html[data-tk-theme="dark"] table th,
html[data-tk-theme="dark"] .table td,
html[data-tk-theme="dark"] .table th {
  background: transparent !important;
  color: var(--tk-text-soft) !important;
  border-color: var(--tk-border) !important;
}

html[data-tk-theme="dark"] thead,
html[data-tk-theme="dark"] .table thead {
  background: rgba(217,181,109,.10) !important;
}

/* Breadcrumbs, pagination, tabs */
html[data-tk-theme="dark"] .breadcrumb,
html[data-tk-theme="dark"] .pagination,
html[data-tk-theme="dark"] .nav-tabs,
html[data-tk-theme="dark"] .tabs-container {
  background: rgba(18,32,51,.72) !important;
  border-color: var(--tk-border) !important;
  color: var(--tk-muted) !important;
}

html[data-tk-theme="dark"] .nav-tabs > li > a,
html[data-tk-theme="dark"] .pagination > li > a,
html[data-tk-theme="dark"] .pagination > li > span {
  background: rgba(255,255,255,.05) !important;
  color: var(--tk-text-soft) !important;
  border-color: var(--tk-border) !important;
}

html[data-tk-theme="dark"] .nav-tabs > li.active > a,
html[data-tk-theme="dark"] .pagination > .active > span,
html[data-tk-theme="dark"] .pagination > .active > a {
  background: linear-gradient(135deg, #d9b56d, #f0d99a) !important;
  color: #101827 !important;
}

/* Notifications and alerts */
html[data-tk-theme="dark"] .alert,
html[data-tk-theme="dark"] .notification,
html[data-tk-theme="dark"] .toast,
html[data-tk-theme="dark"] .journal-notification {
  background: rgba(18,32,51,.96) !important;
  color: var(--tk-text) !important;
  border-color: var(--tk-border-strong) !important;
  box-shadow: var(--tk-shadow);
}

/* Footer */
html[data-tk-theme="dark"] footer,
html[data-tk-theme="dark"] .footer,
html[data-tk-theme="dark"] .footer-top,
html[data-tk-theme="dark"] .footer-bottom {
  background: #07111f !important;
  color: var(--tk-muted) !important;
  border-color: var(--tk-border) !important;
}

html[data-tk-theme="dark"] footer a,
html[data-tk-theme="dark"] .footer a {
  color: var(--tk-text-soft) !important;
}

html[data-tk-theme="dark"] footer a:hover,
html[data-tk-theme="dark"] .footer a:hover {
  color: var(--tk-gold-2) !important;
}

/* Fixed toggle */
#tk-theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: var(--tk-toggle-z);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: var(--tk-toggle-radius);
  background: rgba(255,255,255,.94);
  color: #111827;
  box-shadow: 0 14px 42px rgba(15,23,42,.18);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(14px);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

#tk-theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(15,23,42,.26);
}

#tk-theme-toggle .tk-theme-toggle-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
}

#tk-theme-toggle .tk-theme-toggle-text {
  white-space: nowrap;
}

html[data-tk-theme="dark"] #tk-theme-toggle {
  background: rgba(15,27,45,.94);
  color: var(--tk-text);
  border-color: rgba(217,181,109,.42);
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
}

html[data-tk-theme="dark"] #tk-theme-toggle .tk-theme-toggle-icon {
  background: linear-gradient(135deg, #d9b56d, #f0d99a);
  color: #101827;
}

@media (max-width: 768px) {
  #tk-theme-toggle {
    right: 12px;
    bottom: 76px;
    min-height: 42px;
    padding: 0 12px;
    font-size: 12px;
  }

  #tk-theme-toggle .tk-theme-toggle-icon {
    width: 24px;
    height: 24px;
  }

  #tk-theme-toggle .tk-theme-toggle-text {
    max-width: 94px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media print {
  #tk-theme-toggle {
    display: none !important;
  }
}
