/*
Theme Name: Red Dragon
Theme URI: https://example.com/red-dragon
Author: AI Assistant
Description: Кастомная тема для ресторана «Красный дракон».
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: red-dragon
*/

:root {
  --rd-bg: #f9fafb;
  --rd-text: #0a0a0a;
  --rd-muted: #4a5565;
  --rd-card-text: #717182;
  --rd-body-text: #364153;
  --rd-accent: #e7000b;
  --rd-footer-bg: #82181a;
  --rd-footer-muted: #ffc9c9;
  --rd-footer-soft: #ffa2a2;
  --rd-footer-border: #9f0712;
  --rd-stat-bg: #ffe2e2;
  --rd-input-bg: #f3f3f5;
  --rd-border: rgba(0, 0, 0, 0.1);
  --rd-max: 1280px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--rd-text);
  background: #fff;
}

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

.rd-site {
  width: 100%;
}

.rd-container {
  width: min(var(--rd-max), calc(100% - 64px));
  margin: 0 auto;
}

.rd-header {
  background: #fff;
  border-bottom: 1px solid var(--rd-border);
  height: 65px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.rd-header__inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rd-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  line-height: 28px;
}

.rd-brand img {
  width: 32px;
  height: 32px;
}

.rd-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.rd-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 24px;
  color: var(--rd-body-text);
}

.rd-nav__item img {
  width: 20px;
  height: 20px;
}

.rd-nav__item--active {
  color: var(--rd-accent);
}

.rd-main {
  background: var(--rd-bg);
}

.rd-hero {
  position: relative;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.rd-hero__content {
  position: relative;
  color: #fff;
  text-align: center;
  max-width: 768px;
  padding: 24px 16px;
}

.rd-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1;
  font-weight: 500;
}

.rd-hero p {
  margin: 0 0 32px;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.35;
}

.rd-btn {
  border: 0;
  border-radius: 8px;
  background: var(--rd-accent);
  color: #fff;
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
}

.rd-btn--ghost {
  background: #fff;
  border: 1px solid var(--rd-border);
  color: var(--rd-text);
}

.rd-btn--full {
  width: 100%;
  height: 36px;
}

.rd-popular {
  padding: 64px 0;
}

.rd-section-title {
  margin: 0;
  text-align: center;
  font-size: clamp(30px, 4vw, 36px);
  line-height: 40px;
  font-weight: 500;
}

.rd-section-subtitle {
  margin: 16px 0 0;
  text-align: center;
  font-size: 18px;
  line-height: 28px;
  color: var(--rd-muted);
}

.rd-menu-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.rd-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  overflow: hidden;
}

.rd-card img {
  width: 100%;
  height: 214px;
  display: block;
  object-fit: cover;
}

.rd-card__content {
  padding: 24px;
}

.rd-card__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
}

.rd-card__desc {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--rd-card-text);
  min-height: 72px;
}

.rd-card__price {
  margin: 16px 0 0;
  font-size: 24px;
  line-height: 32px;
  color: var(--rd-accent);
  font-weight: 600;
}

.rd-center {
  text-align: center;
}

.rd-menu-more {
  margin-top: 32px;
}

.rd-booking-wrap {
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  background: #fff;
  padding: 64px 0;
}

.rd-booking {
  width: min(622px, calc(100% - 48px));
  margin: 0 auto;
}

.rd-booking h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
}

.rd-booking p {
  margin: 6px 0 0;
  color: var(--rd-card-text);
  font-size: 16px;
  line-height: 24px;
}

.rd-form {
  margin-top: 24px;
}

.rd-field {
  margin-bottom: 16px;
}

.rd-field__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
}

.rd-field__label img {
  width: 16px;
  height: 16px;
}

.rd-input {
  width: 100%;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--rd-input-bg);
  padding: 0 12px;
  color: var(--rd-text);
  font-size: 14px;
  line-height: 1;
}

.rd-input::placeholder {
  color: var(--rd-card-text);
}

