/* ============================================
   SUNMOON THEME - День и Ночь
   Солнце и Луна - Светлая и Тёмная тема
   ============================================ */

/* CSS Variables - Light Theme (Day) */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-top-bar: #1e293b;
  --bg-header: #ffffff;
  --bg-search: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #ffffff;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-light: rgba(79, 70, 229, 0.1);
  --success: #22c55e;
  --border: #e2e8f0;
  --shadow: rgba(0,0,0,0.08);
  --shadow-lg: rgba(0,0,0,0.15);
  --star-opacity: 0;
  --transition: 0.3s ease;
  --radius: 12px;
  --radius-sm: 8px;
}

/* Dark Theme (Night) */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-top-bar: #020617;
  --bg-header: #1e293b;
  --bg-search: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-light: #ffffff;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-light: rgba(129, 140, 248, 0.15);
  --border: #334155;
  --shadow: rgba(0,0,0,0.3);
  --shadow-lg: rgba(0,0,0,0.5);
  --star-opacity: 1;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
}

/* Stars Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: var(--star-opacity);
  background-image: 
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 20% 50%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 30% 10%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 50% 30%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 60% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 70% 20%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 80% 90%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 90% 40%, rgba(255,255,255,0.7), transparent);
  background-size: 100% 100%;
  animation: twinkle 6s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: var(--star-opacity); }
  50% { opacity: calc(var(--star-opacity) * 0.5); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-weight: 600;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

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

a:hover {
  color: var(--accent-hover);
}

/* ============================================
   TOP BAR
   ============================================ */
#top {
  background: var(--bg-top-bar);
  color: var(--text-light);
  padding: 12px 0;
  font-size: 14px;
}

.top-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Contacts - Large */
.top-left {
  display: flex;
  align-items: center;
}

.top-contacts {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-phone, .top-email {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 16px;
  font-weight: 600;
  transition: all var(--transition);
}

.top-phone:hover, .top-email:hover {
  color: var(--accent);
}

.top-phone i, .top-email i {
  font-size: 18px;
  color: var(--accent);
}

/* Theme Toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px;
}

.theme-toggle i {
  font-size: 18px;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

#theme-icon-sun { color: #fbbf24; }
#theme-icon-moon { color: rgba(255,255,255,0.5); }

[data-theme="dark"] #theme-icon-sun { color: rgba(255,255,255,0.4); }
[data-theme="dark"] #theme-icon-moon { color: #a5b4fc; }

.theme-switch {
  position: relative;
  width: 50px;
  height: 26px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 26px;
  transition: var(--transition);
}

.theme-switch label::before {
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}

.theme-switch input:checked + label {
  background: var(--accent);
}

.theme-switch input:checked + label::before {
  transform: translateX(24px);
}

/* Right Side: Wishlist, Language, Currency, Cart - all on one line */
.top-right {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.top-right > * {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.top-wishlist {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 14px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
  height: auto;
}

.top-wishlist:hover {
  color: var(--text-light);
  background: rgba(255,255,255,0.2);
  text-decoration: none;
}

.top-wishlist i {
  color: #ef4444;
  font-size: 16px;
  margin: 0;
}

/* Language and Currency - aligned with other buttons */
.language-selector,
.currency-selector {
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

#top .btn-link {
  color: var(--text-light) !important;
  padding: 8px 14px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  height: auto !important;
  background: rgba(255,255,255,0.1) !important;
  border-radius: var(--radius-sm) !important;
  margin: 0 !important;
  transition: all var(--transition) !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  white-space: nowrap;
}

#top .btn-link:hover {
  color: var(--text-light) !important;
  background: rgba(255,255,255,0.2) !important;
  text-decoration: none !important;
}

#top .btn-link img {
  margin: 0;
}

#top .dropdown-menu {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 120px;
}

#top .dropdown-menu li a {
  padding: 10px 15px;
  color: var(--text-primary);
  font-size: 14px;
}

#top .dropdown-menu li a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ============================================
   HEADER
   ============================================ */
header {
  background: var(--bg-header);
  padding: 20px 0;
  box-shadow: 0 2px 15px var(--shadow);
}

.header-main {
  display: flex;
  align-items: center;
}

.col-logo {
  display: flex;
  align-items: center;
}

#logo img {
  max-height: 50px;
  width: auto;
}

#logo h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

#logo h1 a {
  color: var(--accent);
}

.col-actions {
  display: flex;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Auth Buttons - Unified Style */
.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.action-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-light);
}

.action-btn i {
  font-size: 16px;
}

