/* ===== دیجی‌کایا — فروشگاه قطعات کامپیوتر ===== */
:root {
  --red: #df1e2f;
  --red-dark: #af131c;
  --text: #212529;
  --muted: #81858b;
  --bg: #f9f9fa;
  --surface: #fff;
  --border: #eee;
  --gray: #eff0f2;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 0 5px rgba(0, 0, 0, 0.07);
  --header-h: 0px;
  --font: "Vazirmatn", "Tahoma", sans-serif;
}

body.night {
  --bg: #1a1a1c;
  --surface: #242426;
  --text: #e8e8e8;
  --muted: #9a9a9e;
  --border: #333;
  --gray: #2c2c2e;
  --shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

a {
  color: var(--red);
  text-decoration: none;
}

img {
  max-width: 100%;
  vertical-align: middle;
  border: 0;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.top-banner {
  display: none;
  padding: 6px 0 0;
}

.top-banner img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

@media (min-width: 992px) {
  .top-banner {
    display: block;
  }
}

.navbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.5px;
}

.logo img {
  height: 36px;
  width: auto;
}

.search-form {
  flex: 1;
  min-width: 180px;
  display: flex;
  position: relative;
  height: 46px;
  background: var(--gray);
  border: 1px solid #dfdfdf;
  border-radius: 14px;
  overflow: visible;
}

body.night .search-form {
  border-color: #444;
}

.search-form input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0 16px;
  font-size: 15px;
  color: var(--text);
  outline: none;
}

.search-form input::placeholder {
  color: #bbb;
}

.search-form button {
  width: 52px;
  border: 0;
  background: transparent;
  color: #8e8c8c;
  font-size: 18px;
  transition: 0.2s;
}

.search-form button:hover {
  background: var(--red);
  color: #fff;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow-y: auto;
  z-index: 80;
}

.search-suggest[hidden] {
  display: none;
}

.search-suggest a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.search-suggest a:last-child {
  border-bottom: 0;
}

.search-suggest a:hover {
  background: #f5f5f5;
}

.search-suggest .name {
  font-size: 13px;
  line-height: 1.5;
}

.search-suggest .price {
  white-space: nowrap;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-actions .split {
  width: 1.5px;
  height: 28px;
  background: #e0e0e0;
  opacity: 0.6;
  display: none;
}

@media (min-width: 768px) {
  .nav-actions .split {
    display: block;
  }
}

.icon-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  font-size: 13px;
  position: relative;
}

.icon-btn:hover {
  background: var(--gray);
}

.icon-btn .badge {
  position: absolute;
  bottom: 2px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.icon-btn .label {
  display: none;
}

@media (min-width: 992px) {
  .icon-btn .label {
    display: inline;
  }
}

.phone-link {
  display: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 13px;
  padding: 8px;
}

@media (min-width: 768px) {
  .phone-link {
    display: block;
  }
}

/* Category menu — see mega-menu.css */

.mobile-cats {
  display: flex;
  gap: 8px;
  padding: 0 0 10px;
  overflow-x: auto;
}

@media (min-width: 768px) {
  .mobile-cats {
    display: none;
  }
}

.mobile-cats a {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--gray);
  border-radius: 20px;
  color: var(--text);
  font-size: 13px;
}

/* Mobile category accordion */
.mobile-mega {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: var(--surface);
  overflow-y: auto;
  padding: 16px;
}

.mobile-mega.open {
  display: block;
}

.mobile-mega-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mobile-mega-head button {
  border: 1px solid #aaa;
  background: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* ===== Hero Slider ===== */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  margin-top: 4px;
  direction: ltr;
}

