/*
Theme Name: Telegram Store
Description: Bilingual, mobile-first WooCommerce theme for a simple Telegram storefront.
Version: 0.3.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: telegram-store
*/

:root {
  --brand: #2563eb;
  --brand-deep: #1646b8;
  --brand-soft: #e9f1ff;
  --brand-mist: #f5f8ff;
  --ink: #10213a;
  --muted: #66758b;
  --line: #dfe7f2;
  --surface: #ffffff;
  --page: #f7f9fd;
  --success: #0a7a55;
  --danger: #b42318;
  --shadow-sm: 0 8px 24px rgba(28, 58, 112, 0.08);
  --shadow-lg: 0 24px 70px rgba(28, 58, 112, 0.15);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  color-scheme: light;
  font-family: Inter, "Noto Sans Khmer", "Khmer Sangam MN", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header {
  top: 32px;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 3px;
}

.khmer-copy {
  font-family: "Noto Sans Khmer", "Khmer Sangam MN", system-ui, sans-serif;
}

.site-main {
  min-height: 65vh;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid rgba(223, 231, 242, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  gap: 16px;
}

.site-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.site-brand__mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 13px;
  background: var(--brand);
  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.25);
  color: #fff;
  font-size: 19px;
  font-weight: 850;
}

.site-brand__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.18;
}

.site-brand__copy strong {
  overflow: hidden;
  max-width: 39vw;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-brand__copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.site-cart {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}

.site-cart:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.site-cart__label {
  display: none;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.05;
}

.site-cart__label small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.site-cart__count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 10%, rgba(108, 168, 255, 0.25), transparent 34%),
    linear-gradient(155deg, #f8fbff 0%, #eaf2ff 100%);
}

.hero::after {
  position: absolute;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 50%;
  content: "";
  right: -130px;
  top: -90px;
}

