/* styles.css
   Global theme variables, typography, header/navbar, footer,
   shared utilities (buttons, forms, modal theming)
*/

/* =========================================
   THEME VARIABLES
   ========================================= */
:root {
  /* Day Mode Colors */
  --bg-primary: #fefcf8;
  --text-primary: #2a2a2a;
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-text: #2a2a2a;
  --card-bg: #fff;
  --card-shadow: rgba(200, 160, 120, 0.05);
  --card-hover-shadow: rgba(255, 128, 0, 0.85);
  --accent-color: rgba(205, 127, 50, 0.85);
  --footer-bg: #111;
  --footer-text: #eee;
  --modal-bg: #fff;
  --modal-text: #2a2a2a;
  --border-color: #e0e0e0;
}

/* Night Mode Colors */
[data-theme="night"] {
  --bg-primary: #1a1a1a;
  --text-primary: #f0f0f0;
  --navbar-bg: rgba(26, 26, 26, 0.95);
  --navbar-text: #f0f0f0;
  --card-bg: #2d2d2d;
  --card-shadow: rgba(0, 0, 0, 0.3);
  --card-hover-shadow: rgba(205, 127, 50, 0.6);
  --accent-color: rgba(205, 127, 50, 0.85);
  --footer-bg: #0a0a0a;
  --footer-text: #ccc;
  --modal-bg: #2d2d2d;
  --modal-text: #f0f0f0;
  --border-color: #404040;
}

/* =========================================
   GLOBAL TYPOGRAPHY
   Force Century Gothic everywhere
   ========================================= */

