/* assets/css/styles.css */

/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --copper: #8B4513;
  --dark-copper: #6B3410;
  --light-gray: #f8f8f8;
  --white: #ffffff;
  --black: #1a1a1a;
  --gold: #d4af37;
}

body {
  font-family: 'Georgia', serif;
  color: var(--black);
  overflow-x: hidden;
  background: var(--white);
}

/* =========================
   HEADER / NAV
========================= */

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  padding: 1.5rem 5%;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* LEFT: logo */
.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--copper);
  letter-spacing: 2px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.logo:hover {
  transform: scale(1.05);
}

/* CENTER: links (desktop only) */
.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links li {
  display: block;
}

.nav-links a {
  text-decoration: none;
  color: var(--black);
  font-size: 0.95rem;
  letter-spacing: 1px;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--copper);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--copper);
}

.nav-links a:hover::after {
  width: 100%;
}

/* RIGHT: icons and mobile menu button wrapper */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Mobile menu button (hamburger) */
.mobile-menu-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.4rem;
  cursor: pointer;
  line-height: 0;
  display: none;
  /* hidden on desktop by default */
  color: var(--black);
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  color: var(--copper);
}

/* Icons group */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

/* Each icon button */
.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  line-height: 0;
  position: relative;
  color: var(--black);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  color: var(--copper);
  transform: translateY(-2px);
}

/* The actual SVG icon */
.icon-svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
}

/* Cart badge */
.cart-btn {
  position: relative;
}

.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--copper);
  color: #fff;
  font-size: 0.6rem;
  line-height: 1;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
  border: 1px solid #fff;
}

/* =========================
   FOOTER
========================= */

footer {
  background: var(--black);
  color: white;
  padding: 3rem 5%;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-section h3 {
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: #888;
}

/* =========================
   SHARED UTILITY CLASSES
========================= */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   RESPONSIVE
========================= */

/* Tablet / Mobile */
@media (max-width: 768px) {

  /* hide desktop links */
  .nav-links {
    display: none;
  }

  /* show burger on mobile */
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* keep the icons visible on mobile */
  .nav-icons {
    gap: 0.5rem;
  }

  /* tighten spacing a bit on mobile */
  header {
    padding: 1rem 5%;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav-right {
    gap: 0.5rem;
  }

  .icon-svg {
    width: 20px;
    height: 20px;
  }

  .cart-count-badge {
    font-size: 0.55rem;
    min-width: 14px;
    top: -3px;
    right: -3px;
  }
}

/* =========================
   SEARCH BAR OVERLAY
========================= */

.search-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  /* hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);

  background: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);

  padding: 1rem 5%;
  z-index: 1500;

  transition: all 0.25s ease;
  display: flex;
  justify-content: center;
}

.search-bar.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.search-bar__form {
  width: 100%;
  max-width: 800px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-bar__input {
  flex: 1;
  font-size: 1rem;
  font-family: 'Georgia', serif;
  color: var(--black);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  outline: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

.search-bar__input:focus {
  border-color: var(--copper);
  box-shadow: 0 10px 25px rgba(139, 69, 19, 0.15);
}

.search-bar__close {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  line-height: 0;
  padding: 0.6rem;
  color: var(--black);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-bar__close:hover {
  color: var(--copper);
  background: rgba(139, 69, 19, 0.07);
}

.search-bar__close .icon-svg {
  width: 22px;
  height: 22px;
}

/* On mobile the bar should be full-width and comfortable to tap */
@media (max-width: 768px) {
  .search-bar {
    padding: 0.8rem 4%;
  }

  .search-bar__form {
    max-width: 100%;
  }

  .search-bar__input {
    font-size: 0.95rem;
    padding: 0.8rem 0.9rem;
  }

  .search-bar__close .icon-svg {
    width: 20px;
    height: 20px;
  }
}

/* =========================
   MOBILE DRAWER MENU
========================= */

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1400;
  /* below search bar (1500) but above page */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer panel */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: 80%;
  max-width: 320px;
  background: #fff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 1500;

  display: flex;
  flex-direction: column;

  transform: translateX(100%);
  transition: transform 0.25s ease;
  border-left: 1px solid rgba(0, 0, 0, 0.07);
}

.mobile-drawer.active {
  transform: translateX(0);
}

/* Drawer header */
.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  background: #fff;
}

.mobile-drawer__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mobile-drawer__close {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  line-height: 0;
  padding: 0.5rem;
  color: var(--black);
  transition: all 0.2s ease;
}

.mobile-drawer__close:hover {
  color: var(--copper);
  background: rgba(139, 69, 19, 0.07);
}

.mobile-drawer__close .icon-svg {
  width: 22px;
  height: 22px;
}

/* Drawer links */
.mobile-drawer__links {
  list-style: none;
  padding: 1rem 1rem;
  flex-grow: 1;
}

.mobile-drawer__links li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-drawer__links a {
  display: block;
  text-decoration: none;
  color: var(--black);
  font-size: 1rem;
  letter-spacing: 1px;
  padding: 1rem 0;
  transition: color 0.2s ease;
  font-weight: 500;
}

.mobile-drawer__links a:hover {
  color: var(--copper);
}

/* We keep the CSS for .mobile-drawer__actions in case you bring it back later,
   but note: it's no longer rendered in navbar.php */
.mobile-drawer__actions {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 1rem;
  background: #fafafa;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}

.drawer-action-btn {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: .75rem .5rem;
  font-size: .8rem;
  letter-spacing: .5px;
  text-align: center;
  color: var(--black);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  transition: all .2s ease;
}

.drawer-action-btn:hover {
  border-color: var(--copper);
  color: var(--copper);
  box-shadow: 0 10px 20px rgba(139, 69, 19, .15);
}

.drawer-action-icon .icon-svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Only really relevant under 768px.
   On desktop we can just keep it hidden off-canvas. */
@media (min-width: 769px) {

  .mobile-drawer,
  .mobile-drawer-overlay {
    display: none;
  }
}



/* =========================
   ACCOUNT DROPDOWN
========================= */

.account-menu {
  position: relative;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 180px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  z-index: 1600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.18s ease;
}

.account-dropdown.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.account-dd-item {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--black);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.account-dd-item:last-child {
  border-bottom: none;
}

.account-dd-item:hover {
  color: var(--copper);
  background: rgba(139, 69, 19, 0.06);
}

.account-dd-item--btn {
  border: none;
  font-family: inherit;
}
