/**
 * AWA Rokanthemes Final Coverage v6
 * ThemeOption variable bridge + .vela* footer + SuperDeals +
 * fixed-right sidebar + newsletter popup + mobile submenu + consistency aliases.
 *
 * CSS-only. Zero template changes. Zero B2B gate seletores tocados.
 * Sintaxe: rgb() moderno, media range, currentcolor minúsculo.
 * Carregado por último — máxima precedência de cascade.
 */

/* =============================================================
   1. THEMEOPTION VARIABLE BRIDGE
   Mapeia variáveis nativas Rokanthemes/LESS para design system AWA.
   Qualquer regra no themes5.css que usa var(--primary-color) etc.
   passará a resolver para os tokens canônicos do design system.
   ============================================================= */

:root {
  /* --- Rokanthemes ThemeOption → AWA Design System --- */
  --primary-color: var(--awa-red);
  --primary-hover: var(--awa-red-dark);
  --primary-light: var(--awa-red-light);
  --color-primary: var(--awa-red);
  --color-primary-dark: var(--awa-red-dark);
  --text-color: var(--awa-text);
  --color-text: var(--awa-text);
  --link-color: var(--awa-red);
  --link-color-hover: var(--awa-red-dark);
  --border-color: var(--awa-border);
  --border-hover: var(--awa-border-md);
  --font-primary: var(--awa-font);

  /* --- Aliases de border-radius legados (bundles antigos usam --awa-radius-*) --- */
  --awa-radius-xs: var(--r-xs);
  --awa-radius-sm: var(--r-sm);
  --awa-radius-md: var(--r-md);
  --awa-radius-full: var(--r-full);
  --awa-radius: var(--r-sm);
  --awa-radius-lg: 16px;

  /* --- Aliases de shadow legados --- */
  --awa-shadow-xs: var(--shadow-xs);
  --awa-shadow-sm: var(--shadow-sm);
  --awa-shadow-md: var(--shadow-md);
  --awa-shadow-lg: var(--shadow-lg);
  --awa-card-shadow: var(--shadow-sm);
  --awa-card-shadow-hover: var(--shadow-md);

  /* --- Z-index hierarchy canônica (referência central) --- */
  /* Modal B2B: 10200 | Banner pending: 10050 | Nav drawer: 1100 */
  /* Dropdown: 1000 | Sticky header: 500 | Float (FAB/back-top): 900 */
}

/* =============================================================
   2. .vela* FOOTER CLASSES
   Rokanthemes footer nativo: newsletter, serviços, menus, titles.
   ============================================================= */

/* Section titles */

.velaFooterTitle {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 0 var(--sp-4);
  display: block;
  width: 100%;
  text-align: left;
  cursor: default;
}

/* Footer menu links */

.velaFooterMenu,
.velaFooterLinks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.velaFooterMenu li,
.velaFooterLinks li {
  margin-bottom: var(--sp-2);
}

.velaFooterMenu a,
.velaFooterLinks a {
  font-size: var(--text-sm);
  color: rgb(255 255 255 / 65%);
  text-decoration: none;
  line-height: 1.5;
  transition: color var(--t-fast);
  display: inline-block;
}

.velaFooterMenu a:hover,
.velaFooterLinks a:hover {
  color: #fff;
}

/* Generic content wrappers */

.velaBlock {
  margin-bottom: var(--sp-6);
}

.velaContent {
  font-size: var(--text-sm);
  color: rgb(255 255 255 / 65%);
  line-height: 1.6;
}

.velaContentTitle {
  font-size: var(--text-base);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-3);
  display: block;
}

/* Services block (Trust & Hot Deals section on homepage) */

.velaServices {
  padding: var(--sp-6) 0;
}

.velaServicesInner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: flex-start;
}

.velaServicesInner--home,
.velaServicesInner--home5 {
  gap: var(--sp-5);
}

/* Newsletter in footer */

.velaNewsletterFooter {
  margin-top: var(--sp-4);
}

