/* Gold theme overrides: apply globally across shop pages */
/*
 * Palette (پالت رنگی سایت طلا):
 *   White              #FFFFFF  — primary background, text on dark buttons
 *   Gold               #D4AF37  — action / highlight
 *   Very Light Tiffany #E6F4F3  — soft accent background
 *   Very Light Gray    #F7F7F7  — secondary background
 *   Soft Black         #1A1A1A  — headings & main text
 *   Secondary Text     #6B6B6B  — muted body / footer links
 */

:root {
  /* ── Base palette (from design spec) ── */
  --gold-white: #FFFFFF;
  --gold-accent: #D4AF37;
  --gold-tiffany: #E6F4F3;
  --gold-gray: #F7F7F7;
  --gold-black: #1A1A1A;
  --gold-text-secondary: #6B6B6B;

  /* ── Refined gold scale — warm & luminous, not muddy brown ── */
  --gold-100: #F5EDD6;
  --gold-200: #E8D9A8;
  --gold-300: #D4AF37;   /* spec anchor */
  --gold-400: #C9A227;
  --gold-500: #B8952B;
  --gold-600: #9E7E24;
  --gold-700: #85691E;

  /* ── Functional tokens ── */
  --gold-btn-bg: var(--gold-300);
  --gold-btn-border: var(--gold-400);
  --gold-btn-hover-bg: var(--gold-400);
  --gold-btn-hover-border: var(--gold-500);
  --gold-btn-active-bg: var(--gold-500);
  --gold-btn-active-border: var(--gold-600);

  /* Outline on white: darker gold for readable contrast */
  --gold-outline-text: var(--gold-600);
  --gold-outline-border: var(--gold-400);

  --gold-focus-ring: rgba(201, 162, 39, 0.2);
  --gold-focus-ring-soft: rgba(201, 162, 39, 0.12);

  --gold-input-border: var(--gold-200);
  --gold-input-border-focus: var(--gold-400);
}

/* Primary buttons */
.btn-primary {
  color: var(--gold-white) !important;
  background-color: var(--gold-btn-bg) !important;
  border-color: var(--gold-btn-border) !important;
  box-shadow: none !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  color: var(--gold-white) !important;
  background-color: var(--gold-btn-hover-bg) !important;
  border-color: var(--gold-btn-hover-border) !important;
}
.btn-primary:active {
  background-color: var(--gold-btn-active-bg) !important;
  border-color: var(--gold-btn-active-border) !important;
}

/* Outline primary buttons (including custom variant) */
.btn-outline-primary,
.btn-outline-primary-2 {
  color: var(--gold-outline-text) !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: var(--gold-outline-border) !important;
  box-shadow: none !important;
}
.btn-outline-primary:hover,
.btn-outline-primary-2:hover,
.btn-outline-primary:focus,
.btn-outline-primary-2:focus {
  color: var(--gold-white) !important;
  background-color: var(--gold-btn-bg) !important;
  border-color: var(--gold-btn-border) !important;
}

/* Ensure primary button hover text/icons turn white even if nested */
.btn.btn-primary:hover,
.btn.btn-primary:focus {
  color: var(--gold-white) !important;
}
.btn.btn-primary:hover span,
.btn.btn-primary:hover i,
.btn.btn-primary:focus span,
.btn.btn-primary:focus i {
  color: var(--gold-white) !important;
}

/* Convert "success" variants to gold */
.btn-success,
.btn-continue-solid,
.btn-checkout {
  color: var(--gold-white) !important;
  background-color: var(--gold-btn-bg) !important;
  border-color: var(--gold-btn-border) !important;
}
.btn-success:hover,
.btn-continue-solid:hover,
.btn-checkout:hover,
.btn-success:focus,
.btn-continue-solid:focus,
.btn-checkout:focus {
  color: var(--gold-white) !important;
  background-color: var(--gold-btn-hover-bg) !important;
  border-color: var(--gold-btn-hover-border) !important;
}

.btn-outline-success,
.btn-back-outline {
  color: var(--gold-outline-text) !important;
  background-color: transparent !important;
  border-color: var(--gold-outline-border) !important;
}
.btn-outline-success:hover,
.btn-back-outline:hover,
.btn-outline-success:focus,
.btn-back-outline:focus {
  color: var(--gold-white) !important;
  background-color: var(--gold-btn-bg) !important;
  border-color: var(--gold-btn-border) !important;
}

