/* =====================================================================
   SOLTANA STORE — Black & Gold Theme Override
   Loaded from Astra functions.php. Update-safe (lives in uploads dir).
   RTL-friendly: uses direction-neutral properties only.
   ===================================================================== */

/* ---------- 1) Design tokens ---------- */
:root {
  --sol-black:      #0b0b0f;
  --sol-black-deep: #07070a;
  --sol-surface:    #121218;
  --sol-surface-2:  #16161d;
  --sol-border:     #26262e;
  --sol-gold:       #c5a059;
  --sol-gold-light: #ecd394;
  --sol-gold-dark:  #a8823f;
  --sol-text:       #d8d5cf;
  --sol-text-muted: #9a9aa3;
  --sol-shop-text:  #e2ddd2;
}

/* ---------- 2) Base / body ---------- */
body {
  background-color: var(--sol-black) !important;
  background-image:
    radial-gradient(1100px 520px at 85% -10%, rgba(197,160,89,.08), transparent 60%),
    radial-gradient(900px 480px at -10% 30%, rgba(197,160,89,.05), transparent 55%) !important;
  color: var(--sol-text);
}
:where(h1, h2, h3, h4, h5, h6) { color: #f5f2ea; }
:where(a)       { color: var(--sol-gold); }
:where(a:hover) { color: var(--sol-gold-light); }
::selection { background: var(--sol-gold); color: #171208; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--sol-black-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--sol-gold), var(--sol-gold-dark));
  border-radius: 8px;
  border: 2px solid var(--sol-black-deep);
}

/* ---------- 3) Buttons — signature gold gradient ---------- */
:where(body) button:not(#wpadminbar button),
:where(body) .button,
input[type="submit"],
.ast-button,
.wp-block-button__link,
.elementor-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-proceed-to-checkout .checkout-button {
  background-color: var(--sol-gold) !important;
  background-image: linear-gradient(135deg, #f0d78c 0%, var(--sol-gold) 55%, var(--sol-gold-dark) 100%) !important;
  color: #17120a !important;
  border: none !important;
  border-radius: 7px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 2px 12px rgba(197,160,89,.28);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
:where(body) button:not(#wpadminbar button):hover,
:where(body) .button:hover,
input[type="submit"]:hover,
.ast-button:hover,
.wp-block-button__link:hover,
.elementor-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.wc-proceed-to-checkout .checkout-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 6px 22px rgba(197,160,89,.45);
  color: #17120a !important;
}
/* Outline / secondary buttons stay gold-on-dark */
.ast-outline-button,
.woocommerce button.button[name="apply_coupon"] {
  background-image: none !important;
  background-color: transparent !important;
  color: var(--sol-gold) !important;
  border: 1px solid var(--sol-gold) !important;
  box-shadow: none;
}
.ast-outline-button:hover,
.woocommerce button.button[name="apply_coupon"]:hover {
  background-color: rgba(197,160,89,.12) !important;
  color: var(--sol-gold-light) !important;
}
/* Keep the WP admin bar untouched for logged-in users */
#wpadminbar .ab-item,
#wpadminbar button { background-image: none !important; box-shadow: none !important; }

/* ---------- 4) Forms & inputs ---------- */
:where(body) input[type="text"],
:where(body) input[type="email"],
:where(body) input[type="search"],
:where(body) input[type="tel"],
:where(body) input[type="number"],
:where(body) input[type="password"],
:where(body) input[type="url"],
:where(body) textarea,
:where(body) select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .quantity .qty,
.elementor-field-group .elementor-field,
.wpforms-field-container input,
.wpforms-field-container textarea,
.wpforms-field-container select {
  background-color: var(--sol-surface) !important;
  color: #eceadf !important;
  border: 1px solid var(--sol-border) !important;
  border-radius: 7px;
  caret-color: var(--sol-gold);
  transition: border-color .2s ease, box-shadow .2s ease;
}
:where(body) input:focus,
:where(body) textarea:focus,
:where(body) select:focus,
.elementor-field:focus {
  border-color: var(--sol-gold) !important;
  box-shadow: 0 0 0 3px rgba(197,160,89,.16) !important;
  outline: none !important;
}
:where(body) ::placeholder { color: #767680; opacity: 1; }
select option { background: var(--sol-surface); color: #eceadf; }

/* ---------- 5) Header ---------- */
#masthead,
.ast-mobile-header-wrap .ast-primary-header-bar,
.ast-primary-header-bar {
  background-color: var(--sol-black-deep) !important;
  border-bottom: 1px solid rgba(197,160,89,.28) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
#masthead a,
.ast-primary-header-bar a,
.main-header-menu .menu-link { color: #eceadf; }
#masthead a:hover,
.main-header-menu .menu-link:hover,
.main-header-menu .current-menu-item > .menu-link { color: var(--sol-gold-light); }
/* Dropdown submenus */
.main-header-menu .sub-menu {
  background-color: #101017 !important;
  border: 1px solid rgba(197,160,89,.3);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0,0,0,.55);
}
.main-header-menu .sub-menu .menu-link:hover { background: rgba(197,160,89,.09); }
/* Mobile off-canvas drawer */
.ast-mobile-popup-drawer .ast-mobile-popup-inner {
  background-color: var(--sol-black-deep) !important;
  border-right: 1px solid rgba(197,160,89,.3);
}
.ast-mobile-popup-drawer .menu-link { color: #eceadf; }

#masthead .dgwt-wcas-search-wrapp,
#masthead .dgwt-wcas-search-form,
#masthead .dgwt-wcas-sf-wrapp {
  background: var(--sol-black-deep) !important;
  border: 1px solid rgba(197,160,89,.55) !important;
  border-radius: 8px;
}
#masthead .dgwt-wcas-search-wrapp {
  padding: 3px;
}
#masthead .dgwt-wcas-search-input {
  background: var(--sol-surface) !important;
  color: #eceadf !important;
  border: none !important;
  box-shadow: none !important;
}
#masthead .dgwt-wcas-search-input::placeholder { color: #aaa59b !important; }
#masthead .dgwt-wcas-search-submit,
#masthead .dgwt-wcas-search-submit:before { color: var(--sol-gold) !important; }

/* ---------- 6) Footer ---------- */
.site-footer,
.footer-adv-area,
.ast-footer-overlay {
  background-color: var(--sol-black-deep) !important;
  border-top: 1px solid rgba(197,160,89,.35);
}
.site-footer,
.footer-adv-area { color: var(--sol-text-muted); }
.site-footer .widget-title,
.footer-adv-widget .widget-title {
  color: var(--sol-gold);
  letter-spacing: .6px;
}
.site-footer a,
.footer-adv-area a { color: #b9b4a6; }
.site-footer a:hover,
.footer-adv-area a:hover { color: var(--sol-gold-light); }
.ast-small-footer { border-top: 1px solid rgba(255,255,255,.06); }

/* ---------- 7) Content cards / pagination / scroll-top ---------- */
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.comment-respond,
.comments-area {
  background-color: var(--sol-surface) !important;
  border: 1px solid var(--sol-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.entry-meta { color: var(--sol-text-muted) !important; }
.entry-meta a { color: var(--sol-gold); }

.ast-pagination .page-numbers,
.woocommerce-pagination .page-numbers li .page-numbers {
  background: var(--sol-surface);
  color: var(--sol-text);
  border: 1px solid var(--sol-border);
  border-radius: 7px;
}
.ast-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers li .page-numbers.current,
.ast-pagination .page-numbers:hover {
  background-image: linear-gradient(135deg, #f0d78c, var(--sol-gold));
  color: #17120a !important;
  border-color: var(--sol-gold);
}
.ast-breadcrumbs, .ast-breadcrumbs .trail-items li { color: var(--sol-text-muted); }

#ast-scroll-top, .ast-scroll-to-top {
  background-image: linear-gradient(135deg, #f0d78c, var(--sol-gold), var(--sol-gold-dark)) !important;
  color: #17120a !important;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(197,160,89,.4);
}

/* ---------- 8) WooCommerce — catalog ---------- */
.woocommerce-shop,
.post-type-archive-product,
.tax-product_cat,
.tax-product_tag,
.woocommerce-cart,
.woocommerce-checkout {
  color: var(--sol-shop-text);
}

body.woocommerce-shop,
body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_tag {
  background-color: var(--sol-black) !important;
}

body.woocommerce-shop .site-content,
body.post-type-archive-product .site-content,
body.tax-product_cat .site-content,
body.tax-product_tag .site-content,
body.woocommerce-shop .content-area,
body.post-type-archive-product .content-area,
body.tax-product_cat .content-area,
body.tax-product_tag .content-area {
  background-color: transparent !important;
}

.woocommerce-shop .woocommerce-loop-product__title,
.post-type-archive-product .woocommerce-loop-product__title,
.tax-product_cat .woocommerce-loop-product__title,
.tax-product_tag .woocommerce-loop-product__title,
.woocommerce-cart table.shop_table,
.woocommerce-checkout form,
.woocommerce-checkout #order_review,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout .woocommerce-checkout-review-order-table,
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-checkout .woocommerce-additional-fields {
  color: var(--sol-shop-text);
}

body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title {
  color: #f5f2ea !important;
}

body.woocommerce-checkout {
  background: #ffffff !important;
  color: #2b2925 !important;
}

body.woocommerce-checkout .site-content,
body.woocommerce-checkout .content-area,
body.woocommerce-checkout #primary,
body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout .woocommerce-checkout-review-order-table {
  background: #ffffff !important;
}

body.woocommerce-checkout h1,
body.woocommerce-checkout h2,
body.woocommerce-checkout h3,
body.woocommerce-checkout h4,
body.woocommerce-checkout label,
body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td a,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-total,
body.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text {
  color: #2b2925 !important;
}

body.woocommerce-checkout #order_review,
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2,
body.woocommerce-checkout .woocommerce-checkout-review-order-table {
  border-color: #dedbd5 !important;
}

.woocommerce-checkout .form-row label,
.woocommerce-checkout .form-row .required,
.woocommerce-checkout .woocommerce-checkout-review-order-table td,
.woocommerce-checkout .woocommerce-checkout-review-order-table td a,
.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name,
.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name strong,
.woocommerce-checkout .woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot td,
.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text,
.woocommerce-checkout .woocommerce-privacy-policy-text {
  color: #2b2925 !important;
}

.woocommerce-checkout .form-row .optional,
.woocommerce-checkout .woocommerce-checkout-review-order-table small,
.woocommerce-checkout .woocommerce-privacy-policy-text a {
  color: #c4beb2 !important;
}

ul.products li.product {
  background-color: var(--sol-surface) !important;
  border: 1px solid var(--sol-border) !important;
  border-radius: 14px;
  padding: 14px;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
ul.products li.product:hover {
  border-color: rgba(197,160,89,.55) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(197,160,89,.25);
  transform: translateY(-3px);
}
ul.products li.product .woocommerce-loop-product__title { color: #f0ede6; }
ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--sol-gold-light) !important;
  font-weight: 700;
}
del .woocommerce-Price-amount { color: #77777f !important; font-weight: 400; }

span.onsale, .wc-block-components-sale-badge {
  background-image: linear-gradient(135deg, #f0d78c, var(--sol-gold), var(--sol-gold-dark)) !important;
  color: #17120a !important;
  border-radius: 999px !important;
  font-weight: 800;
  letter-spacing: .4px;
  box-shadow: 0 4px 14px rgba(197,160,89,.4);
  line-height: 1.9;
  padding: 0 12px;
}
.star-rating span::before { color: var(--sol-gold-light) !important; }
.star-rating::before { color: #3a3a42 !important; }
ul.products li.product img { border-radius: 10px; }

/* ---------- 9) WooCommerce — single product ---------- */
body.single-product .woocommerce div.product .product_title {
  color: #2b2925 !important;
}
body.single-product .woocommerce div.product .woocommerce-product-details__short-description,
body.single-product .woocommerce div.product .product_meta,
body.single-product .woocommerce div.product .product_meta a {
  color: #5a554d !important;
}
body.single-product .related.products ul.products li.product .woocommerce-loop-product__title,
body.single-product .upsells.products ul.products li.product .woocommerce-loop-product__title {
  color: #f5f2ea !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: transparent;
  border-color: var(--sol-border);
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--sol-text-muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: var(--sol-gold); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--sol-gold); }

.variable-items-wrapper .variable-item {
  background: var(--sol-surface-2);
  border-color: var(--sol-border) !important;
}
.variable-items-wrapper .variable-item.selected,
.variable-items-wrapper .variable-item:hover {
  border-color: var(--sol-gold) !important;
  box-shadow: 0 0 0 1px var(--sol-gold);
}

/* ---------- 10) WooCommerce — cart / checkout / account ---------- */
.woocommerce table.shop_table {
  background: var(--sol-surface);
  border: 1px solid var(--sol-border) !important;
  border-radius: 12px;
}
.woocommerce table.shop_table th {
  color: var(--sol-gold);
  border-bottom: 1px solid rgba(197,160,89,.35) !important;
}
.woocommerce table.shop_table td { border-color: var(--sol-border) !important; }
.cart_totals h2, #order_review_heading { color: #f5f2ea; }
#order_review, #customer_details .col-1, #customer_details .col-2 {
  background: var(--sol-surface);
  border: 1px solid var(--sol-border);
  border-radius: 12px;
}
.select2-container--default .select2-selection--single,
.select2-dropdown {
  background-color: var(--sol-surface) !important;
  border-color: var(--sol-border) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: #eceadf; }
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--sol-gold) !important;
  color: #17120a !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  color: var(--sol-text);
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
  border-color: var(--sol-gold);
  color: var(--sol-gold-light);
  background: rgba(197,160,89,.08);
}

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  background-color: var(--sol-surface-2) !important;
  color: var(--sol-text) !important;
  border: 1px solid var(--sol-border) !important;
  border-top-width: 3px !important;
  border-radius: 10px;
}
.woocommerce-message { border-top-color: var(--sol-gold) !important; }
.woocommerce-info   { border-top-color: #6aa5e0 !important; }
.woocommerce-error  { border-top-color: #e05c6a !important; }

/* ---------- 11) Elementor alignment ---------- */
:where(.elementor-widget-heading) .elementor-heading-title { color: #f5f2ea; }
.elementor-field-group .elementor-label { color: var(--sol-text); }
.elementor-widget-text-editor, .elementor-icon-box-description { color: var(--sol-text); }

/* ---------- 12) Ajax search (FiboSearch) ---------- */
.dgwt-wcas-search-wrapp input.dgwt-wcas-search-input {
  background-color: var(--sol-surface) !important;
  border: 1px solid var(--sol-border) !important;
  color: #eceadf !important;
}
.dgwt-wcas-suggestions-wrapp, .dgwt-wcas-details-wrapp {
  background-color: #101016 !important;
  border: 1px solid var(--sol-border) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.6) !important;
}
.dgwt-wcas-suggestion:hover { background: rgba(197,160,89,.1); }
.dgwt-wcas-st, .dgwt-wcas-sd { color: var(--sol-text) !important; }
.dgwt-wcas-sp { color: var(--sol-gold-light) !important; }

/* ---------- 13) Cookie banner (Complianz) ---------- */
#cmplz-cookiebanner-container .cmplz-cookiebanner {
  background-color: var(--sol-surface) !important;
  border: 1px solid rgba(197,160,89,.4) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.65) !important;
  color: var(--sol-text);
}
.cmplz-links a { color: var(--sol-gold) !important; }

/* ---------- 14) Misc polish ---------- */
hr { border-color: var(--sol-border); }
blockquote {
  border-inline-start: 3px solid var(--sol-gold);
  background: var(--sol-surface);
  border-radius: 8px;
}
code, kbd, pre {
  background: var(--sol-surface-2);
  color: var(--sol-gold-light);
  border-radius: 6px;
}
table tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
.widget a:hover { color: var(--sol-gold-light); }

/* ---------- 15) Small-screen layout safeguards ---------- */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }

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

  .elementor-container,
  .elementor-section .elementor-container,
  .elementor-widget-wrap {
    max-width: 100%;
  }

  .elementor-widget-heading h1,
  .elementor-widget-heading h2,
  .elementor-widget-heading h3 {
    overflow-wrap: anywhere;
  }

  .elementor-widget-heading h1 {
    font-size: clamp(1.8rem, 8vw, 2.7rem) !important;
    line-height: 1.25;
  }

  .elementor-widget-heading h2 {
    font-size: clamp(1.35rem, 6vw, 2rem) !important;
    line-height: 1.35;
  }

  .elementor-button,
  .elementor-widget-button a {
    max-width: 100%;
    white-space: normal;
  }

  /* CookieYes preference dialog must fit the viewport in RTL and LTR. */
  .cky-modal,
  .cky-preference-center {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin-inline: 0 !important;
  }

  .cky-preference-body-wrapper,
  .cky-preference-content-wrapper,
  .cky-dma-content-wrapper,
  .cky-accordion-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .cky-preference-body-wrapper,
  .cky-preference-content-wrapper { padding-inline: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