.velaNewsletterInner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.velaNewsletterInner .input-text,
.velaNewsletterInner input[type="email"],
.velaNewsletterInner input[type="text"] {
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 25%);
  color: #fff;
  border-radius: var(--r-xs);
  height: 42px;
  padding: 0 14px;
  font-size: var(--text-sm);
  transition: border-color var(--t-fast), background var(--t-fast);
}

.velaNewsletterInner .input-text::placeholder,
.velaNewsletterInner input::placeholder {
  color: rgb(255 255 255 / 45%);
}

.velaNewsletterInner .input-text:focus-visible,
.velaNewsletterInner input:focus-visible {
  border-color: rgb(255 255 255 / 60%);
  background: rgb(255 255 255 / 15%);
  outline: none;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 12%);
}

.velaNewsletterInner .action.subscribe,
.velaNewsletterInner .action.primary {
  background: var(--awa-red);
  border-color: var(--awa-red);
  color: #fff;
  height: 42px;
  border-radius: var(--r-xs);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 0 var(--sp-5);
}

.velaNewsletterInner .action.subscribe:hover,
.velaNewsletterInner .action.primary:hover {
  background: var(--awa-red-dark);
  border-color: var(--awa-red-dark);
}

/* Contact info block */

.vela-contactinfo {
  font-size: var(--text-sm);
  color: rgb(255 255 255 / 65%);
  line-height: 1.6;
}

.vela-contactinfo strong {
  color: #fff;
  font-weight: 700;
}

.vela-contactinfo a {
  color: rgb(255 255 255 / 65%);
  text-decoration: none;
  transition: color var(--t-fast);
}

.vela-contactinfo a:hover {
  color: #fff;
}

/* =============================================================
   3. SUPERDEALS MODULE (.super-deal*)
   Módulo de ofertas com countdown timer e lista de produtos.
   ============================================================= */

/* Main container */

.super-deal {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--awa-bg);
  border: 1px solid var(--awa-border);
  box-shadow: var(--shadow-sm);
}

/* Header */

.super-deal-header,
.super-deal .rokan-product-heading {
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--awa-border);
}

.super-deal-header h2,
.super-deal-header .section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--awa-text);
  margin: 0;
}

/* Banner image */

.super-deal-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sm);
}

.super-deal-banner img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform var(--t-slow);
}

.super-deal-banner:hover img {
  transform: scale(1.03);
}

.super-deal-banner-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 55%) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: var(--sp-5);
}

/* Countdown timer */

.super-deal-countdown {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--awa-border);
}

.super-deal-countdown .countdown-label,
.super-deal-countdown .label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--awa-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: var(--sp-2);
}

.super-deal-countdown .time-block,
.super-deal-countdown .countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  background: var(--awa-red);
  color: #fff;
  border-radius: var(--r-xs);
  padding: var(--sp-2) var(--sp-2);
  box-shadow: 0 2px 6px rgb(183 51 55 / 25%);
}

.super-deal-countdown .time-value,
.super-deal-countdown .value {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1;
}

.super-deal-countdown .time-unit,
.super-deal-countdown .unit {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin-top: 2px;
}

.super-deal-countdown .separator {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--awa-red);
  line-height: 1;
  margin: 0 2px;
}

/* Product list inside superdeal */

.super-deal-content {
  padding: var(--sp-4);
}

.super-deal-content .product-thumb {
  border-radius: var(--r-sm);
  border: 1px solid var(--awa-border);
  background: var(--awa-bg);
  transition: box-shadow var(--t-base), transform var(--t-base);
}

.super-deal-content .product-thumb:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