.hero-track {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

.hero-slide {
  min-width: 100%;
  position: relative;
}

.hero-slide::after {
  content: "";
  display: block;
  padding-bottom: 42%;
}

@media (min-width: 768px) {
  .hero-slide::after {
    padding-bottom: 21.3%;
  }
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #fefefe;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.17);
  color: #363853;
  z-index: 2;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.slider-btn.prev {
  right: 12px;
}

.slider-btn.next {
  left: 12px;
}

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: #000;
  opacity: 0.25;
  padding: 0;
}

.slider-dots button.active {
  opacity: 1;
  background: #ff5f55;
}

/* ===== Category icons ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 20px 0;
  background: var(--surface);
}

@media (min-width: 768px) {
  .cat-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1200px) {
  .cat-grid {
    grid-template-columns: repeat(9, 1fr);
  }
}

.cat-card {
  text-align: center;
  color: var(--text);
  padding: 8px;
  transition: 0.2s;
}

.cat-card:hover {
  color: var(--red);
}

.cat-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 6px;
  display: block;
}

.cat-card span {
  display: block;
  font-size: 13px;
}

.assemble-mobile {
  display: block;
  margin: 0 15px 16px;
  padding: 10px;
  background: var(--red);
  color: #fff;
  text-align: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .assemble-mobile {
    display: none;
  }
}

/* ===== Offers ===== */
section.offers {
  background: var(--red);
  background-image: linear-gradient(120deg, #e01e2d 0%, #c01826 50%, #e01e2d 100%);
  margin: 0 0 28px;
  padding: 16px 0 20px;
}

.offers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #fff;
  gap: 12px;
}

.offers-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
}

.offers-head .line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
}

.offers-head a {
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.offers-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.offers-row::-webkit-scrollbar {
  height: 0;
}

.offer-side {
  display: none;
  flex-shrink: 0;
  width: 150px;
}

@media (min-width: 768px) {
  .offer-side {
    display: block;
  }
}

.offer-side img {
  width: 100%;
  border-radius: var(--radius);
}

/* ===== Product card ===== */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 180px;
  max-width: 220px;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: #ddd;
  background: #f5f5f5;
}

body.night .product-card:hover {
  background: #2e2e30;
  border-color: #555;
}

.product-card .thumb {
  position: relative;
  padding-bottom: 100%;
  margin: 8px;
}

.product-card .thumb img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10%;
}