* {
  font-family: "Century Gothic", "CenturyGothic", "Apple SD Gothic Neo", Arial, sans-serif !important;
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.section-title,
.footer-brand,
.contact-title,
.checkout-title {
  font-family: "Century Gothic", "CenturyGothic", "Apple SD Gothic Neo", Arial, sans-serif !important;
  font-weight: 700;
}

.btn,
.form-label,
.form-control,
.nav-link,
p,
li,
a {
  font-family: "Century Gothic", "CenturyGothic", "Apple SD Gothic Neo", Arial, sans-serif !important;
  font-weight: 400;
}

/* Base Page Colors */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global smooth scroll */
html {
  scroll-behavior: smooth;
}

/* =========================================
   NAVBAR / HEADER
   ========================================= */

/* Brand text follows current theme */
.navbar-brand {
  color: var(--navbar-text) !important;
  transition: color 0.3s ease;
}

/* Sticky & transparent navbar until scrolled */
.navbar {
  transition: all 0.3s ease;
  padding: 1rem 0;
  background: transparent;
}

/* All nav-links (anchors & buttons) use theme text color */
.navbar .nav-link {
  color: var(--navbar-text) !important;
  text-shadow: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.navbar.scrolled {
  background: var(--navbar-bg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .nav-link {
  color: var(--navbar-text) !important;
}

/* Glow / hover accent for important nav links */
.navbar .nav-link:hover {
  color: rgba(205, 127, 50, 0.85);
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.85);
}

/* Search icons in header */
#desktopSearch i,
#mobileSearch i {
  font-size: 1.2rem;
}

#desktopSearch:hover,
#mobileSearch:hover {
  color: var(--accent-color);
}

/* Header icon links */
.icon-link i {
  transition: transform 0.3s ease, color 0.3s ease;
}

.icon-link:hover i {
  transform: scale(1.1);
  color: #b06c15;
  /* deeper bronze on hover */
}

/* Theme Toggle Button (in navbar) */
.theme-toggle {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background-color: var(--accent-color);
  color: white;
  transform: scale(1.1);
}

/* Navbar mobile styles */
@media (max-width: 991.98px) {
  .navbar {
    background: var(--navbar-bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .navbar .nav-link {
    color: var(--navbar-text) !important;
    text-shadow: none;
  }

  .navbar-toggler {
    border-color: var(--border-color);
  }

  .navbar-toggler-icon {
    filter: invert(0);
  }
}

/* Night mode navbar toggler icon */
[data-theme="night"] .navbar-toggler-icon {
  filter: invert(1);
}

/* Fine-tune nav layout for mobile header items */
@media (max-width: 1024px) {
  .navbar-nav .nav-item {
    display: flex;
    justify-content: center;
  }

  /* ensure the toggle button itself doesn’t stretch full width */
  .navbar-nav .theme-toggle {
    width: auto;
    margin: 0;
  }
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
  margin-top: 2rem;
  padding: 1rem 0;
  background-color: var(--footer-bg);
  color: var(--footer-text);
}

.footer-brand {
  color: var(--accent-color);
  font-weight: bold;
  font-style: italic;
}

.section-heading {
  color: var(--accent-color);
}

.footer-link {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
}

.footer-link:hover {
  color: var(--accent-color);
}

.social-icon {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: rgba(205, 127, 50, 1);
}

.footer-slogan {
  font-family: "Century Gothic", "CenturyGothic", "Apple SD Gothic Neo", Arial, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.6);
  user-select: none;
}

/* newsletter / CTA style if you add a form */
.btn-subscribe {
  background-color: rgba(205, 127, 50, 0.85);
  color: white;
  border: none;
}

.btn-subscribe:hover {
  background-color: rgba(205, 127, 50, 1);
}

/* Brand logo in footer */
.footer-logo {
  display: inline-block;
  max-width: 180px;
  width: auto;
  height: auto;
  margin: 0 auto 1rem;
  transition: transform 0.3s ease;
}

.footer-logo:hover {
  transform: scale(1.05);
}

/* Footer responsive tweaks */
@media (max-width: 767px) {
  .footer .col-md-3 {
    text-align: center;
  }
}

@media (min-width: 577px) and (max-width: 1024px) {
  .footer-logo {
    max-width: 100px;
    margin-bottom: 0.75rem;
  }
}

/* =========================================
   SHARED COMPONENT THEMING (modals, forms, buttons)
   ========================================= */

/* Modal Theming */
.modal-content {
  background-color: var(--modal-bg);
  color: var(--modal-text);
  border: 1px solid var(--border-color);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
}

.modal-footer {
  border-top: 1px solid var(--border-color);
}

/* Form Controls Theming */
.form-control {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.form-control:focus {
  background-color: var(--card-bg);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(205, 127, 50, 0.25);
}

/* Button Theming */
.btn-outline-dark {
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline-dark:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* Search icon button in header */
.header-search-btn {
  background: none;
  border: 0;
  padding: 0.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Keep accessibility for focus */
.header-search-btn:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Link inside the search button should not look like a blue link */
.header-search-link {
  color: var(--navbar-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Force icon color to follow theme */
.header-search-link i {
  color: var(--navbar-text);
  transition: color 0.3s ease, text-shadow 0.3s ease;
  font-size: 1.2rem;
}

/* Hover = same glow behavior as other nav links */
.header-search-btn:hover .header-search-link i,
.header-search-link:hover i {
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.85);
}

/* Container for the right-side tools (search, cart, theme, burger) */
.navbar-icons {
  gap: 0.75rem;
  /* even spacing between all icons */
}

/* Generic icon button for navbar tools */
.icon-btn {
  background: none;
  border: 0;
  padding: 0.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  /* make it behave visually like a nav-link */
  color: var(--navbar-text);
  text-decoration: none;
  font-size: 1.2rem;
}

/* for <a> elements we reuse same visuals */
.icon-btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navbar-text);
  text-decoration: none;
  line-height: 1;
  font-size: 1.2rem;
}

/* force icons to match theme color in both light and night */
.icon-btn i,
.icon-btn-link i {
  color: var(--navbar-text);
  font-size: 1.2rem;
  line-height: 1;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Hover / active glow (same vibe as nav-link:hover) */
.icon-btn:hover i,
.icon-btn-link:hover i,
.icon-btn:hover span,
.icon-btn-link:hover span {
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.85);
}

/* Make sure toggler inherits theme colors on mobile */
.navbar-toggler {
  border-color: var(--border-color);
  color: var(--navbar-text);
}

.navbar-toggler .navbar-toggler-icon {
  filter: invert(0);
}

/* Night mode variant keeps clarity */
[data-theme="night"] .navbar-toggler .navbar-toggler-icon {
  filter: invert(1);
}