@media (width <= 767px) {
  .super-deal-countdown .time-block,
  .super-deal-countdown .countdown-block {
    min-width: 40px;
  }

  .super-deal-countdown .time-value,
  .super-deal-countdown .value {
    font-size: var(--text-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .super-deal-banner img,
  .super-deal-content .product-thumb {
    transition: none;
  }

  .super-deal-banner:hover img,
  .super-deal-content .product-thumb:hover {
    transform: none;
  }
}

/* =============================================================
   4. FIXED-RIGHT SIDEBAR (.fixed-right-ul)
   Links flutuantes à direita: account, wishlist, cart, scroll-top.
   ============================================================= */

.fixed-right-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.fixed-right-ul li {
  margin: 0;
}

.fixed-right-ul li > a {
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  background: var(--awa-bg);
  border: 1.5px solid var(--awa-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--awa-text-muted);
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast),
    color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  position: relative;
}

.fixed-right-ul li > a:hover {
  background: var(--awa-red);
  border-color: var(--awa-red);
  color: #fff;
  box-shadow: 0 4px 12px rgb(183 51 55 / 28%);
  transform: scale(1.08);
}

.fixed-right-ul li > a:focus-visible {
  outline: 2px solid var(--awa-red);
  outline-offset: 2px;
}

/* Icons inside */

.fixed-right-ul li > a em,
.fixed-right-ul li > a i {
  font-size: 16px;
  line-height: 1;
  transition: color var(--t-fast);
  pointer-events: none;
}

/* Tooltip label */

.fixed-right-ul li > a .tooltip-text,
.fixed-right-ul li > a [data-tooltip] {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--awa-text);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}

.fixed-right-ul li > a:hover .tooltip-text,
.fixed-right-ul li > a:hover [data-tooltip] {
  opacity: 1;
}

@media (width <= 767px) {
  .fixed-right-ul li > a {
    width: 36px;
    height: 36px;
  }

  .fixed-right-ul li > a em,
  .fixed-right-ul li > a i {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fixed-right-ul li > a {
    transition: none;
  }

  .fixed-right-ul li > a:hover {
    transform: none;
  }
}

/* =============================================================
   5. NEWSLETTER POPUP (.newsletter-popup, .vela-newsletter-popup)
   Popup de newsletter para novos visitantes.
   ============================================================= */

/* Overlay */

.newsletter-popup,
.vela-newsletter-popup,
.popup-newsletter {
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Panel */

.newsletter-popup-inner,
.newsletter-popup-content,
.popup-newsletter-inner {
  background: var(--awa-bg);
  border-radius: var(--r-md);
  padding: var(--sp-8);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 100%;
  position: relative;
}

/* Close button */

.newsletter-close,
.popup-newsletter-close,
.newsletter-popup .close-btn {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: transparent;
  border: none;
  color: var(--awa-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background var(--t-fast), color var(--t-fast);
}

.newsletter-close:hover,
.popup-newsletter-close:hover,
.newsletter-popup .close-btn:hover {
  background: var(--awa-bg-alt);
  color: var(--awa-text);
}

.newsletter-close:focus-visible,
.popup-newsletter-close:focus-visible {
  outline: 2px solid var(--awa-red);
  outline-offset: 2px;
}

/* Title & description */

.newsletter-popup-title,
.popup-newsletter-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--awa-text);
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}

.newsletter-popup-desc,
.popup-newsletter-desc {
  font-size: var(--text-sm);
  color: var(--awa-text-muted);
  margin-bottom: var(--sp-5);
  line-height: 1.6;
}

/* Form layout */

.newsletter-popup-form,
.popup-newsletter-form {
  display: flex;
  gap: var(--sp-2);
}

.newsletter-popup-form .input-text,
.newsletter-popup-form input[type="email"],
.popup-newsletter-form .input-text {
  flex: 1;
}

/* "Não mostrar" checkbox */

.newsletter-popup-no-show input[type="checkbox"],
.popup-newsletter-no-show input[type="checkbox"] {
  accent-color: var(--awa-red);
  width: 16px;
  height: 16px;
}

.newsletter-popup-no-show label,
.popup-newsletter-no-show label {
  font-size: var(--text-xs);
  color: var(--awa-text-muted);
  cursor: pointer;
}

@media (width <= 575px) {
  .newsletter-popup-inner,
  .newsletter-popup-content,
  .popup-newsletter-inner {
    padding: var(--sp-6);
    border-radius: var(--r-sm);
    margin: var(--sp-4);
  }

  .newsletter-popup-form,
  .popup-newsletter-form {
    flex-direction: column;
  }

  .newsletter-popup-title,
  .popup-newsletter-title {
    font-size: var(--text-xl);
  }
}

/* =============================================================
   6. MOBILE SUBMENU TOGGLE (.open-children-toggle)
   Expande/colapsa itens de submenu na navegação mobile.
   ============================================================= */

.open-children-toggle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--r-xs);
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
  flex-shrink: 0;
}