.product-card .body {
  padding: 4px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card .title {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  height: 60px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
}

.price-row {
  margin-top: auto;
  text-align: left;
}

.price-row .old {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 4px;
}

.price-row del {
  color: #888;
  text-decoration-color: #aaa;
}

.discount {
  background: linear-gradient(62deg, #e11d2d, #af131c);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
}

.price-now {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.price-now .unit {
  font-size: 12px;
  font-weight: 400;
}

.add-cart {
  margin-top: 10px;
  width: 100%;
  border: 0;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s;
  text-align: center;
  display: inline-block;
  text-decoration: none;
  box-sizing: border-box;
}

.add-cart:hover,
a.add-cart:hover {
  background: var(--red-dark);
  color: #fff;
}

/* ===== Section ===== */
.section {
  margin: 28px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.section-head h2 span {
  color: var(--red);
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f7f7f7;
  color: #302e2f;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
}

body.night .btn-more {
  background: #333;
  color: #ddd;
}

.products-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.products-row::-webkit-scrollbar {
  height: 4px;
}

.products-row::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.products-row .product-card {
  min-width: 180px;
  max-width: 220px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ===== TopRayan-style category slide rows ===== */
.list-by-category {
  margin: 0 0 28px;
}

.kala {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
  gap: 0;
}

.kala .pad {
  display: flex;
  position: relative;
  flex-shrink: 0;
  width: 100%;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.kala .pad .image-holder {
  width: 90px;
  margin: 0 0 0 10px;
  flex-shrink: 0;
}

.kala .pad .image-holder .main-image {
  width: 100%;
  height: auto;
  display: block;
}

.kala .pad a.btn-loadmore {
  display: flex;
  margin-top: 0;
  text-align: right;
  color: #333;
  font-weight: 500;
  font-size: 14px;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  text-decoration: none;
}

.kala .pad a.btn-loadmore .name span {
  display: block;
  font-size: 13px;
  color: #666;
}

.kala .pad a.btn-loadmore h2 {
  color: var(--red, #df1e2f);
  font-size: 16px;
  font-weight: 800;
  line-height: 27px;
  margin: 0;
}

.kala .pad .btn-more {
  display: inline-flex;
  align-items: center;
  background: #f7f7f7;
  color: #302e2f;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.kala.kala-simple .pad {
  margin-bottom: 8px;
}

.kala.kala-simple .pad h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.kala.kala-simple .pad h2 span {
  color: var(--red, #df1e2f);
}

.kala .kala-list {
  flex-grow: 1;
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
}

.slide-jadid {
  position: relative;
  margin: 5px 0 0;
  padding: 0 36px;
  --swiper-navigation-size: 22px;
  --swiper-navigation-color: #333;
  --swiper-theme-color: var(--red, #df1e2f);
}

.slide-jadid .swiper-button-prev,
.slide-jadid .swiper-button-next {
  width: 34px;
  height: 34px;
  margin-top: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.slide-jadid .swiper-button-prev:after,
.slide-jadid .swiper-button-next:after {
  font-size: 14px;
  font-weight: 700;
}

.slide-jadid .swiper-slide {
  width: 182px;
  height: auto;
}

.one-row .product-item {
  display: block;
  width: 182px;
  max-width: 182px;
  border: 1px solid #eee;
  border-radius: 24px;
  margin: 12px 0;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  background: transparent;
  position: relative;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

.one-row .product-item:hover {
  border-color: #ddd;
  background: #ddd;
  transform: translateY(-2px);
}

.product-item .ax-kala {
  display: block;
  text-decoration: none;
}

.product-item .image {
  position: relative;
  overflow: hidden;
  display: block;
  padding: 5px 5px 100% 5px;
}

.product-item .image .main {
  position: absolute;
  width: 90%;
  height: 90%;
  margin: auto;
  inset: 0;
  object-fit: contain;
  border-radius: 20px;
  padding: 12%;
  border: none;
  background: transparent;
  box-sizing: border-box;
}

.product-item .flex-grow-1 {
  display: flex;
  flex-direction: column;
}

.product-item .body {
  padding: 5px 10px;
  font-size: 13px;
  margin-top: 0;
}

.product-item .body .title a {
  text-overflow: ellipsis;
  height: 60px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
  color: #333;
  overflow: hidden;
  direction: rtl;
  text-decoration: none;
}

.product-item .tag {
  height: 24px;
  margin: 0 8px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 11px;
  line-height: 28px;
  gap: 6px;
  overflow: hidden;
}

.product-item .tag .fast-delivery,
.product-item .tag .gaming-tag {
  background: transparent;
  color: #444;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 11px;
}

.product-item .price-box {
  padding: 0 10px 8px;
  background: transparent;
  background-image: none;
  margin: 0;
}

.has-offer-new {
  display: block;
  margin: 5px 0 10px;
  min-height: 50px;
  overflow: hidden;
  text-align: center;
}

.has-offer-new .label-takhfif {
  height: 17px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  line-height: 14px;
  gap: 5px;
}

.has-offer-new .label-takhfif del {
  text-decoration: line-through;
  text-decoration-color: #aaa;
  color: #000;
  font-weight: 100;
  font-size: 14px;
}

.has-offer-new .label-takhfif .darsad {
  height: 17px;
  padding: 0 6px;
  font-weight: 600;
  background: linear-gradient(62deg, #e11d2d 0%, #af131c 100%);
  border-radius: 5px;
  color: #fff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
}

.one-row .price-box .price-now {
  color: #000;
  font-size: 14px;
  font-weight: 800;
  margin-top: 5px;
  text-align: center;
  display: block;
  width: 100%;
}

.one-row .price-box .price-now .unit {
  font-weight: 400;
  font-size: 11px;
}

.one-row .price-box .price-now.price-call {
  font-size: 14px;
  font-weight: 600;
  color: #888;
}

@media (min-width: 992px) {
  .kala {
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .kala .kala-list {
    width: calc(100% - 245px);
  }

  .kala .pad {
    width: 240px;
    flex-direction: column;
    justify-content: center;
  }

  .kala .pad .image-holder {
    width: 80%;
    margin: auto;
  }

  .kala .pad a.btn-loadmore {
    padding: 15px 0 0;
    flex-direction: column;
    text-align: center;
    font-size: 16px;
    gap: 8px;
  }

  .kala .pad a.btn-loadmore h2 {
    margin-top: 10px;
  }

  .kala .pad .btn-more {
    margin: 20px auto 0;
  }

  .kala.kala-simple {
    flex-direction: column;
    align-items: stretch;
  }

  .kala.kala-simple .kala-list {
    width: 100%;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 576px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.products-grid .product-card {
  min-width: 0;
  max-width: none;
  width: 100%;
}

/* ===== Banners ===== */
.banner-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 20px 0;
}

@media (min-width: 768px) {
  .banner-tiles {
    grid-template-columns: 1fr 1fr;
  }
}

.banner-tiles a {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.banner-tiles img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
}

.finger-banners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}

@media (min-width: 768px) {
  .finger-banners {
    grid-template-columns: repeat(4, 1fr);
  }
}

.finger-banners a {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.finger-banners img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 30px 0;
  padding: 16px;
  background: var(--gray);
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px;
  }
}

@media (min-width: 992px) {
  .features {
    gap: 20px;
    padding: 24px;
  }

  .feature {
    min-height: 140px;
    padding: 20px 12px;
  }

  .feature img {
    width: 72px;
    height: 72px;
  }

  .feature strong {
    font-size: 14px;
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 16px 10px;
  color: var(--text);
  transition: 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.feature:hover {
  color: var(--red);
}

.feature img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 6px;
}

.feature strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

/* Blog */
.blog-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.blog-card {
  min-width: 280px;
  max-width: 340px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.blog-card .pic {
  position: relative;
  padding-bottom: 55%;
}

.blog-card .pic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card .info {
  padding: 14px 18px;
}

.blog-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card p {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.blog-card .meta a {
  color: var(--red);
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-top {
  background: var(--gray);
  padding: 24px 0;
}

.footer-about {
  max-height: 70px;
  overflow: hidden;
  position: relative;
  font-size: 13px;
  color: #616161;
  text-align: center;
  transition: max-height 0.3s;
}

.footer-about.expanded {
  max-height: 500px;
}

.footer-about::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--gray));
  pointer-events: none;
}

.footer-about.expanded::after {
  display: none;
}

.footer-more {
  display: block;
  text-align: center;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 12px;
  background: none;
  border: 0;
  cursor: pointer;
}

.footer-main {
  padding: 28px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .footer-main {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.footer-col a {
  display: block;
  color: #444;
  font-size: 14px;
  margin-bottom: 8px;
}

body.night .footer-col a {
  color: #bbb;
}

.footer-col a:hover {
  color: var(--red);
}

.footer-contact {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.socials {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  font-size: 22px;
}

.socials a {
  transition: transform 0.2s;
}

.socials a:hover {
  transform: scale(1.15);
}

.copyright {
  background: #383838;
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 12px;
}

/* ===== Cart drawer ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  max-width: 95%;
  height: 100%;
  background: var(--surface);
  z-index: 2001;
  transform: translateX(-100%);
  transition: 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.cart-head strong {
  font-size: 16px;
}

.cart-head button {
  border: 0;
  background: none;
  font-size: 20px;
  color: #aaa;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.cart-empty .icon {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 10px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

.cart-item .meta {
  flex: 1;
}

.cart-item .name {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item .price {
  font-size: 13px;
  font-weight: 700;
}

.cart-item .remove {
  border: 1px solid var(--border);
  background: #f9f9f9;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  color: #aaa;
  align-self: center;
  cursor: pointer;
}

.cart-item .qty-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cart-item .qty-row button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.cart-item .qty-row span {
  min-width: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.cart-foot {
  border-top: 1px solid var(--border);
  padding: 14px 16px 18px;
}

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

.cart-total .sum {
  font-size: 17px;
  font-weight: 800;
}

.cart-checkout {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--red);
  color: #fff;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 3000;
  opacity: 0;
  transition: 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Back to top */
.back-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--red);
  color: #fff;
  font-size: 18px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
  box-shadow: 0 4px 12px rgba(223, 30, 47, 0.35);
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ===== Contact modal ===== */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.contact-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.contact-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: contact-modal-in 0.2s ease;
}

@keyframes contact-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.contact-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.contact-modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.contact-modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--gray);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
}

.contact-modal-close:hover {
  background: #e8e8ea;
}

.contact-modal-body {
  padding: 18px;
}

.contact-modal-intro {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.contact-block {
  margin-bottom: 16px;
  padding: 14px;
  background: var(--gray);
  border-radius: var(--radius);
}

.contact-block h3 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
}

.contact-phones,
.contact-hours {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-phones li,
.contact-hours li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.contact-label {
  color: var(--muted);
}

.contact-phone {
  font-weight: 700;
  color: var(--text);
  direction: ltr;
  unicode-bidi: plaintext;
}

.contact-phone:hover {
  color: var(--red);
}

.contact-hours strong {
  font-weight: 600;
  color: var(--text);
}

.contact-closed {
  color: var(--red) !important;
}

.contact-modal-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--red);
  color: #fff !important;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.contact-modal-cta:hover {
  background: var(--red-dark);
}

body.contact-modal-open {
  overflow: hidden;
}