/* Success utilities → gold */
.bg-success { background-color: var(--gold-btn-bg) !important; color: var(--gold-white) !important; }
.text-success { color: var(--gold-500) !important; }
.border-success { border-color: var(--gold-outline-border) !important; }

/* Common badges that may rely on success */
.badge.bg-success { background-color: var(--gold-btn-bg) !important; color: var(--gold-white) !important; }
.badge.text-bg-success { background-color: var(--gold-btn-bg) !important; color: var(--gold-white) !important; }

/* Cart/search buttons already use primary; ensure consistency */
.header-search .btn.btn-primary,
.dropdown-cart-action .btn.btn-primary,
.dropdown-cart-action .btn.btn-outline-primary-2 {
  box-shadow: none !important;
}

/* Product page: Add to cart buttons are outline-dark by default — make gold */
.btn-outline-dark,
.btn-outline-dark.btn-cart,
.btn-product.btn-cart.btn.btn-outline-dark,
.btn-cart-icon-only.btn.btn-outline-dark {
  color: var(--gold-outline-text) !important;
  background-color: transparent !important;
  border-color: var(--gold-outline-border) !important;
}
.btn-outline-dark:hover,
.btn-outline-dark:focus,
.btn-outline-dark.btn-cart:hover,
.btn-outline-dark.btn-cart:focus,
.btn-product.btn-cart.btn.btn-outline-dark:hover,
.btn-product.btn-cart.btn.btn-outline-dark:focus,
.btn-cart-icon-only.btn.btn-outline-dark:hover,
.btn-cart-icon-only.btn.btn-outline-dark:focus {
  color: var(--gold-white) !important;
  background-color: var(--gold-btn-bg) !important;
  border-color: var(--gold-btn-border) !important;
}

/* Product grid/card explicit hover: enforce white text and no underline */
.product-action .btn-product.btn-cart:hover,
.product-action .btn-product.btn-cart:focus {
  background-color: var(--gold-btn-bg) !important;
  border-color: var(--gold-btn-border) !important;
  color: var(--gold-white) !important;
  text-decoration: none !important;
}
.product-action .btn-product.btn-cart:hover span,
.product-action .btn-product.btn-cart:hover i,
.product-action .btn-product.btn-cart:focus span,
.product-action .btn-product.btn-cart:focus i {
  color: var(--gold-white) !important;
  text-decoration: none !important;
}

/* Stronger underline removal in product cards (match or exceed theme specificity) */
.product-action .btn-product.btn-cart:hover,
.product-action .btn-product.btn-cart:hover *,
.product-action .btn-product.btn-cart:focus,
.product-action .btn-product.btn-cart:focus * {
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  text-decoration-color: transparent !important;
}

/* Footer titles — rich gold, slightly deeper than CTA for elegance */
.footer_container .title,
.footer_container .title a,
.footer_container .title span {
  color: var(--gold-500) !important;
}

/* Footer links — secondary text with gold hover */
.footer_container .links ul li a {
  color: var(--gold-text-secondary) !important;
}
.footer_container .links ul li a:hover,
.footer_container .links ul li a:focus {
  color: var(--gold-accent) !important;
  text-decoration: none !important;
}

/* General: prevent underline on buttons */
/* Some themes style anchors specifically; cover both .btn and anchor buttons */
.btn,
.btn:hover,
.btn:focus,
a.btn,
a.btn:hover,
a.btn:focus,
.btn-product,
.btn-product:hover,
.btn-product:focus {
  text-decoration: none !important;
}

/* Header search input — soft gold border, refined focus */
.header-search .form-control,
.header-search .search-wrapper-wide .form-control {
  border-color: var(--gold-input-border) !important;
}
.header-search .form-control:focus,
.header-search .search-wrapper-wide .form-control:focus {
  border-color: var(--gold-input-border-focus) !important;
  box-shadow: 0 0 0 0.2rem var(--gold-focus-ring) !important;
}

/* Header-26 specific: search wrapper border */
.header-26 .header-search .header-search-wrapper,
.header-26 .header-search .search-wrapper-wide {
  border-color: var(--gold-input-border) !important;
}
.header-26 .header-search .header-search-wrapper:focus-within,
.header-26 .header-search .search-wrapper-wide:focus-within {
  border-color: var(--gold-input-border-focus) !important;
  box-shadow: 0 0 0 0.2rem var(--gold-focus-ring-soft) !important;
}