/* ============================================
   CART - Highlighted Style
   ============================================ */
.cart-wrapper {
  margin-left: 10px;
}

#cart {
  position: relative;
}

#cart > .btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

#cart > .btn:hover {
  background: linear-gradient(135deg, #5b21b6 0%, var(--accent-hover) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

#cart > .btn i {
  font-size: 18px;
}

#cart.open > .btn {
  background: linear-gradient(135deg, #5b21b6 0%, var(--accent-hover) 100%);
}

#cart .cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   SEARCH BAR
   ============================================ */
#search-bar {
  background: var(--bg-search);
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

#search-bar .input-group {
  position: relative;
  display: flex;
  width: 100%;
}

#search-bar #search {
  width: 100%;
  display: flex;
}

#search-bar #search .form-control {
  width: 100%;
  height: 56px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0 60px 0 25px;
  font-weight: 400;
  transition: border-color var(--transition);
}

#search-bar #search .form-control:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: none;
}

#search-bar #search .form-control::placeholder {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
}

/* ============================================
   CATEGORIES BLOCK
   ============================================ */
#categories-block {
  background: var(--bg-secondary);
  padding: 25px 0;
  transition: padding var(--transition);
}

#categories-block.with-sticky {
  padding-top: 25px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.category-card {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-lg);
  background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 100%);
}

.category-icon {
  font-size: 32px;
  color: var(--text-light);
}

