﻿/*
Theme Name: RL PWA Mobile V15
Theme URI: https://rlmateriais.com
Author: Codex
Description: Tema leve mobile-first para o MVP PWA da RL Materiais com WooCommerce.
Version: 0.2.5
Text Domain: rl-pwa-mobile
*/

:root {
  --rl-black: #111111;
  --rl-ink: #202026;
  --rl-muted: #6b6b78;
  --rl-line: #e7e7ee;
  --rl-soft: #f7f7fa;
  --rl-card: #ffffff;
  --rl-pink: #ec2f7b;
  --rl-pink-dark: #bf1f60;
  --rl-green: #1ea66a;
  --rl-yellow: #ffe06b;
  --rl-shadow: 0 12px 34px rgba(17, 17, 17, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--rl-soft);
  color: var(--rl-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  margin: 0;
  min-height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.rl-app {
  margin: 0 auto;
  max-width: 760px;
  min-height: 100vh;
  padding-bottom: 96px;
}

.rl-topbar {
  background: var(--rl-card);
  border-bottom: 1px solid var(--rl-line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.rl-topbar__inner {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 16px 9px;
}

.rl-brand {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

html.rl-modal-open,
html.rl-modal-open body {
  overflow: hidden;
}

.rl-brand__mark {
  align-items: center;
  background: var(--rl-black);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 950;
  height: 36px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  position: relative;
  width: 36px;
}

.rl-brand__mark::after {
  background: var(--rl-pink);
  border: 2px solid #ffffff;
  border-radius: 999px;
  content: "";
  height: 8px;
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
}

.rl-brand__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rl-brand__text strong {
  color: var(--rl-black);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.rl-brand__text span {
  color: var(--rl-muted);
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rl-status-pill {
  align-items: center;
  background: #fff4f8;
  border: 1px solid #ffc0d7;
  border-radius: 999px;
  color: var(--rl-pink-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
}

.rl-status-pill::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.rl-status-pill.is-open {
  background: #effff6;
  border-color: #a8e5c4;
  color: var(--rl-green);
}

.rl-status-pill.is-closed {
  background: #fff4f8;
  border-color: #ffc0d7;
  color: var(--rl-pink-dark);
}

.rl-hero {
  background: linear-gradient(135deg, var(--rl-black) 0%, #24242c 58%, #3b1430 100%);
  color: #ffffff;
  display: grid;
  gap: 16px;
  padding: 18px 16px 20px;
}

.rl-hero__eyebrow {
  color: var(--rl-yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.rl-hero h1 {
  font-size: clamp(28px, 9vw, 46px);
  line-height: 0.96;
  margin: 0;
  max-width: 9ch;
}

.rl-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.45;
  margin: 10px 0 0;
  max-width: 32rem;
}

.rl-hero__meta {
  align-content: start;
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rl-hero__meta span {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.rl-hero__meta svg {
  color: var(--rl-yellow);
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.rl-hero__meta span:nth-child(2) svg {
  color: #ff8fbd;
}

.rl-hero__meta span:nth-child(3) svg {
  color: #9be7c3;
}

.rl-search {
  background: var(--rl-card);
  border-bottom: 1px solid var(--rl-line);
  padding: 12px 16px 14px;
  position: sticky;
  top: 67px;
  z-index: 20;
}

.rl-search__field {
  align-items: center;
  background: var(--rl-soft);
  border: 1px solid var(--rl-line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
}

.rl-search__icon {
  color: var(--rl-muted);
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.rl-search input {
  background: transparent;
  border: 0;
  color: var(--rl-ink);
  min-width: 0;
  outline: none;
  width: 100%;
}

.rl-categories {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.rl-categories::-webkit-scrollbar {
  display: none;
}

.rl-chip {
  background: #ffffff;
  border: 1px solid var(--rl-line);
  border-radius: 999px;
  color: var(--rl-muted);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 750;
  min-height: 36px;
  padding: 0 14px;
}

.rl-chip.is-active {
  background: var(--rl-black);
  border-color: var(--rl-black);
  color: #ffffff;
}

.rl-section {
  padding: 18px 16px 6px;
}

.rl-section__head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rl-section__head h2 {
  color: var(--rl-black);
  font-size: 18px;
  line-height: 1.1;
  margin: 0;
}

.rl-section__head a,
.rl-section__head span {
  color: var(--rl-pink-dark);
  font-size: 13px;
  font-weight: 800;
}

.rl-product-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rl-product-card {
  background: var(--rl-card);
  border: 1px solid var(--rl-line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.rl-product-card.is-hidden {
  display: none;
}

.rl-product-card__image {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.rl-product-card__image img {
  height: 100%;
  object-fit: contain;
  padding: 10px;
  width: 100%;
}

.rl-product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.rl-product-card__category {
  color: var(--rl-pink-dark);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  min-height: 12px;
  text-transform: uppercase;
}

.rl-product-card h3 {
  color: var(--rl-black);
  font-size: 13px;
  line-height: 1.25;
  margin: 0;
  min-height: 32px;
}

.rl-product-card__title {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: -webkit-box;
  font: inherit;
  font-weight: 850;
  padding: 0;
  text-align: left;
  width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rl-product-card__price {
  color: var(--rl-black);
  font-size: 14px;
  font-weight: 850;
  margin-top: auto;
}

.rl-product-card__price del {
  color: var(--rl-muted);
  font-size: 12px;
  font-weight: 500;
}

.rl-product-card__button {
  align-items: center;
  background: var(--rl-pink);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  width: 100%;
}

.rl-product-card__stock {
  background: #effff6;
  border: 1px solid #c7efd8;
  border-radius: 999px;
  color: var(--rl-green);
  display: inline-flex;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  padding: 5px 7px;
  width: fit-content;
}

.rl-product-card__button:disabled,
.rl-product-card__button.is-disabled,
.rl-product-modal__button:disabled,
.rl-product-modal__button.is-disabled {
  background: #c9c9d1;
  color: #6f6f79;
  cursor: not-allowed;
  pointer-events: none;
}

.rl-empty-state {
  background: #ffffff;
  border: 1px dashed var(--rl-line);
  border-radius: 8px;
  color: var(--rl-muted);
  display: none;
  font-size: 14px;
  padding: 18px;
  text-align: center;
}

.rl-empty-state.is-visible {
  display: block;
}

.rl-cart-bar {
  align-items: center;
  background: var(--rl-black);
  border-radius: 8px 8px 0 0;
  bottom: 0;
  box-shadow: var(--rl-shadow);
  color: #ffffff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  left: 50%;
  max-width: 760px;
  padding: 12px 14px;
  position: fixed;
  transform: translateX(-50%);
  width: 100%;
  z-index: 40;
}

.rl-cart-bar__info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rl-cart-bar__label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 700;
}

.rl-cart-bar__total {
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
}

.rl-cart-bar__button {
  align-items: center;
  background: var(--rl-yellow);
  border-radius: 8px;
  color: #111111;
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
}

.rl-cart-bar__actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
}

.rl-cart-bar__clear {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
}

.rl-cart-bar__clear:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.rl-product-modal[hidden] {
  display: none;
}

.rl-product-modal {
  bottom: 0;
  display: grid;
  left: 0;
  place-items: end center;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 80;
}

.rl-product-modal__backdrop {
  background: rgba(10, 10, 14, 0.64);
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.rl-product-modal__panel {
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -18px 50px rgba(17, 17, 17, 0.2);
  max-height: min(86vh, 760px);
  max-width: 760px;
  overflow-y: auto;
  padding: 18px 16px 20px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.rl-product-modal__close {
  align-items: center;
  background: var(--rl-soft);
  border: 1px solid var(--rl-line);
  border-radius: 999px;
  color: var(--rl-ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 850;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
}

.rl-product-modal__image-wrap {
  align-items: center;
  aspect-ratio: 1.18 / 1;
  background: #ffffff;
  border: 1px solid var(--rl-line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  overflow: hidden;
}

.rl-product-modal__image {
  height: 100%;
  object-fit: contain;
  padding: 14px;
  width: 100%;
}

.rl-product-modal__stock {
  background: #effff6;
  border: 1px solid #a8e5c4;
  border-radius: 999px;
  color: var(--rl-green);
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 8px;
  padding: 6px 10px;
}

.rl-product-modal__stock.is-unavailable {
  background: #fff4f8;
  border-color: #ffc0d7;
  color: var(--rl-pink-dark);
}

.rl-product-modal h2 {
  color: var(--rl-black);
  font-size: 20px;
  line-height: 1.15;
  margin: 0 42px 8px 0;
}

.rl-product-modal__price {
  color: var(--rl-black);
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 10px;
}

.rl-product-modal__description {
  color: var(--rl-muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 16px;
}

.rl-product-modal__quantity {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.rl-product-modal__quantity > span {
  color: var(--rl-black);
  font-size: 13px;
  font-weight: 850;
}

.rl-stepper {
  align-items: center;
  border: 1px solid var(--rl-line);
  border-radius: 8px;
  display: inline-flex;
  overflow: hidden;
}

.rl-stepper button {
  align-items: center;
  background: var(--rl-soft);
  border: 0;
  color: var(--rl-black);
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 40px;
}

.rl-stepper input {
  border: 0;
  border-left: 1px solid var(--rl-line);
  border-right: 1px solid var(--rl-line);
  color: var(--rl-black);
  font-size: 14px;
  font-weight: 850;
  height: 38px;
  text-align: center;
  width: 54px;
}

.rl-product-modal__button {
  align-items: center;
  background: var(--rl-pink);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  width: 100%;
}

.rl-notice {
  background: #ffffff;
  border: 1px solid var(--rl-line);
  border-left: 4px solid var(--rl-pink);
  border-radius: 8px;
  color: var(--rl-muted);
  margin: 16px;
  padding: 14px;
}

.rl-toast {
  background: var(--rl-black);
  border-radius: 8px;
  bottom: 82px;
  color: #ffffff;
  font-size: 13px;
  left: 50%;
  max-width: calc(100% - 32px);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.rl-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.rl-wc-page {
  margin: 0 auto;
  max-width: 920px;
  padding: 24px 16px 96px;
}

body.woocommerce-checkout,
body.woocommerce-cart,
body.woocommerce-account {
  background: var(--rl-soft);
}

.rl-wc-page .woocommerce {
  background: #ffffff;
  border: 1px solid var(--rl-line);
  border-radius: 8px;
  padding: 16px;
}

@media (min-width: 700px) {
  .rl-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rl-hero {
    border-radius: 0 0 8px 8px;
    grid-template-columns: 1.2fr 1fr;
    padding: 28px 24px;
  }

  .rl-section,
  .rl-search,
  .rl-topbar__inner {
    padding-left: 24px;
    padding-right: 24px;
  }
}
