/* =========================================================
   RumaShop — Semantic HTML5 Ecommerce
   ========================================================= */

:root {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-soft: #efeee8;
  --text: #1d1d1b;
  --muted: #6c6c66;
  --line: #dfded7;
  --accent: #1d1d1b;
  --radius: 18px;
  --container: 1180px;
  --shadow: 0 14px 40px rgba(20, 20, 16, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--text);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 243, 0.94);
  border-bottom: 1px solid rgba(223, 222, 215, 0.8);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
}

.brand-name {
  font-size: 1.12rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.primary-nav a,
.footer-grid nav a,
.footer-bottom a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.primary-nav a:hover,
.footer-grid nav a:hover,
.footer-bottom a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.cart-button,
.menu-toggle,
.dialog-close {
  border: 0;
  background: transparent;
}

.icon-button,
.cart-button {
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
}

.icon-button:hover,
.cart-button:hover {
  background: var(--surface-soft);
}

.cart-button {
  position: relative;
}

.cart-count {
  display: grid;
  place-items: center;
  position: absolute;
  right: -2px;
  top: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 10px;
}

.hero {
  padding: 72px 0 88px;
  background: var(--surface-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 70px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.75rem;
  font-weight: 800;
}

.hero h1 {
  max-width: 720px;
  margin: 0px;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  background: transparent;
  border-color: var(--line);
}

.button-light {
  background: #fff;
  color: var(--text);
}

.button-full {
  width: 100%;
}

.hero-visual {
  min-height: 750px;
  position: relative;
}

.hero-card {
  position: absolute;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card-main {
  width: min(95%, 650px);
  right: 0;
  top: 20px;
  padding: 18px;
}

.hero-card-main img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-card-main strong,
.hero-card-main > span:last-child {
  display: block;
  margin: 8px 4px 0;
}

.hero-card-main > span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-card-small {
  width: 210px;
  left: 0px;
  bottom: 40%;
  padding: 12px;
  transform: rotate(-8deg);
}

.hero-card-small img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-card-small strong {
  display: block;
  padding: 8px 4px 4px;
}

.hero-badge {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 2;
  padding: 7px 11px;
  background: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.product-art {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e7e4d8, #d1cec1);
  color: rgba(29, 29, 27, 0.45);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.product-art-large {
  height: 380px;
  font-size: 3rem;
}

.product-art-small {
  height: 145px;
  font-size: 1.4rem;
}

.section {
  padding: 92px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}

.section-heading h2,
.value-section h2,
.cta-section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-heading > p {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border-radius: 13px;
  background: var(--surface-soft);
}

.category-card h3 {
  margin: 0 0 2px;
  font-size: 1.1rem;
}

.category-card > span:last-child {
  color: var(--muted);
  font-size: 0.84rem;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  font-weight: 750;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.product-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-image-link {
  display: block;
}

.product-image {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.08;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: rgba(29, 29, 27, 0.42);
  transition: transform 0.3s ease;
}

.product-image-1 {
  background: #e3dfd2;
}
.product-image-2 {
  background: #ded9cf;
}
.product-image-3 {
  background: #d5ddd9;
}
.product-image-4 {
  background: #d9d5cc;
}

.product-card:hover .product-image {
  transform: scale(1.025);
}

.product-info {
  padding: 18px;
}

.product-category {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 750;
}

.product-info h3 {
  margin: 0;
  font-size: 1rem;
}

.rating {
  margin-top: 9px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.rating span {
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 4px;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.price {
  font-weight: 800;
}

.add-cart {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 1.3rem;
}

.value-section {
  background: var(--surface-soft);
}

.value-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
}

.value-list {
  display: grid;
  gap: 24px;
}

.value-list article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.value-list article > span {
  color: var(--muted);
  font-weight: 800;
}

.value-list h3,
.value-list p {
  margin: 0;
}

.value-list p {
  margin-top: 5px;
  color: var(--muted);
}

.cta-section {
  padding: 78px 0;
  background: var(--text);
  color: #fff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-section .eyebrow,
.cta-section p {
  color: rgba(255, 255, 255, 0.62);
}

.cta-section h2 {
  max-width: 700px;
}

.cta-section .button {
  flex: 0 0 auto;
}

.site-footer {
  padding: 70px 0 24px;
  background: #121210;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 54px;
}

.footer-brand p {
  max-width: 320px;
  color: rgba(255, 255, 255, 0.58);
}

.footer-grid nav,
.footer-grid > div:not(.footer-brand) {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-grid h2 {
  margin: 0 0 8px;
  font-size: 0.85rem;
}

.footer-grid nav a,
.footer-grid address {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
  font-style: normal;
}

.footer-grid address a {
  color: inherit;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom div {
  display: flex;
  gap: 18px;
}

.cart-dialog {
  width: min(520px, calc(100% - 24px));
  padding: 24px;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.cart-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.dialog-head,
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-head h2 {
  margin: 0;
}

.dialog-close {
  font-size: 1.8rem;
}

.cart-items {
  min-height: 100px;
  padding: 20px 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-total {
  margin-bottom: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

@media (max-width: 960px) {
  .hero-grid,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 430px;
    max-width: 650px;
    width: 100%;
    margin: auto;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-grid > div:last-child {
    grid-column: 2 / -1;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .header-inner {
    min-height: 68px;
    gap: 10px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
    order: 2;
  }

  .primary-nav {
    display: none;
    position: absolute;
    left: 14px;
    right: 14px;
    top: 68px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 12px;
    border-radius: 10px;
  }

  .primary-nav a:hover {
    background: var(--surface-soft);
  }

  .header-actions {
    order: 3;
  }

  .hero {
    padding: 54px 0 50px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 14vw, 4.2rem);
  }

  .hero-visual {
    min-height: 350px;
  }

  .hero-card-main {
    width: 82%;
  }

  .product-art-large {
    height: 260px;
  }

  .hero-card-small {
    width: 165px;
  }

  .product-art-small {
    height: 110px;
  }

  .section {
    padding: 64px 0;
  }

  .section-heading,
  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    gap: 15px;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .category-card {
    min-height: 155px;
    padding: 16px;
  }

  .product-info {
    padding: 13px;
  }

  .product-info h3 {
    font-size: 0.92rem;
  }

  .price {
    font-size: 0.9rem;
  }

  .add-cart {
    width: 34px;
    height: 34px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 35px 20px;
  }

  .footer-grid .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-grid > div:last-child {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .brand-name {
    font-size: 1rem;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 130px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-visual {
    min-height: 315px;
  }

  .hero-card-small {
    width: 145px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