.open-children-toggle:hover {
  background: var(--awa-bg-alt);
}

.open-children-toggle:focus-visible {
  outline: 2px solid var(--awa-red);
  outline-offset: 2px;
}

/* Chevron arrow via pseudo-element */

.open-children-toggle::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--awa-text-muted);
  border-bottom: 2px solid var(--awa-text-muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform var(--t-fast), border-color var(--t-fast);
  flex-shrink: 0;
}

.open-children-toggle.active::before,
.active > .open-children-toggle::before,
[aria-expanded="true"] > .open-children-toggle::before {
  transform: rotate(225deg) translateY(-3px);
  border-color: var(--awa-red);
}

@media (prefers-reduced-motion: reduce) {
  .open-children-toggle,
  .open-children-toggle::before {
    transition: none;
  }
}

/* =============================================================
   7. CONSISTENCY ALIASES E MICRO-POLIMENTOS FINAIS
   ============================================================= */

/* Rokan quickview modal (loaded via deferred interaction CSS) */

.rokan-quickview-wrapper .product-name a,
.fancybox-wrap .product-name a {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--awa-text);
}

.rokan-quickview-wrapper .price-box .price {
  color: var(--awa-red);
  font-weight: 700;
}

/* Blog sidebar / post list */

.rokanthemes-blog .post-item {
  border-bottom: 1px solid var(--awa-border);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.rokanthemes-blog .post-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.rokanthemes-blog .post-title a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--awa-text);
  text-decoration: none;
  line-height: 1.45;
  transition: color var(--t-fast);
}

.rokanthemes-blog .post-title a:hover {
  color: var(--awa-red);
}

.rokanthemes-blog .post-date {
  font-size: var(--text-xs);
  color: var(--awa-text-muted);
  margin-top: 3px;
}

/* Price countdown (Superdeals / Price Countdown module) */

.product-price-countdown {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--awa-text-muted);
  margin-top: var(--sp-2);
}

.product-price-countdown .countdown-number {
  background: var(--awa-danger);
  color: #fff;
  border-radius: var(--r-xs);
  padding: 1px 5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Wishlist / compare toast notifications */

.mage-flash-message,
.message-notice.message.notice {
  border-left-color: var(--awa-info);
  background: rgb(14 165 233 / 8%);
}

/* Most viewed / on sale product heading */

.rokan-onsale .rokan-product-heading h2,
.rokan-mostviewed .rokan-product-heading h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--awa-text);
}

/* Layered navigation filter sidebar */

.filter-options-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--awa-text);
  border-bottom: 1px solid var(--awa-border);
  padding: var(--sp-3) 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--t-fast);
}

.filter-options-title:hover {
  color: var(--awa-red);
}

.filter-options-title::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
  transform: rotate(45deg);
  transition: transform var(--t-fast);
  flex-shrink: 0;
}

.filter-options-item.active .filter-options-title::after {
  transform: rotate(225deg);
}

.filter-options-content .item a {
  font-size: var(--text-sm);
  color: var(--awa-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 0;
  transition: color var(--t-fast);
}

.filter-options-content .item a:hover {
  color: var(--awa-red);
}

.filter-options-content .item.active a,
.filter-options-content .item a.am_shopby_link_selected {
  font-weight: 700;
  color: var(--awa-red);
}

/* Swatch color filters */

.swatch-option.color {
  border: 2px solid transparent;
  border-radius: var(--r-xs);
  transition: border-color var(--t-fast), transform var(--t-fast);
}

.swatch-option.color:hover {
  border-color: var(--awa-text-muted);
  transform: scale(1.1);
}

.swatch-option.color.selected {
  border-color: var(--awa-red);
}