.rd-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rd-about {
  padding: 64px 0;
}

.rd-about__grid {
  display: grid;
  grid-template-columns: minmax(0, 584px) minmax(0, 584px);
  gap: 48px;
  align-items: start;
}

.rd-about h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 36px);
  line-height: 40px;
  font-weight: 500;
}

.rd-about p {
  margin: 24px 0 0;
  color: var(--rd-body-text);
  font-size: 18px;
  line-height: 28px;
}

.rd-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rd-stat {
  background: var(--rd-stat-bg);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}

.rd-stat__value {
  margin: 0;
  font-size: 36px;
  line-height: 40px;
}

.rd-stat__label {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--rd-body-text);
}

.rd-footer {
  padding: 48px 0 0;
  background: var(--rd-footer-bg);
  color: #ffe2e2;
}

.rd-footer__top {
  padding-bottom: 32px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.rd-footer h3,
.rd-footer h4 {
  margin: 0 0 16px;
}

.rd-footer h3 {
  font-size: 24px;
  line-height: 32px;
}

.rd-footer h4 {
  font-size: 18px;
  line-height: 28px;
}

.rd-footer p,
.rd-footer li,
.rd-footer a {
  color: var(--rd-footer-muted);
  font-size: 16px;
  line-height: 24px;
}

.rd-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rd-icon-text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.rd-icon-text img {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.rd-social {
  display: flex;
  gap: 16px;
  margin: 4px 0 20px;
}

.rd-social a {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rd-footer-border);
}

.rd-social img {
  width: 20px;
  height: 20px;
}

.rd-social-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

.rd-social-icon__layer {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
}

.rd-payments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.rd-payment {
  border-radius: 4px;
  background: #fff;
  color: #1e2939 !important;
  padding: 4px 12px;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 600;
}

.rd-footer__bottom {
  border-top: 1px solid var(--rd-footer-border);
  padding: 25px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.rd-footer__bottom,
.rd-footer__bottom a {
  color: var(--rd-footer-soft);
  font-size: 14px;
  line-height: 20px;
}

.rd-footer__links {
  display: flex;
  gap: 24px;
}

.rd-delivery-page {
  background: var(--rd-bg);
}

.rd-delivery-banner {
  background: linear-gradient(90deg, #e7000b 0%, #fb2c36 100%);
  min-height: 220px;
  display: flex;
  align-items: flex-start;
}

.rd-delivery-banner__inner {
  padding: 64px 32px 0;
}

.rd-delivery-banner h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(40px, 4.5vw, 48px);
  line-height: 48px;
  font-weight: 500;
}

.rd-delivery-banner p {
  margin: 16px 0 0;
  color: #fff;
  font-size: 20px;
  line-height: 28px;
}

.rd-delivery-features {
  padding: 48px 0 0;
}

.rd-delivery-features__grid {
  width: min(1216px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.rd-delivery-feature {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.1);
  padding: 24px;
  min-height: 172px;
  text-align: center;
}

.rd-delivery-feature__icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #ffe2e2;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rd-delivery-feature__icon-wrap img {
  width: 24px;
  height: 24px;
}

.rd-delivery-feature h3 {
  margin: 16px 0 8px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
}

.rd-delivery-feature p {
  margin: 0;
  color: var(--rd-muted);
  font-size: 16px;
  line-height: 24px;
}

.rd-delivery-sets {
  padding: 48px 0;
}

.rd-delivery-sets__inner {
  width: min(1280px, 100%);
  padding: 0 32px;
}

.rd-delivery-sets__head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 36px;
  font-weight: 500;
}

.rd-delivery-sets__head p {
  margin: 16px 0 0;
  color: var(--rd-muted);
  font-size: 18px;
  line-height: 28px;
}

.rd-delivery-sets__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.rd-delivery-set-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  overflow: hidden;
}

.rd-delivery-set-card__image {
  display: block;
  width: 100%;
  height: 214px;
  object-fit: cover;
}

.rd-delivery-set-card__body {
  padding: 24px;
}