.category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.3;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-thumb {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.product-thumb:hover {
  box-shadow: 0 15px 40px var(--shadow-lg);
  transform: translateY(-8px);
  border-color: var(--accent);
}

.product-thumb .image {
  padding: 20px;
  text-align: center;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.product-thumb .image img {
  max-width: 100%;
  height: auto;
  transition: transform var(--transition);
}

.product-thumb:hover .image img {
  transform: scale(1.1);
}

.product-thumb .caption {
  padding: 20px;
}

.product-thumb .caption h4 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.product-thumb .caption h4 a {
  color: var(--text-primary);
}

.product-thumb .caption h4 a:hover {
  color: var(--accent);
}

.product-thumb .description {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.product-thumb .price {
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.product-thumb .price-old {
  color: var(--text-secondary);
  text-decoration: line-through;
  font-size: 14px;
  margin-left: 10px;
  font-weight: 400;
}

.product-thumb .button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.product-thumb .button-group .btn {
  flex: 1;
  padding: 12px;
  font-size: 14px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background: var(--accent);
  border: none;
  padding: 12px 25px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-light);
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px var(--shadow);
}

.btn-default {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.btn-default:hover {
  background: var(--accent);
  color: var(--text-light);
  border-color: var(--accent);
}

.btn-success {
  background: #22c55e;
  border: none;
  border-radius: var(--radius-sm);
}

.btn-success:hover {
  background: #16a34a;
}

.btn-danger {
  background: #ef4444;
  border: none;
  border-radius: var(--radius-sm);
}

.btn-danger:hover {
  background: #dc2626;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg-top-bar);
  color: var(--text-light);
  padding: 60px 0 30px;
  margin-top: 60px;
}

footer h5 {
  color: var(--text-light);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  margin-bottom: 12px;
}

footer ul li a {
  color: rgba(255,255,255,0.7);
  transition: all var(--transition);
  font-size: 14px;
}

footer ul li a:hover {
  color: var(--accent);
  padding-left: 5px;
}

footer hr {
  border-color: rgba(255,255,255,0.1);
  margin: 40px 0 20px;
}

footer .powered {
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}

footer .powered a {
  color: var(--accent);
  font-weight: 500;
}

footer .powered a:hover {
  color: var(--text-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
  .top-contacts {
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .top-phone, .top-email {
    font-size: 14px;
  }
  
  .header-main {
    flex-wrap: wrap;
  }
  
  .col-logo {
    width: 50%;
  }
  
  .col-actions {
    width: 50%;
  }
  
  .action-text {
    display: none;
  }
  
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  
  .category-card {
    padding: 15px 8px;
  }
  
  .category-icon {
    font-size: 24px;
  }
  
  .category-name {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  #top {
    padding: 10px 0;
  }
  
  .top-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .top-row > div {
    width: 100%;
    text-align: center !important;
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .top-contacts {
    justify-content: center;
    gap: 15px;
  }
  
  .top-wishlist .wishlist-text {
    display: none;
  }
  
  .theme-toggle {
    margin: 5px 0;
  }
  
  #logo img {
    max-height: 40px;
  }
  
  #search-bar #search input {
    height: 50px;
    font-size: 14px;
  }
  
  .header-actions {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }
  
  .action-btn {
    padding: 8px 12px;
  }
  
  #cart > .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .cart-wrapper {
    margin-left: 0;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .category-card {
    padding: 12px 6px;
  }
  
  footer {
    text-align: center;
    padding: 40px 0 20px;
  }
  
  footer .col-sm-3 {
    margin-bottom: 25px;
  }
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  margin-bottom: 25px;
}

.breadcrumb > li a {
  color: var(--text-secondary);
}

.breadcrumb > .active {
  color: var(--text-primary);
}

/* ============================================
   PANELS & FORMS
   ============================================ */
.panel {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.panel-heading {
  border-radius: var(--radius) var(--radius) 0 0;
}

.form-control {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  transition: all var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  border-radius: var(--radius-sm);
  border: none;
}

.alert-success { background: #22c55e; color: #fff; }
.alert-danger { background: #ef4444; color: #fff; }
.alert-warning { background: #f59e0b; color: #fff; }
.alert-info { background: #3b82f6; color: #fff; }

/* ============================================
   TABLES
   ============================================ */
.table {
  background: var(--bg-primary);
}

.table > thead > tr > th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
}

.table > tbody > tr > td {
  border-color: var(--border);
}

/* ============================================
   WELLS
   ============================================ */
.well {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
  background: var(--bg-primary);
  border: none;
  border-radius: var(--radius);
}

.modal-header {
  border-bottom: 1px solid var(--border);
}

.modal-footer {
  border-top: 1px solid var(--border);
}

/* ============================================
   Additional Category Colors
   ============================================ */
.category-food { background: linear-gradient(135deg, #f59e0b, #d97706); }
.category-clothing { background: linear-gradient(135deg, #ec4899, #be185d); }
.category-home { background: linear-gradient(135deg, #10b981, #059669); }
.category-health { background: linear-gradient(135deg, #ef4444, #dc2626); }
.category-transport { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.category-tech { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.category-education { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.category-work { background: linear-gradient(135deg, #64748b, #475569); }
.category-sport { background: linear-gradient(135deg, #22c55e, #16a34a); }
.category-entertainment { background: linear-gradient(135deg, #f97316, #ea580c); }
.category-pets { background: linear-gradient(135deg, #a855f7, #9333ea); }
.category-services { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* ============================================
   STICKY TOP BAR
   ============================================ */
/* ============================================
   HEADER - not sticky
   ============================================ */
#top-sticky {
  transition: all var(--transition);
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
#scroll-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-light);
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scroll-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

#scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   RESPONSIVE UPDATES
   ============================================ */
@media (max-width: 991px) {
  .top-contacts {
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .top-phone, .top-email {
    font-size: 14px;
  }
  
  .header-main {
    flex-wrap: wrap;
  }
  
  .col-logo {
    width: 50%;
  }
  
  .col-actions {
    width: 50%;
  }
  
  .action-text {
    display: none;
  }
  
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  
  .category-card {
    padding: 15px 8px;
  }
  
  .category-icon {
    font-size: 24px;
  }
  
  .category-name {
    font-size: 12px;
  }
  
  #scroll-top {
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 767px) {
  #top {
    padding: 10px 0;
  }
  
  .top-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .top-row > div {
    width: 100%;
    text-align: center !important;
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .top-contacts {
    justify-content: center;
    gap: 15px;
  }
  
  .top-wishlist .wishlist-text {
    display: none;
  }
  
  .theme-toggle {
    margin: 5px 0;
  }
  
  #logo img {
    max-height: 40px;
  }
  
  #search-bar #search .form-control {
    height: 50px;
    padding: 0 55px 0 20px;
    font-size: 12px;
  }
  
  #search-bar #search .form-control::placeholder {
    font-size: 11px;
  }
  
  .header-actions {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }
  
  .action-btn {
    padding: 8px 12px;
  }
  
  #cart > .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .cart-wrapper {
    margin-left: 0;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .category-card {
    padding: 12px 6px;
  }
  
  #top-sticky.fixed + header {
    margin-top: 180px;
  }
  
  #scroll-top {
    bottom: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  footer {
    text-align: center;
    padding: 40px 0 20px;
  }
  
  footer .col-sm-3 {
    margin-bottom: 25px;
  }
}

/* Language and Currency Selectors */
.language-selector,
.currency-selector {
  display: inline-block;
}

.language-selector .btn-link img,
.currency-selector .btn-link strong {
  margin-right: 6px;
}

.language-selector .dropdown-menu li,
.currency-selector .dropdown-menu li {
  border-bottom: 1px solid var(--border);
}

.language-selector .dropdown-menu li:last-child,
.currency-selector .dropdown-menu li:last-child {
  border-bottom: none;
}

/* ============================================
   EXTERNAL CATEGORY LINK
   ============================================ */
.category-external {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  position: relative;
}

.category-external:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.category-external .fa-external-link {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  opacity: 0.7;
  color: rgba(255,255,255,0.8);
}

/* ============================================
   SHINING STARS BUTTON (Desktop Only)
   ============================================ */
#shining-stars-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f59e0b 100%);
  background-size: 200% 200%;
  color: #fff;
  padding: 15px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 5px 30px rgba(139, 92, 246, 0.5);
  z-index: 998;
  transition: all 0.3s ease;
  animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite;
  overflow: hidden;
}

#shining-stars-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  animation: shimmer 2s ease-in-out infinite;
}

#shining-stars-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.7);
}

.stars-icon {
  font-size: 24px;
  animation: starSpin 3s ease-in-out infinite;
}

.stars-text {
  line-height: 1.2;
  white-space: nowrap;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 5px 30px rgba(139, 92, 246, 0.5); }
  50% { box-shadow: 0 5px 40px rgba(236, 72, 153, 0.8), 0 0 60px rgba(245, 158, 11, 0.4); }
}

@keyframes shimmer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes starSpin {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(15deg); }
  50% { transform: scale(1) rotate(0deg); }
  75% { transform: scale(1.2) rotate(-15deg); }
}

/* Desktop Only */
@media (max-width: 991px) {
  #shining-stars-btn {
    display: none !important;
  }
}

@media (min-width: 992px) {
  #shining-stars-btn {
    display: flex !important;
  }
}

/* ============================================
   CATEGORIES ACCORDION (Inner Pages)
   ============================================ */
.categories-collapsed {
  padding: 10px 0 !important;
}

.categories-wrapper {
  position: relative;
  display: inline-block;
}

#categories-toggler {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

#categories-toggler:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

#categories-toggler .fa-chevron-down {
  transition: transform var(--transition);
  font-size: 12px;
}

#categories-toggler.active .fa-chevron-down {
  transform: rotate(180deg);
}

.categories-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 500px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 40px var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition);
  z-index: 1000;
}

.categories-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.categories-dropdown-grid {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.category-card-sm {
  padding: 12px 8px !important;
}

.category-card-sm .category-icon {
  font-size: 22px !important;
}

.category-card-sm .category-name {
  font-size: 11px !important;
}

/* ============================================
   BREADCRUMBS - Beautiful & Tasty
   ============================================ */
.breadcrumb-wrapper {
  background: var(--bg-secondary);
  padding: 20px 0;
  margin-top: 30px;
  margin-bottom: 0;
}

.breadcrumb {
  margin: 0;
  padding: 14px 24px;
  border-radius: var(--radius);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(124, 77, 199, 0.85), rgba(156, 39, 176, 0.75));
  box-shadow: 0 4px 15px rgba(124, 77, 199, 0.3);
}

.breadcrumb > li {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
}

.breadcrumb > li a {
  color: #fff;
  text-decoration: none;
  transition: all var(--transition);
}

.breadcrumb > li a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.breadcrumb > li + li::before {
  content: '/';
  color: rgba(255, 255, 255, 0.6);
  margin: 0 12px;
  font-weight: 300;
}

.breadcrumb > .active {
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb i.fa-home {
  font-size: 18px;
  margin-right: 6px;
}

[data-theme="dark"] .breadcrumb {
  background: linear-gradient(135deg, rgba(124, 77, 199, 0.7), rgba(156, 39, 176, 0.6));
}

.breadcrumb > li + li::before {
  content: '/';
  color: var(--text-secondary);
  margin: 0 8px;
  font-weight: 300;
}

.breadcrumb > li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb > li a:hover {
  color: var(--accent);
}

.breadcrumb > .active {
  color: var(--accent);
  font-weight: 600;
}

.breadcrumb > li:first-child a {
  color: var(--accent);
}

.breadcrumb > li:first-child a:hover {
  color: var(--accent-hover);
}

/* ============================================
   LOGIN & REGISTER PAGES
   ============================================ */
.account-page {
  padding: 40px 0;
  min-height: 60vh;
}

.account-page .page-title {
  text-align: center;
  margin-bottom: 30px;
}

.account-page .page-title h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.account-page .page-title p {
  color: var(--text-secondary);
  font-size: 16px;
}

.account-form {
  max-width: 450px;
  margin: 0 auto;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 10px 40px var(--shadow);
}

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

.account-form .form-group label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}

.account-form .form-control {
  height: 50px;
  font-size: 16px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
}

.account-form .btn-primary {
  width: 100%;
  height: 50px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 10px;
}

.account-links {
  text-align: center;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.account-links a {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}

.account-links a:hover {
  text-decoration: underline;
}

/* Hide unnecessary elements on login/register */
.account-page .well,
.account-page .list-group,
.account-page .col-sm-5 {
  display: none !important;
}

/* Social login buttons */
.social-login {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.social-login p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-size: 14px;
}

/* Forgot password link */
.forgot-link {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 15px;
}

.forgot-link a {
  color: var(--accent);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 767px) {
  .account-form {
    padding: 25px 20px;
    margin: 0 15px;
  }
  
  .account-page .page-title h1 {
    font-size: 26px;
  }
  
  .categories-dropdown-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Logo Text */
.logo-text {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 2px;
  transition: all var(--transition);
}

.logo-text:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.logo-icon {
  font-size: 24px;
  margin-right: 8px;
}

[data-theme="dark"] .logo-text {
  color: var(--accent);
}

/* Top Cart in header - highlighted button */
.top-cart {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.top-cart .btn-group {
  display: inline-flex;
  margin: 0;
}

.top-cart #cart {
  margin: 0;
  display: inline-flex;
}

.top-cart .dropdown-toggle {
  background: var(--accent) !important;
  border: none !important;
  color: #fff !important;
  padding: 8px 14px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  height: auto !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  transition: all var(--transition) !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.top-cart .dropdown-toggle:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}

.top-cart .dropdown-toggle i {
  margin: 0;
  font-size: 16px;
}

.top-cart .dropdown-toggle span {
  font-weight: 600;
}

/* Header actions right aligned */
.header-actions-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
}

.site-slogan {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5a5a5a;
  text-shadow: 0 0 10px rgba(124, 77, 199, 0.5), 0 0 20px rgba(124, 77, 199, 0.3);
  white-space: nowrap;
  margin-right: 15px;
  animation: sloganGlow 2s ease-in-out infinite;
}

@keyframes sloganGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(124, 77, 199, 0.5), 0 0 20px rgba(124, 77, 199, 0.3), 0 0 30px rgba(124, 77, 199, 0.2);
  }
  50% {
    text-shadow: 0 0 15px rgba(124, 77, 199, 0.8), 0 0 30px rgba(124, 77, 199, 0.5), 0 0 45px rgba(124, 77, 199, 0.3);
  }
}

[data-theme="dark"] .site-slogan {
  color: #bbb;
  animation: sloganGlowDark 2s ease-in-out infinite;
}

@keyframes sloganGlowDark {
  0%, 100% {
    text-shadow: 0 0 10px rgba(124, 77, 199, 0.6), 0 0 20px rgba(124, 77, 199, 0.4), 0 0 30px rgba(124, 77, 199, 0.2);
  }
  50% {
    text-shadow: 0 0 15px rgba(124, 77, 199, 0.9), 0 0 30px rgba(124, 77, 199, 0.6), 0 0 45px rgba(124, 77, 199, 0.4);
  }
}

.header-actions-right .theme-toggle {
  display: none;
}

/* Header Categories */
.logo-categories-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.categories-menu-wrapper {
  position: relative;
}

.categories-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.categories-toggle-btn:hover,
.categories-toggle-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.categories-toggle-btn .fa-chevron-down {
  transition: transform var(--transition);
}

.categories-toggle-btn.active .fa-chevron-down {
  transform: rotate(180deg);
}

.categories-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 5px;
  min-width: 200px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
}

.categories-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.category-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition);
  border-bottom: 1px solid var(--border);
}

.category-menu-link:last-child {
  border-bottom: none;
}

.category-menu-link:hover {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

.category-menu-link .category-icon {
  font-size: 18px;
}

.col-logo-categories {
  display: flex;
  align-items: center;
}

@media (max-width: 767px) {
  .logo-categories-wrapper {
    gap: 10px;
  }
  
  .categories-toggle-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .categories-toggle-btn span {
    display: none;
  }
}

/* Search Form */
#search {
  position: relative;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all var(--transition);
  min-width: 0;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 46px;
}

.search-btn:hover {
  background: var(--accent-hover);
}

.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 5px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

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

.search-result-item:hover {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

.search-result-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.search-result-info {
  flex: 1;
}

.search-result-name {
  font-weight: 500;
  margin-bottom: 3px;
}

.search-result-price {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.search-no-result {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
}

@media (max-width: 576px) {
  .search-wrapper {
    flex-direction: column;
    gap: 5px;
  }
  
  .search-btn {
    width: 100%;
  }
}

/* Theme Toggle Floating Button */
.theme-toggle-floating {
  position: fixed;
  bottom: 76px;
  left: 20px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(124, 77, 199, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(124, 77, 199, 0.3);
  border: none;
  transition: all var(--transition);
}

.theme-toggle-floating:hover {
  background: rgba(124, 77, 199, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(124, 77, 199, 0.4);
}

.theme-toggle-floating i {
  font-size: 18px;
}

.theme-toggle-floating i {
  font-size: 20px;
  position: absolute;
  transition: all var(--transition);
}

#theme-icon-sun-float {
  opacity: 1;
}

#theme-icon-moon-float {
  opacity: 0;
}

[data-theme="dark"] #theme-icon-sun-float {
  opacity: 0;
}

[data-theme="dark"] #theme-icon-moon-float {
  opacity: 1;
}

/* Scroll to Top Button */
#scroll-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(124, 77, 199, 0.7);
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(124, 77, 199, 0.3);
}

#scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-top:hover {
  background: rgba(124, 77, 199, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(124, 77, 199, 0.4);
}

#scroll-top i {
  font-size: 18px;
}

/* Account Page Layout */
.account-page {
  padding: 20px 0 40px;
}

.account-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.account-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-section {
  border-bottom: 1px solid var(--border);
}

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

.sidebar-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px 20px 10px;
  margin: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  border-bottom: 1px solid var(--border);
}

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

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition);
}

.sidebar-menu a:hover {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

.sidebar-menu i {
  width: 20px;
  text-align: center;
  color: var(--text-secondary);
}

.sidebar-menu a:hover i {
  color: var(--accent);
}

.account-content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 991px) {
  .account-layout {
    flex-direction: column;
  }
  
  .account-sidebar {
    width: 100%;
  }
  
  .sidebar-section {
    display: inline-block;
    width: calc(50% - 10px);
    vertical-align: top;
    margin-right: 10px;
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  .sidebar-section {
    width: 100%;
    margin-right: 0;
  }
}

/* Slideshow Styles */
.slideshow {
  margin-bottom: 30px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
}

.slideshow .swiper-container {
  width: 100%;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(--accent) !important;
  opacity: 0.4 !important;
  box-shadow: 0 0 10px var(--accent);
  transition: all var(--transition);
}

.swiper-pagination-bullet-active {
  opacity: 1 !important;
  box-shadow: 0 0 15px var(--accent), 0 0 25px var(--accent);
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--accent);
}

/* Featured Products */
.featured-products {
  margin-top: 30px;
  margin-bottom: 30px;
}

.featured-products .products-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
}

.featured-products .product-layout {
  flex: 1;
  max-width: 25%;
}

.featured-products .product-thumb {
  height: 100%;
}

/* Home Content Spacing */
#common-home {
  padding-top: 30px;
}

#common-home > .row > * {
  margin-bottom: 20px;
}

#content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

#content > * {
  margin-bottom: 0 !important;
}

/* Account Page Spacing */
.account-page {
  padding-top: 10px;
  padding-bottom: 40px;
}

.account-page .breadcrumb {
  margin-bottom: 25px;
}

/* Page Container Spacing */
#information-information,
#account-account,
#account-success,
#account-login,
#account-register,
#account-edit,
#product-search,
#product-product,
#product-category,
.product-page,
.category-page {
  padding-top: 30px;
  padding-bottom: 40px;
}

#information-information .breadcrumb,
#account-account .breadcrumb,
#account-success .breadcrumb,
#account-login .breadcrumb,
#account-register .breadcrumb,
#account-edit .breadcrumb,
#product-search .breadcrumb,
#product-product .breadcrumb,
#product-category .breadcrumb,
.container > .breadcrumb {
  margin-bottom: 25px;
  margin-top: 10px;
}

/* Dark Theme Slideshow */
[data-theme="dark"] .slideshow {
  background: var(--bg-secondary);
}

[data-theme="dark"] .swiper-button-next,
[data-theme="dark"] .swiper-button-prev {
  color: var(--accent);
}
