:root {
  --theme-page: linear-gradient(180deg, #fffdf8 0%, #f8efdf 52%, #fffaf2 100%);
  --theme-surface: rgba(255, 250, 242, 0.96);
  --theme-panel: rgba(255, 255, 255, 0.96);
  --theme-panel-alt: rgba(248, 236, 211, 0.96);
  --theme-border: rgba(209, 155, 72, 0.28);
  --theme-accent: #d19b48;
  --theme-accent-strong: #b17a28;
  --theme-text: #2c2016;
}

html,
body {
  background-color: #fffaf2;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--theme-page) !important;
  color: var(--theme-text) !important;
}

/* Prevent layout overflow on narrow devices. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Avoid clipped text when labels are longer than expected. */
h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
a,
button,
label,
span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

nav {
  background: rgba(255, 250, 242, 0.96) !important;
  border-bottom: 1px solid rgba(209, 155, 72, 0.32) !important;
  box-shadow: 0 12px 30px rgba(105, 72, 24, 0.08) !important;
  padding: 10px 40px !important;
  flex-wrap: nowrap !important;
}

nav a,
.user-dropdown a,
.hero h1,
.hero h2,
.hero p,
.hero-subtitle,
.section-title,
.about-text,
.about-text h2,
.contact h2,
.contact p,
.story h2,
.story p,
.product-info h3,
footer p,
footer a {
  color: var(--theme-text) !important;
  text-shadow: none !important;
}

.hero,
.about,
.contact,
.story,
.product,
.modal-content,
.user-dropdown,
footer,
[class*="hero"]:not(.hero-subtitle):not(.hero-content),
[class*="glass"],
[class*="panel"],
[class*="dropdown"] {
  background: linear-gradient(135deg, var(--theme-surface) 0%, var(--theme-panel-alt) 100%) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 18px 40px rgba(105, 72, 24, 0.1) !important;
}

.hero::before,
.product::before {
  background: radial-gradient(circle at 30% 40%, rgba(209, 155, 72, 0.12) 0%, transparent 52%),
    radial-gradient(circle at 70% 60%, rgba(255, 215, 0, 0.08) 0%, transparent 50%) !important;
}

.hero::after,
.geometric-2 {
  background: linear-gradient(135deg, #fff4dd, var(--theme-accent)) !important;
}

.spiral-2 {
  background: conic-gradient(from 180deg, #fff4dd, var(--theme-accent), #f2dfbc) !important;
}

.product {
  background: linear-gradient(135deg, var(--theme-panel) 0%, var(--theme-panel-alt) 100%) !important;
}

.price {
  color: var(--theme-accent-strong) !important;
  text-shadow: none !important;
}

footer {
  background: linear-gradient(180deg, #f4e6cf 0%, #e8d1a6 100%) !important;
}

footer a:hover,
nav a:hover,
.contact p:hover,
.user-dropdown a:hover {
  color: var(--theme-accent-strong) !important;
}

.buy-now-btn,
.secondary-btn,
.login-btn.apple,
button[style*="#000000"],
a[style*="#000000"] {
  background: #fff7e7 !important;
  color: #7a5516 !important;
  border-color: var(--theme-accent) !important;
}

.buy-now-btn:hover,
.secondary-btn:hover,
.login-btn.apple:hover,
button[style*="#000000"]:hover,
a[style*="#000000"]:hover {
  background: var(--theme-accent) !important;
  color: #ffffff !important;
}

.modal {
  background: rgba(244, 233, 212, 0.72) !important;
}

.stat {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(209, 155, 72, 0.24) !important;
}

.logo img {
  filter: none !important;
  height: 36px !important;
}

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

.logo .logo-badge {
  width: 50px !important;
  height: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 30% 30%, #1a1614 0%, #0f0d0d 100%) !important;
  border: 2px solid rgba(209, 155, 72, 0.88) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22), 0 0 0 4px rgba(209, 155, 72, 0.12), inset 0 0 0 1px rgba(255, 220, 160, 0.14) !important;
  overflow: hidden !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.logo .logo-badge::before {
  display: none !important;
}

.logo .logo-badge:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28), 0 0 0 5px rgba(209, 155, 72, 0.16), inset 0 0 0 1px rgba(255, 220, 160, 0.18) !important;
}

.logo .logo-badge img.logo-mark {
  width: 86% !important;
  height: 86% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  display: block !important;
}

.logo .logo-badge.logo-float-active {
  animation: homeLogoFloat 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes homeLogoFloat {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-8px) scale(1.05); }
  65% { transform: translateY(-3px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* PROFILE ICON — forced perfect circle */
#globalUserBtn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(209, 155, 72, 0.5) !important;
  background: #d19b48 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#globalUserBtn img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}

/* NAV LINKS ROW */
.nav-links {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
}

nav > div:not(.logo) {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

nav a {
  font-size: 12px !important;
  margin-left: 18px !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
  font-weight: 500 !important;
}

.nav-links .cart-btn {
  padding: 6px 14px !important;
  font-size: 11px !important;
  margin-left: 18px !important;
}

.quick-logout-btn {
  border-color: rgba(209, 155, 72, 0.45) !important;
  color: var(--theme-accent-strong) !important;
}

.quick-logout-btn:hover {
  background: var(--theme-accent) !important;
  color: #ffffff !important;
}

/* MOBILE */
@media (max-width: 768px) {
  nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  html,
  body {
    width: 100%;
    overflow-x: hidden;
    padding: 10px;
  }

  nav {
    padding: 10px 12px !important;
    position: relative;
  }

  .logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 0;
    z-index: 2;
  }

  .logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .logo img {
    display: block !important;
    width: auto;
    height: 34px !important;
    max-height: 34px;
    max-width: 120px;
    object-fit: contain;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .logo .logo-badge {
    width: 42px !important;
    height: 42px !important;
  }

  .nav-left,
  .nav-right,
  .user-menu {
    display: flex;
    align-items: center;
    gap: 8px !important;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: visible;
  }

  .nav-left,
  .nav-right,
  .nav-links {
    min-width: 0;
    max-width: 100%;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 8px !important;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-right,
  .nav-links {
    justify-content: flex-start;
    flex: 1 1 auto;
  }

  .nav-left {
    flex: 0 0 auto;
  }

  .nav-links {
    position: relative;
    padding-bottom: 14px;
  }

  .nav-links::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(209, 155, 72, 0.18) 0%, rgba(209, 155, 72, 0.62) 50%, rgba(209, 155, 72, 0.18) 100%);
    pointer-events: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .container {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .hero,
  .hero-content,
  .about,
  .contact,
  .story,
  .product,
  .modal-content {
    padding: 14px !important;
  }

  h1 {
    font-size: 22px;
    line-height: 1.25;
  }

  h2 {
    font-size: 18px !important;
  }

  p,
  li,
  a,
  button {
    font-size: 13px;
  }

  .product-grid,
  .grid,
  .steps-grid {
    display: grid !important;
    gap: 16px !important;
  }

  /* Show product cards in two columns on phones for easier browsing. */
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .product-grid .product,
  .product-grid .product-link {
    min-width: 0 !important;
  }

  .product-grid .product {
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  /* Keep product visuals rectangular on phones. */
  .product-grid .product img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    object-fit: cover !important;
    display: block !important;
  }

  .product-grid .product-info {
    padding: 12px !important;
  }

  .product-grid .product-info h3 {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
    white-space: normal !important;
  }

  .product-grid .price {
    font-size: 13px !important;
    margin-bottom: 10px !important;
  }

  .product-grid .product button {
    min-height: 36px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    border-radius: 18px !important;
    white-space: normal !important;
    text-align: center !important;
  }

  /* Keep the product details layout stacked on mobile. */
  .product-container .product-grid {
    grid-template-columns: 1fr !important;
  }

  .grid,
  .steps-grid {
    grid-template-columns: 1fr !important;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  .buy-now-btn,
  .secondary-btn,
  .login-btn,
  .quick-logout-btn,
  button,
  .btn {
    width: auto;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 10px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  nav a,
  .user-dropdown a,
  .user-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .cart-btn {
    margin-left: 0 !important;
  }
}

/* Extra-small phones: use one card per row to avoid clipped labels/buttons. */
@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr !important;
  }

  .product-grid .product img {
    aspect-ratio: 4 / 5 !important;
  }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
  nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body {
    padding: 16px;
  }

  nav {
    padding: 12px 16px !important;
  }

  .logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    z-index: 2;
  }

  .logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .logo img {
    display: block !important;
    width: auto;
    height: 40px !important;
    max-height: 40px;
    max-width: 150px;
    object-fit: contain;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .nav-left,
  .nav-right,
  .nav-links,
  .user-menu {
    display: flex;
    align-items: center;
    gap: 10px !important;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
    max-width: 100%;
  }

  .nav-right,
  .nav-links {
    justify-content: flex-start;
    flex: 1 1 auto;
  }

  .nav-left {
    flex: 0 0 auto;
  }

  .nav-left::-webkit-scrollbar,
  .nav-right::-webkit-scrollbar,
  .nav-links::-webkit-scrollbar,
  .user-menu::-webkit-scrollbar {
    display: none;
  }

  nav a,
  .user-dropdown a,
  .user-menu a {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    margin-left: 0 !important;
  }

  .cart-btn {
    margin-left: 0 !important;
  }

  .container {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero,
  .hero-content,
  .about,
  .contact,
  .story,
  .product,
  .modal-content {
    padding: 18px !important;
  }

  .product-grid,
  .grid,
  .steps-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }

  .product-grid .product img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    object-fit: cover !important;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }
}

/* Enterprise Visual Polish Layer */
:root {
  --brand-ink: #1d140c;
  --brand-gold: #cb9a4f;
  --brand-gold-soft: #e8cfaa;
  --brand-line: rgba(126, 88, 39, 0.2);
  --brand-panel: rgba(255, 255, 255, 0.92);
  --brand-shadow: 0 20px 46px rgba(46, 31, 15, 0.12);
}

body {
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(90rem 45rem at 95% -10%, rgba(233, 201, 151, 0.22) 0%, transparent 48%),
    radial-gradient(80rem 40rem at -10% 115%, rgba(205, 167, 109, 0.14) 0%, transparent 56%);
  pointer-events: none;
  z-index: -1;
}

h1,
h2,
h3,
.section-title,
.hero-subtitle {
  font-family: "Montserrat", "Poppins", sans-serif;
  letter-spacing: 0.025em;
  color: var(--brand-ink) !important;
}

p,
li,
label,
input,
textarea,
select,
button,
a {
  font-family: "Poppins", "Montserrat", sans-serif;
}

nav {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.9) 0%, rgba(255, 245, 230, 0.84) 100%) !important;
  border-bottom: 1px solid var(--brand-line) !important;
  box-shadow: 0 16px 34px rgba(44, 30, 14, 0.1) !important;
}

nav a,
.user-dropdown a {
  border-radius: 999px;
  transition: color 0.24s ease, background-color 0.24s ease, transform 0.24s ease;
}

nav a:hover,
.user-dropdown a:hover {
  background: rgba(203, 154, 79, 0.12);
  transform: translateY(-1px);
}

.hero,
.about,
.contact,
.story,
.product,
.modal-content,
.policy-card,
.order-card,
.item-card,
.auth-card,
.success-card,
.thank-you-card,
.order-item-card,
.card,
.preorder-content {
  border: 1px solid var(--brand-line) !important;
  border-radius: 22px !important;
  box-shadow: var(--brand-shadow) !important;
}

.section-title {
  text-transform: uppercase;
  letter-spacing: 0.11em !important;
  font-weight: 700 !important;
}

.section-title::after,
.category-title::after {
  height: 4px !important;
  border-radius: 999px;
  background: linear-gradient(90deg, #ba8537 0%, #e9cb94 52%, #ba8537 100%) !important;
}

.product {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.product:hover,
.product-link:hover .product {
  transform: translateY(-8px);
  border-color: rgba(186, 133, 55, 0.48) !important;
  box-shadow: 0 26px 56px rgba(61, 41, 19, 0.18) !important;
}

.product img,
.order-item-card img,
.item-card img {
  border-radius: 16px;
}

button,
.btn,
.submit-btn,
.preorder-confirm,
.buy-now-btn,
.secondary-btn,
.cart-btn,
.success-btn,
.thank-you-btn,
.policy-pill-btn {
  border-radius: 999px !important;
  border: 1px solid rgba(172, 120, 45, 0.35) !important;
  box-shadow: 0 10px 24px rgba(63, 42, 18, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

button:hover,
.btn:hover,
.submit-btn:hover,
.preorder-confirm:hover,
.buy-now-btn:hover,
.secondary-btn:hover,
.cart-btn:hover,
.success-btn:hover,
.thank-you-btn:hover,
.policy-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(63, 42, 18, 0.2);
  filter: saturate(1.05);
}

input,
textarea,
select,
.form-control,
.form-group input,
.form-group textarea,
.form-group select {
  border-radius: 12px !important;
  border: 1px solid rgba(172, 120, 45, 0.28) !important;
  background: var(--brand-panel) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: rgba(186, 133, 55, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(205, 160, 95, 0.18) !important;
}

table,
.table,
.orders-table,
.dashboard-table {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(170, 128, 61, 0.2);
}

th {
  background: linear-gradient(180deg, #f5e2bf 0%, #edd0a1 100%);
  color: #3a2815;
}

footer {
  border-top: 1px solid rgba(171, 128, 60, 0.34) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

@media (max-width: 768px) {
  .hero,
  .about,
  .contact,
  .story,
  .product,
  .modal-content,
  .policy-card,
  .order-card,
  .item-card,
  .auth-card,
  .success-card,
  .thank-you-card,
  .order-item-card,
  .card,
  .preorder-content {
    border-radius: 16px !important;
    box-shadow: 0 12px 30px rgba(46, 31, 15, 0.12) !important;
  }

  .section-title {
    letter-spacing: 0.08em !important;
  }
}