.rd-delivery-set-card__body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
}

.rd-delivery-set-card__body p {
  margin: 8px 0 0;
  color: var(--rd-card-text);
  font-size: 16px;
  line-height: 24px;
  min-height: 72px;
}

.rd-delivery-set-card__price {
  margin-top: 16px;
  color: var(--rd-accent);
  font-size: 32px;
  line-height: 32px;
  font-weight: 600;
}

.rd-delivery-set-card__footer {
  padding: 0 24px 24px;
}

.rd-delivery-set-card__footer form {
  margin: 0;
}

.rd-delivery-add-btn {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--rd-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
}

.rd-delivery-add-btn img {
  width: 16px;
  height: 16px;
}

.rd-delivery-order {
  background: #fff;
  padding: 48px 0;
}

.rd-delivery-order__inner {
  width: min(768px, 100%);
}

.rd-delivery-order h2 {
  margin: 0 0 24px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 500;
}

.rd-delivery-order ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rd-delivery-order li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 18px;
  line-height: 28px;
}

.rd-delivery-order__num {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--rd-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 24px;
}

.rd-cart-badge {
  min-width: 16px;
  height: 16px;
  border-radius: 9999px;
  padding: 0 5px;
  background: #e7000b;
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.rd-cart-page {
  padding: 48px 0;
}

.rd-cart-layout {
  width: min(1280px, calc(100% - 64px));
}

.rd-cart-title {
  margin: 0 0 40px;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.1;
  font-weight: 500;
}

.rd-cart-grid {
  display: grid;
  grid-template-columns: minmax(0, 796px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.rd-cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rd-cart-item {
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  background: #fff;
  padding: 24px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 20px;
  gap: 24px;
  align-items: start;
}

.rd-cart-item__image {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
}

.rd-cart-item__body h3 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
}

.rd-cart-item__price {
  margin: 8px 0 16px;
  color: var(--rd-accent);
  font-size: 32px;
  line-height: 1;
  font-weight: 600;
}

.rd-cart-item__qty {
  width: 96px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.rd-cart-item__qty form {
  margin: 0;
  display: inline-flex;
}

.rd-cart-item__qty button {
  border: 0;
  background: transparent;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.rd-cart-item__qty img {
  width: 16px;
  height: 16px;
}

.rd-cart-item__qty span {
  font-size: 16px;
  line-height: 24px;
  color: #111827;
}

.rd-cart-item__delete {
  border: 0;
  background: transparent;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 2px;
  cursor: pointer;
}

.rd-cart-item__delete img {
  width: 20px;
  height: 20px;
}

.rd-cart-checkout {
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  background: #fff;
  padding: 24px;
}

.rd-cart-checkout h2 {
  margin: 0 0 24px;
  font-size: 30px;
  line-height: 36px;
  font-weight: 500;
}

.rd-cart-checkout form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rd-cart-checkout label {
  display: block;
}

.rd-cart-checkout label:not(.rd-cart-payment-option) > span,
.rd-cart-payments__label {
  display: block;
  margin-bottom: 8px;
  color: #4b5563;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.rd-cart-checkout input,
.rd-cart-checkout textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  font-size: 16px;
  line-height: 24px;
  padding: 10px 12px;
}

.rd-cart-checkout input {
  height: 44px;
}

.rd-cart-checkout textarea {
  min-height: 72px;
  resize: none;
}

.rd-cart-payments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rd-cart-payment-option {
  display: block;
  cursor: pointer;
}

.rd-cart-payment-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rd-cart-payment-option__content {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: 20px 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rd-cart-payment-option__input:checked + .rd-cart-payment-option__content {
  border-color: #fecaca;
  background: #fff5f5;
}

.rd-cart-payment-option__radio {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: 2px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rd-cart-payment-option__radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #e7000b;
  opacity: 0;
  display: block;
}

.rd-cart-payment-option__input:checked + .rd-cart-payment-option__content .rd-cart-payment-option__radio {
  border-color: #e7000b;
}

.rd-cart-payment-option__input:checked + .rd-cart-payment-option__content .rd-cart-payment-option__radio::after {
  opacity: 1;
}

.rd-cart-payment-option__content > img {
  width: 24px;
  height: 24px;
  display: block;
}

.rd-cart-payment-option__title {
  display: block;
  margin: 0;
  color: #111827;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.rd-cart-payment-option__content small {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 14px;
  line-height: 20px;
}

.rd-cart-summary {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.rd-cart-summary__line {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rd-cart-summary__line span {
  font-size: 18px;
  line-height: 28px;
}

.rd-cart-summary__line strong {
  color: var(--rd-accent);
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
}

.rd-cart-summary p {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 14px;
  line-height: 20px;
}

.rd-cart-empty-page {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
}

.rd-cart-empty-wrap {
  width: min(640px, 100%);
  position: relative;
}

.rd-cart-empty-content {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  text-align: center;
  padding: 40px 24px;
}

.rd-cart-empty-content > img {
  width: 64px;
  height: 64px;
}

.rd-cart-empty-content h1 {
  margin: 24px 0 8px;
  font-size: 36px;
  line-height: 40px;
  font-weight: 500;
}

.rd-cart-empty-content p {
  margin: 0 0 24px;
  color: var(--rd-muted);
  font-size: 18px;
  line-height: 28px;
}

.rd-cart-toast {
  position: absolute;
  right: 0;
  bottom: -72px;
  width: min(320px, 100%);
  border: 1px solid #fecaca;
  background: #fff1f2;
  border-radius: 10px;
  padding: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rd-cart-toast img {
  width: 20px;
  height: 20px;
}

.rd-cart-toast span {
  color: #9f1239;
  font-size: 14px;
  line-height: 20px;
}

@media (max-width: 1200px) {
  .rd-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rd-delivery-features__grid,
  .rd-delivery-sets__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rd-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rd-cart-grid {
    grid-template-columns: 1fr;
  }
}

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

  .rd-header {
    height: auto;
  }

  .rd-header__inner {
    height: auto;
    padding: 12px 0;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .rd-nav {
    gap: 14px;
    flex-wrap: wrap;
  }

  .rd-menu-grid,
  .rd-delivery-features__grid,
  .rd-delivery-sets__grid,
  .rd-about__grid,
  .rd-row-2,
  .rd-footer__top {
    grid-template-columns: 1fr;
  }

  .rd-delivery-banner {
    min-height: 180px;
  }

  .rd-delivery-banner__inner {
    padding: 36px 16px 0;
  }

  .rd-delivery-banner h1 {
    font-size: 34px;
    line-height: 1.1;
  }

  .rd-delivery-banner p {
    font-size: 18px;
    line-height: 1.35;
  }

  .rd-delivery-sets__inner {
    padding: 0 16px;
  }

  .rd-delivery-set-card__price {
    font-size: 24px;
  }

  .rd-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .rd-cart-layout {
    width: min(1280px, calc(100% - 32px));
  }

  .rd-cart-page {
    padding: 32px 0;
  }

  .rd-cart-title {
    margin-bottom: 24px;
    font-size: 34px;
  }

  .rd-cart-item {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
  }

  .rd-cart-item__image {
    width: 88px;
    height: 88px;
  }

  .rd-cart-item__delete {
    grid-column: 2;
    justify-self: end;
    margin-top: -8px;
  }

  .rd-cart-item__body h3 {
    font-size: 18px;
    line-height: 24px;
  }

  .rd-cart-item__price {
    font-size: 24px;
  }

  .rd-cart-checkout h2 {
    font-size: 26px;
    line-height: 32px;
  }

  .rd-cart-empty-content h1 {
    font-size: 30px;
    line-height: 36px;
  }

  .rd-cart-empty-content p {
    font-size: 16px;
    line-height: 24px;
  }

  .rd-cart-toast {
    position: static;
    width: 100%;
    margin-top: 16px;
  }
}