.hero__inner {
  display: grid;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 54px;
  gap: 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow span {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.hero h1 {
  margin: 0;
  max-width: 660px;
  font-size: clamp(45px, 12vw, 84px);
  font-weight: 850;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.hero h1 em {
  color: var(--brand);
  font-style: normal;
}

.hero__khmer {
  margin: 18px 0 0;
  color: var(--brand-deep);
  font-size: clamp(19px, 5vw, 27px);
  font-weight: 700;
}

.hero__intro {
  max-width: 520px;
  margin: 22px 0 0;
  color: #4a5c75;
  font-size: 17px;
}

.hero__intro.khmer-copy {
  margin-top: 3px;
  font-size: 14px;
}

.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wc-block-components-button {
  display: inline-flex !important;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--brand) !important;
  box-shadow: none !important;
  color: #fff !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-align: center;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wc-block-components-button:hover {
  background: var(--brand-deep) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.button span {
  font-size: 12px;
  font-weight: 600;
}

.hero__cta {
  width: 100%;
  margin-top: 28px;
}

.hero__visual {
  display: grid;
  min-height: 350px;
  place-items: center;
}

.patch-card {
  position: relative;
  width: min(300px, 80vw);
  aspect-ratio: 0.82;
  overflow: hidden;
  border: 9px solid rgba(255, 255, 255, 0.7);
  border-radius: 38px;
  background: linear-gradient(150deg, #286ced 0%, #88b6ff 100%);
  box-shadow: var(--shadow-lg);
  transform: rotate(3deg);
}

.patch-card::before,
.patch-card::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: "";
}

.patch-card::before {
  width: 230px;
  height: 230px;
  right: -95px;
  top: -55px;
}

.patch-card::after {
  width: 160px;
  height: 160px;
  bottom: 30px;
  left: -80px;
}

.patch {
  position: absolute;
  z-index: 2;
  display: block;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.35), 0 10px 25px rgba(22, 70, 184, 0.15);
  backdrop-filter: blur(5px);
}

.patch::after {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  content: "";
  left: 28px;
  top: 28px;
}

.patch--one {
  right: 38px;
  top: 48px;
}

.patch--two {
  width: 54px;
  height: 54px;
  left: 35px;
  top: 135px;
}

.patch--two::after {
  left: 19px;
  top: 19px;
}

.patch--three {
  width: 40px;
  height: 40px;
  right: 78px;
  top: 165px;
}

.patch--three::after {
  width: 8px;
  height: 8px;
  left: 14px;
  top: 14px;
}

.patch-card__label {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 25px;
  left: 24px;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.91);
  color: var(--ink);
  transform: rotate(-3deg);
}

.patch-card__label strong,
.patch-card__label small,
.patch-card__label span {
  display: block;
}

.patch-card__label strong {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.patch-card__label small {
  color: var(--muted);
  font-size: 12px;
}

.patch-card__label span {
  margin-top: 5px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.benefits {
  border-top: 1px solid rgba(223, 231, 242, 0.8);
  border-bottom: 1px solid rgba(223, 231, 242, 0.8);
  background: var(--surface);
}

.benefits__inner {
  display: grid;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 8px 0;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}

.benefit:last-child {
  border-bottom: 0;
}

.benefit__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 850;
}

.benefit p,
.benefit strong,
.benefit small {
  display: block;
  margin: 0;
}

.benefit strong {
  font-size: 13px;
}

.benefit small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.featured-product {
  width: min(1020px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 8vw, 54px);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.section-heading__khmer {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.product-feature-card__image {
  display: grid;
  min-height: 330px;
  overflow: hidden;
  place-items: center;
  background: linear-gradient(145deg, #eaf2ff, #f9fbff);
}

.product-feature-card__image img {
  width: 100%;
  height: 100%;
  max-height: 540px;
  object-fit: cover;
  transition: transform 300ms ease;
}

.product-feature-card__image:hover img {
  transform: scale(1.025);
}

.product-image-placeholder {
  position: relative;
  display: block;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.13);
}

.product-image-placeholder i {
  position: absolute;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.product-image-placeholder i:nth-child(1) {
  width: 72px;
  height: 72px;
  right: 36px;
  top: 32px;
}

.product-image-placeholder i:nth-child(2) {
  width: 50px;
  height: 50px;
  bottom: 39px;
  left: 40px;
}

.product-image-placeholder i:nth-child(3) {
  width: 32px;
  height: 32px;
  bottom: 53px;
  right: 44px;
}

.product-feature-card__content {
  padding: 28px;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-badge small {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.product-feature-card h3 {
  margin: 18px 0 8px;
  font-size: clamp(27px, 7vw, 42px);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.product-feature-card__description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.product-feature-card__description + .product-feature-card__description {
  margin-top: 5px;
}

.product-feature-card__price,
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 19px 0 !important;
  color: var(--ink) !important;
  font-size: 24px !important;
  font-weight: 850 !important;
}

.telegram-store-secondary-price {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.button--wide {
  width: 100%;
}

.empty-product-card {
  display: grid;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  gap: 28px;
}

.empty-product-card .product-image-placeholder {
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.confidence-strip {
  padding: 36px 20px;
  background: var(--brand);
  color: #fff;
  text-align: center;
}

.confidence-strip p {
  margin: 0;
  font-size: clamp(19px, 5vw, 28px);
  font-weight: 800;
}

.confidence-strip span {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 550;
  opacity: 0.86;
}

.site-footer {
  padding: 42px 0 calc(42px + env(safe-area-inset-bottom));
  background: #0e2039;
  color: #fff;
}

.site-footer__inner {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  flex-direction: column;
  gap: 28px;
}

.site-footer strong {
  font-size: 18px;
}

.site-footer p {
  margin: 7px 0 0;
  color: #aebdd0;
  font-size: 12px;
}

.site-footer p + p {
  margin-top: 2px;
}

.site-footer a {
  display: inline-flex;
  width: max-content;
  flex-direction: column;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
}

.site-footer a span {
  color: #aebdd0;
  font-size: 11px;
  font-weight: 500;
}

/* Standard content and WooCommerce screens */
.content-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.content-card {
  overflow-wrap: anywhere;
}

.page-heading {
  margin-bottom: 30px;
}

.page-heading h1,
.shop-shell > .woocommerce-products-header .page-title,
.shop-shell > h1 {
  margin: 0;
  font-size: clamp(34px, 9vw, 56px);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.woocommerce .woocommerce-breadcrumb {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 12px;
}

.woocommerce ul.products {
  display: grid;
  margin: 30px 0 0 !important;
  grid-template-columns: 1fr;
  gap: 22px;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none;
}

.woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.woocommerce ul.products li.product a img {
  aspect-ratio: 1;
  margin: 0 0 18px !important;
  border-radius: 17px;
  object-fit: cover;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding: 0 !important;
  color: var(--ink);
  font-size: 19px !important;
  letter-spacing: -0.025em;
}

.woocommerce ul.products li.product .button {
  width: 100%;
  margin-top: 4px !important;
}

.woocommerce span.onsale {
  min-width: 0;
  min-height: 0;
  padding: 7px 11px;
  border-radius: 99px;
  background: var(--brand);
  font-size: 10px;
  line-height: 1;
}

.woocommerce div.product {
  display: flow-root;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
  float: none;
  width: 100%;
}

.woocommerce div.product div.images img {
  border-radius: var(--radius-md);
}

.woocommerce div.product .product_title {
  margin: 8px 0 0;
  font-size: clamp(31px, 8vw, 50px);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  color: var(--muted);
}

.woocommerce div.product form.cart {
  display: flex;
  align-items: stretch;
  margin: 26px 0 14px !important;
  gap: 10px;
}

.woocommerce .quantity .qty {
  width: 70px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}

.woocommerce div.product form.cart .button {
  flex: 1;
}

.woocommerce div.product .woocommerce-tabs {
  padding-top: 24px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  padding: 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
  display: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  margin: 0 6px 6px 0 !important;
  padding: 4px 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: var(--brand-mist) !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  border-color: var(--brand) !important;
  background: var(--brand-soft) !important;
}

/* Forms, cart, checkout, notices and account-free ordering */
.woocommerce form .form-row,
.wc-block-components-text-input,
.wc-block-components-combobox {
  margin-bottom: 17px !important;
}

.woocommerce form .form-row label,
.wc-block-components-form .wc-block-components-text-input label,
.wc-block-components-address-form__country label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single,
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
  min-height: 52px;
  padding: 12px 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: var(--ink) !important;
}

.woocommerce form .form-row textarea {
  min-height: 110px;
}

.woocommerce form .form-row input:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: 0;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
  margin-bottom: 22px !important;
  padding: 16px 18px 16px 46px !important;
  border: 1px solid #bfd4ff !important;
  border-top: 1px solid #bfd4ff !important;
  border-radius: 15px !important;
  background: var(--brand-mist) !important;
  color: var(--ink) !important;
  font-size: 13px;
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--brand) !important;
  left: 18px !important;
  top: 16px !important;
}

.woocommerce-error {
  border-color: #f1b8b2 !important;
  background: #fff7f6 !important;
}

.woocommerce table.shop_table {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-collapse: separate !important;
  border-radius: 18px !important;
  background: var(--surface);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 14px 12px !important;
  border-top-color: var(--line) !important;
}

.woocommerce table.shop_table img {
  width: 58px;
  border-radius: 10px;
}

.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review,
.woocommerce-checkout #customer_details,
.wc-block-cart__main,
.wc-block-cart__sidebar,
.wc-block-checkout__main,
.wc-block-checkout__sidebar {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.woocommerce-cart .cart-collaterals .cart_totals {
  width: 100%;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order {
  width: 100%;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review_heading {
  margin-bottom: 24px;
}

.woocommerce-checkout h3,
.cart_totals h2,
.wc-block-components-title {
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -0.025em;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
  float: none;
  width: 100%;
}

/* The MVP uses one Cambodia delivery address: billing fields are the delivery fields. */
.woocommerce-checkout .woocommerce-shipping-fields {
  display: none;
}

.woocommerce-checkout-review-order-table .telegram-store-secondary-total small,
.cart_totals .telegram-store-secondary-total small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.telegram-store-secondary-total td {
  color: var(--brand-deep);
  font-weight: 800;
}

.woocommerce-order-received .woocommerce-order {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.woocommerce-order-overview {
  display: grid;
  padding: 0 !important;
  grid-template-columns: 1fr;
  gap: 8px;
}

.woocommerce ul.order_details li {
  float: none;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px;
  background: var(--brand-mist);
}

.wc-block-components-sidebar-layout {
  gap: 24px;
}

@media (min-width: 480px) {
  .site-cart {
    padding: 8px 13px;
  }

  .site-cart__label {
    display: block;
  }

  .hero__cta {
    width: auto;
  }
}

@media (min-width: 700px) {
  .site-header__inner {
    min-height: 80px;
  }

  .site-brand__copy strong {
    max-width: none;
    font-size: 16px;
  }

  .site-brand__copy small {
    font-size: 11px;
  }

  .hero__inner {
    min-height: 650px;
    align-items: center;
    padding: 72px 0;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  }

  .hero__visual {
    min-height: 440px;
  }

  .patch-card {
    width: min(350px, 32vw);
  }

  .benefits__inner {
    padding: 15px 0;
    grid-template-columns: repeat(3, 1fr);
  }

  .benefit {
    justify-content: center;
    padding: 7px 22px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .benefit:last-child {
    border-right: 0;
  }

  .product-feature-card {
    display: grid;
    align-items: stretch;
    grid-template-columns: 1.15fr 0.85fr;
  }

  .product-feature-card__content {
    display: flex;
    padding: 48px;
    flex-direction: column;
    justify-content: center;
  }

  .empty-product-card {
    grid-template-columns: 220px 1fr;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
  }

  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce div.product {
    padding: 34px;
  }

  .woocommerce div.product div.images,
  .woocommerce div.product div.summary {
    width: 48%;
  }

  .woocommerce div.product div.images {
    float: left;
  }

  .woocommerce div.product div.summary {
    float: right;
  }

  .woocommerce-checkout form.checkout {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
    gap: 28px;
  }

  .woocommerce-checkout form.checkout > #customer_details {
    grid-column: 1;
  }

  .woocommerce-checkout form.checkout > #order_review_heading,
  .woocommerce-checkout form.checkout > #order_review {
    grid-column: 2;
  }

  .woocommerce-checkout form.checkout > #order_review_heading {
    margin: 0;
    padding: 0 20px;
  }
}

@media (min-width: 1000px) {
  .woocommerce ul.products.columns-3,
  .woocommerce ul.products.columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 600px) {
  body.admin-bar .site-header {
    top: 0;
  }

  .content-shell {
    width: min(100% - 24px, 1080px);
    padding-top: 28px;
  }

  .page-shell {
    padding-bottom: 46px;
  }

  .woocommerce div.product {
    padding: 14px;
    border-radius: 22px;
  }

  .woocommerce div.product form.cart {
    flex-wrap: wrap;
  }

  .woocommerce div.product form.cart .button {
    width: 100%;
    flex-basis: calc(100% - 80px);
  }

  .woocommerce table.shop_table_responsive tr td,
  .woocommerce-page table.shop_table_responsive tr td {
    padding: 12px !important;
  }

  .woocommerce-cart-form .actions .coupon {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .woocommerce-cart-form .actions .coupon .input-text {
    width: 100% !important;
  }

  .woocommerce-cart-form .actions > .button {
    width: 100% !important;
    margin-top: 9px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Minimal Telegram storefront: products first, no marketing landing page. */
body.home {
  background: #fff;
}

.storefront {
  width: min(760px, calc(100% - 24px));
  margin: 0 auto;
  padding: 26px 0 54px;
}

.storefront__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.storefront__heading h1 {
  display: flex;
  align-items: baseline;
  margin: 0;
  gap: 9px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1;
}

.storefront__heading h1 span {
  color: var(--brand);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.storefront__heading p {
  display: flex;
  margin: 8px 0 0;
  flex-direction: column;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.storefront__heading p span {
  font-size: 11px;
}

.storefront__count {
  display: flex;
  min-width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 13px;
  background: var(--brand-mist);
  color: var(--brand);
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
}

.storefront__count small {
  display: none;
}

.store-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}

.store-product-tile {
  min-width: 0;
}

.store-product-tile__link {
  display: block;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(28, 58, 112, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.store-product-tile__link:hover {
  border-color: #b9cdf4;
  box-shadow: 0 10px 26px rgba(28, 58, 112, 0.11);
  transform: translateY(-2px);
}

.store-product-tile__media {
  position: relative;
  display: grid;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 17px 17px 12px 12px;
  background: #f2f6fd;
}

.store-product-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.store-product-tile__link:hover .store-product-tile__media img {
  transform: scale(1.025);
}

.store-product-tile__placeholder {
  position: relative;
  display: block;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.13);
}

.store-product-tile__placeholder i {
  position: absolute;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
}

.store-product-tile__placeholder i:nth-child(1) {
  width: 34%;
  height: 34%;
  right: 16%;
  top: 15%;
}

.store-product-tile__placeholder i:nth-child(2) {
  width: 23%;
  height: 23%;
  bottom: 18%;
  left: 18%;
}

.store-product-tile__placeholder i:nth-child(3) {
  width: 15%;
  height: 15%;
  right: 19%;
  bottom: 23%;
}

.store-product-tile__stock {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(16, 33, 58, 0.88);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.store-product-tile__stock small {
  font-size: 9px;
  font-weight: 550;
}

.store-product-tile__content {
  display: flex;
  min-height: 132px;
  padding: 13px 12px 12px;
  flex-direction: column;
}

.store-product-tile__content > strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 40px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.store-product-tile__price {
  display: flex;
  min-height: 43px;
  align-items: flex-start;
  margin-top: 7px;
  flex-direction: column;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.store-product-tile__price .telegram-store-secondary-price {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
}

.store-product-tile__action {
  display: flex;
  align-items: center;
  margin-top: auto;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  gap: 5px;
}

.store-product-tile__action small {
  font-size: 10px;
  font-weight: 650;
}

.store-product-tile__action svg {
  margin-left: auto;
}

.storefront-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 48px 24px;
  border: 1px dashed #bdcbe0;
  border-radius: 20px;
  background: var(--brand-mist);
  text-align: center;
}

.storefront-empty .store-product-tile__placeholder {
  width: 130px;
}

.storefront-empty h2 {
  margin: 20px 0 0;
}

.storefront-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

body.home .site-footer {
  padding-top: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

body.home .site-footer__inner {
  width: min(760px, calc(100% - 24px));
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

body.home .site-footer strong {
  font-size: 12px;
}

body.home .site-footer__inner > span {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

body.home .site-footer__inner > span small {
  font-size: 9px;
}

/* The product screen is the second step of the app-like buying flow. */
.single-product .content-shell {
  width: min(720px, calc(100% - 20px));
  padding-top: 18px;
}

.single-product .woocommerce div.product {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.single-product .woocommerce div.product div.images {
  margin-bottom: 22px;
}

.single-product .woocommerce div.product div.images img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  background: #f2f6fd;
  object-fit: cover;
}

.single-product .woocommerce div.product .product_title {
  font-size: 26px;
  letter-spacing: -0.035em;
}

.single-product .woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 13px;
  line-height: 1.65;
}

.single-product .product_meta,
.single-product .woocommerce-tabs,
.single-product .woocommerce-breadcrumb {
  display: none !important;
}

@media (min-width: 620px) {
  .storefront {
    padding-top: 38px;
  }

  .storefront__heading {
    margin-bottom: 26px;
  }

  .storefront__heading h1 {
    font-size: 34px;
  }

  .storefront__count {
    min-width: auto;
    gap: 5px;
  }

  .storefront__count small {
    display: inline;
    font-size: 11px;
    font-weight: 650;
  }

  .store-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 16px;
  }

  .store-product-tile__content {
    padding: 15px;
  }
}

@media (min-width: 760px) {
  .single-product .woocommerce div.product {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
    gap: 38px;
  }

  .single-product .woocommerce div.product div.images,
  .single-product .woocommerce div.product div.summary {
    float: none;
    width: auto;
    margin: 0;
  }
}
