/* GAMAZIN redesign phase 2: shared shell + category + product. Scoped to existing storefront classes. */
:root {
  --gz2-bg: #f5f7fb;
  --gz2-surface: #ffffff;
  --gz2-surface-2: #eef5ff;
  --gz2-text: #0b1638;
  --gz2-muted: #667085;
  --gz2-border: #dfe7f2;
  --gz2-primary: #1968ff;
  --gz2-primary-2: #3d50ff;
  --gz2-success: #159447;
  --gz2-shadow: 0 14px 40px rgba(20, 47, 91, .08);
  --gz2-radius: 18px;
}

.dark-theme {
  --gz2-bg: #07111f;
  --gz2-surface: #0e1a2c;
  --gz2-surface-2: #12243a;
  --gz2-text: #f6f8ff;
  --gz2-muted: #9cadc2;
  --gz2-border: rgba(255,255,255,.10);
  --gz2-shadow: 0 18px 50px rgba(0,0,0,.25);
}

/* ---------- Shared header ---------- */
.gz-shell-header {
  background: color-mix(in srgb, var(--gz2-surface) 94%, transparent) !important;
  border-bottom: 1px solid var(--gz2-border);
  box-shadow: 0 8px 24px rgba(13, 31, 58, .05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1040 !important;
}

.gz-shell-header > .container-xl > .d-flex {
  min-height: 64px;
  margin-bottom: 0 !important;
  gap: 18px;
}

.gz-shell-header #logo {
  max-width: 142px;
  height: auto !important;
  object-fit: contain;
}

.gz-shell-header .ds-header-left {
  flex: 0 0 auto;
}

.gz-main-nav {
  gap: 26px;
  margin-left: 22px;
  margin-right: 22px;
  flex: 0 0 auto;
}

.gz-main-nav a {
  color: var(--gz2-text);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s ease, transform .16s ease;
}

.gz-main-nav a:hover,
.gz-main-nav a:focus-visible {
  color: var(--gz2-primary);
  transform: translateY(-1px);
}

.gz-shell-header .ds-header-right {
  min-width: 0;
  padding-right: 0 !important;
}

.gz-shell-header .ds-header-right > .ds-dropdown-box,
.gz-shell-header .ds-header-viewed-button,
.gz-shell-header .ds-header-wishlist-button,
.gz-shell-header .ds-header-compare-button {
  display: none !important;
}

.gz-shell-header .ds-search,
.gz-shell-header #search {
  max-width: 520px;
  flex: 1 1 360px;
}

.gz-shell-header .ds-search input,
.gz-shell-header #search input {
  min-height: 42px;
  border-radius: 12px !important;
  background: var(--gz2-bg) !important;
  border-color: var(--gz2-border) !important;
  color: var(--gz2-text) !important;
}

.gz-shell-header .rb-lang-current,
.gz-shell-header .rb-theme-toggle,
.gz-shell-header .rb-header-account-link,
.gz-shell-header .ds-header-cart-button,
.gz-shell-header .ds-header-search-toggle-button,
.gz-shell-header .ds-header-menu-button {
  border-radius: 12px !important;
}

.gz-shell-header .rb-lang-current,
.gz-shell-header .rb-theme-toggle,
.gz-shell-header .rb-header-account-link,
.gz-shell-header .ds-header-cart-button {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--gz2-border) !important;
  background: var(--gz2-surface) !important;
  color: var(--gz2-text) !important;
}

.gz-shell-header .rb-lang-switch,
.gz-shell-header .rb-theme-toggle,
.gz-shell-header .rb-header-account-link,
.gz-shell-header .ds-header-cart-button {
  margin-left: 8px !important;
  margin-right: 0 !important;
}

.gz-shell-header .badge {
  background: var(--gz2-primary) !important;
  color: #fff !important;
}

/* ---------- Shared footer ---------- */
.gz-shell-footer {
  margin-top: 48px !important;
  padding: 36px 0 22px !important;
  background: #071426 !important;
  color: #d9e4f4 !important;
  border-top: 0 !important;
}

.gz-shell-footer .container-xl {
  max-width: 1280px;
}

.gz-shell-footer .ds-footer-top {
  padding-top: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.gz-shell-footer .ds-footer-logo {
  filter: brightness(0) invert(1);
  max-width: 150px;
  height: auto !important;
}

.gz-shell-footer .dark-text,
.gz-shell-footer .secondary-text,
.gz-shell-footer .light-text,
.gz-shell-footer .ds-footer-item-title,
.gz-shell-footer .ds-footer-copyrights,
.gz-shell-footer li,
.gz-shell-footer p {
  color: #d9e4f4 !important;
}

.gz-shell-footer a:not(.button) {
  color: #c9d8ec !important;
  text-decoration: none;
}

.gz-shell-footer a:not(.button):hover {
  color: #ffffff !important;
}

.gz-shell-footer .ds-footer-item-title {
  font-weight: 700 !important;
}

.gz-shell-footer .button-outline-primary {
  color: #fff !important;
  border-color: rgba(255,255,255,.25) !important;
  background: rgba(255,255,255,.04) !important;
}

.gz-shell-footer .ds-footer-payments-item {
  background: #fff !important;
  border-radius: 8px !important;
  padding: 3px 6px;
}

/* ---------- Common page surface ---------- */
.gz-category-page,
.gz-product-page {
  max-width: 1280px !important;
  color: var(--gz2-text);
}

.gz-category-page .ds-breadcrumb,
.gz-product-page .ds-breadcrumb {
  margin-top: 18px;
  margin-bottom: 18px;
}

.gz-category-page .ds-breadcrumb a,
.gz-product-page .ds-breadcrumb a {
  color: var(--gz2-muted) !important;
}

.gz-category-page .ds-page-title h1,
.gz-product-page .ds-page-title h1 {
  color: var(--gz2-text) !important;
  font-size: clamp(32px, 4vw, 52px) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em;
  font-weight: 800 !important;
  margin-bottom: 0 !important;
}

/* ---------- Category ---------- */
.gz-category-page .ds-page-title {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 34px 38px !important;
  border: 1px solid var(--gz2-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 83% 30%, rgba(25,104,255,.20), transparent 28%),
    radial-gradient(circle at 92% 78%, rgba(98,75,255,.14), transparent 25%),
    linear-gradient(135deg, #f7fbff, #edf4ff 60%, #f4efff);
  box-shadow: var(--gz2-shadow);
}

.dark-theme .gz-category-page .ds-page-title {
  background:
    radial-gradient(circle at 83% 30%, rgba(25,104,255,.24), transparent 28%),
    radial-gradient(circle at 92% 78%, rgba(98,75,255,.18), transparent 25%),
    linear-gradient(135deg, #0e1c30, #101c31 60%, #171633);
}

.gz-category-page .ds-page-title::after {
  content: "R";
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  color: #fff;
  font-size: 54px;
  font-weight: 900;
  background: linear-gradient(145deg, var(--gz2-primary), #6846ff);
  box-shadow: 0 22px 48px rgba(34, 92, 231, .22);
  opacity: .94;
}

.gz-category-page .content-top-box:empty {
  display: none;
}

.gz-category-page .ds-category-sort,
.gz-category-page .ds-subcategories .content-block,
.gz-category-page .ds-category-description,
.gz-category-page .content-block {
  border-color: var(--gz2-border) !important;
}

.gz-category-page .ds-category-sort {
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: var(--gz2-surface) !important;
  box-shadow: none !important;
}

.gz-category-page .ds-category-products {
  align-items: stretch;
}

.gz-category-page .ds-category-products > .ds-module-col {
  display: flex;
}

.gz-category-page .ds-category-products .content-block {
  width: 100%;
  padding: 10px 10px 14px !important;
  border: 1px solid var(--gz2-border) !important;
  border-radius: 18px !important;
  background: var(--gz2-surface) !important;
  box-shadow: 0 10px 28px rgba(20,47,91,.06) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}

.gz-category-page .ds-category-products .content-block:hover {
  transform: translateY(-3px);
  border-color: rgba(25,104,255,.30) !important;
  box-shadow: 0 18px 38px rgba(20,47,91,.11) !important;
}

.gz-category-page .ds-module-img-box {
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(160deg, #edf5ff, #f6f1ff);
  aspect-ratio: 4 / 5;
}

.dark-theme .gz-category-page .ds-module-img-box {
  background: #14253a;
}

.gz-category-page .ds-module-img-box > a {
  display: block;
  width: 100%;
  height: 100%;
}

.gz-category-page .ds-module-img-box img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 14px;
}

.gz-category-page .ds-module-buttons,
.gz-category-page .ds-module-button-viewed,
.gz-category-page .ds-module-button-wishlist,
.gz-category-page .ds-module-button-compare,
.gz-category-page .ds-module-attributes {
  display: none !important;
}

.gz-category-page .ds-module-title {
  display: block;
  margin-top: 13px !important;
  color: var(--gz2-text) !important;
  font-size: 17px !important;
  font-weight: 750 !important;
  line-height: 1.22;
  text-decoration: none;
}

.gz-category-product-meta {
  margin-top: 4px;
  min-height: 18px;
  color: var(--gz2-muted);
  font-size: 12px;
  line-height: 1.35;
}

.gz-category-page .ds-module-price {
  margin-top: 9px !important;
  margin-bottom: 11px !important;
}

.gz-category-page .ds-price-new {
  color: var(--gz2-text) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
}

.gz-category-page .ds-category-cart-btn,
.gz-category-page .ds-module-cart-btn {
  position: static !important;
  width: 100% !important;
  min-height: 42px;
  margin-top: auto !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--gz2-primary), var(--gz2-primary-2)) !important;
  color: #fff !important;
}

.gz-category-page .ds-category-cart-btn svg path,
.gz-category-page .ds-module-cart-btn svg path {
  fill: #fff !important;
}

.gz-category-page .pagination {
  margin-top: 24px;
}

/* ---------- Product ---------- */
.gz-product-page .ds-page-title {
  padding-bottom: 14px !important;
}

.gz-product-page .ds-product-top-info {
  color: var(--gz2-muted) !important;
}

.gz-product-page .ds-product-tabs {
  top: 72px !important;
  z-index: 25 !important;
  background: transparent !important;
}

.gz-product-page .ds-product-tabs-box {
  gap: 8px;
  padding: 8px !important;
  border: 1px solid var(--gz2-border);
  border-radius: 14px;
  background: var(--gz2-surface) !important;
  box-shadow: 0 8px 24px rgba(20,47,91,.05);
}

.gz-product-page .ds-product-tabs-item {
  min-height: 42px;
  border-radius: 10px !important;
  color: var(--gz2-muted) !important;
}

.gz-product-page .ds-product-tabs-item.active {
  background: var(--gz2-surface-2) !important;
  color: var(--gz2-primary) !important;
}

.gz-product-main-content {
  margin-top: 16px;
  padding: 18px !important;
  border: 1px solid var(--gz2-border) !important;
  border-radius: 24px !important;
  background: var(--gz2-surface) !important;
  box-shadow: var(--gz2-shadow) !important;
}

.gz-product-page #productImages {
  flex: 1 1 52%;
  border-right: 1px solid var(--gz2-border);
}

.gz-product-page #product {
  flex: 1 1 48%;
  padding-left: 26px !important;
}

.gz-product-page .ds-product-images-main,
.gz-product-page .slider-placeholder,
.gz-product-page .ds-product-images-slide {
  border-radius: 18px;
  background: linear-gradient(155deg, #f2f7ff, #f7f3ff);
}

.dark-theme .gz-product-page .ds-product-images-main,
.dark-theme .gz-product-page .slider-placeholder,
.dark-theme .gz-product-page .ds-product-images-slide {
  background: #122338;
}

.gz-product-page .ds-product-images-main img,
.gz-product-page .slider-placeholder img {
  width: 100% !important;
  height: auto !important;
  max-height: 590px;
  object-fit: contain !important;
  border-radius: 18px !important;
}

.gz-product-page .ds-product-wishlist-compare {
  display: none !important;
}

.gz-product-page .ds-product-main-stock {
  min-height: 34px;
  padding: 0 13px !important;
  border-radius: 999px !important;
  background: rgba(30, 178, 91, .10) !important;
  color: var(--gz2-success) !important;
}

.gz-product-page .ds-product-main-price {
  padding: 18px 0 14px;
}

.gz-product-page .ds-product-main-price .ds-price-new {
  color: var(--gz2-text) !important;
  font-size: clamp(32px, 4vw, 46px) !important;
  line-height: 1 !important;
  letter-spacing: -.025em;
  font-weight: 850 !important;
}

.gz-product-page .ds-product-main-buttons {
  gap: 10px;
  flex-wrap: wrap;
}

.gz-product-page .ds-product-main-cart {
  width: 100%;
}

.gz-product-page #button-cart {
  min-height: 54px;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, var(--gz2-primary), var(--gz2-primary-2)) !important;
  box-shadow: 0 13px 28px rgba(25,104,255,.22);
}

.gz-product-page .ds-product-fast-order-button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px !important;
  background: transparent !important;
  border: 1px solid rgba(25,104,255,.34) !important;
  color: var(--gz2-primary) !important;
}

.gz-product-page .ds-module-quantity {
  min-height: 54px;
  border: 1px solid var(--gz2-border) !important;
  border-radius: 14px !important;
  background: var(--gz2-surface) !important;
}

.gz-product-page .ds-product-advantages {
  margin-top: 18px !important;
  border: 1px solid var(--gz2-border) !important;
  border-radius: 16px !important;
  background: var(--gz2-bg) !important;
}

.gz-product-page .ds-product-advantages-item + .ds-product-advantages-item {
  border-top: 1px solid var(--gz2-border);
}

.gz-product-page .ds-product-description,
.gz-product-page .ds-product-attributes,
.gz-product-page .ds-product-reviews,
.gz-product-page .ds-product-dop_tab,
.gz-product-page [class*="ds-product_extra_tab-"] {
  border: 1px solid var(--gz2-border) !important;
  border-radius: 18px !important;
  background: var(--gz2-surface) !important;
  box-shadow: 0 8px 28px rgba(20,47,91,.05) !important;
}

.gz-product-page .ds-product-description p,
.gz-product-page .ds-product-tab-content-text,
.gz-product-page .secondary-text {
  color: var(--gz2-muted) !important;
  line-height: 1.65;
}

.gz-product-page .ds-product-block .content-block {
  border-radius: 16px !important;
  border: 1px solid var(--gz2-border) !important;
  background: var(--gz2-surface) !important;
}

/* Dark text normalization inside redesigned areas */
.dark-theme .gz-category-page .dark-text,
.dark-theme .gz-product-page .dark-text,
.dark-theme .gz-category-page h1,
.dark-theme .gz-product-page h1,
.dark-theme .gz-category-page .ds-module-title,
.dark-theme .gz-product-page .ds-price-new {
  color: var(--gz2-text) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .gz-shell-header > .container-xl > .d-flex {
    min-height: 58px;
  }
  .gz-shell-header .ds-search,
  .gz-shell-header #search {
    max-width: none;
  }
  .gz-category-page .ds-page-title::after {
    width: 86px;
    height: 86px;
    right: 26px;
    border-radius: 24px;
    font-size: 40px;
  }
}

@media (max-width: 991.98px) {
  .gz-category-page .ds-category-products > .ds-module-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .gz-product-page #productImages {
    border-right: 0;
  }
  .gz-product-page #product {
    padding-left: 0 !important;
  }
  .gz-product-main-content {
    gap: 12px;
  }
}

@media (max-width: 767.98px) {
  .gz-shell-header {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
  .gz-shell-header > .container-xl > .d-flex {
    min-height: 50px;
    gap: 7px;
  }
  .gz-shell-header #logo {
    max-width: 112px;
  }
  .gz-shell-header .rb-lang-switch,
  .gz-shell-header .rb-theme-toggle {
    display: none !important;
  }
  .gz-shell-header .rb-header-account-link,
  .gz-shell-header .ds-header-cart-button {
    min-width: 38px;
    min-height: 38px;
  }
  .gz-category-page,
  .gz-product-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .gz-category-page .ds-breadcrumb,
  .gz-product-page .ds-breadcrumb {
    margin-top: 10px;
    margin-bottom: 12px;
    overflow-x: auto;
    white-space: nowrap;
  }
  .gz-category-page .ds-page-title {
    padding: 24px 20px !important;
    margin-bottom: 14px;
    border-radius: 18px;
  }
  .gz-category-page .ds-page-title h1,
  .gz-product-page .ds-page-title h1 {
    font-size: 32px !important;
  }
  .gz-category-page .ds-page-title::after {
    opacity: .16;
    right: 12px;
  }
  .gz-category-page .ds-category-products {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
  }
  .gz-category-page .ds-category-products > .ds-module-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .gz-category-page .ds-category-products .content-block {
    padding: 7px 7px 11px !important;
    border-radius: 14px !important;
  }
  .gz-category-page .ds-module-img-box {
    border-radius: 11px;
  }
  .gz-category-page .ds-module-title {
    font-size: 15px !important;
  }
  .gz-category-product-meta {
    font-size: 11px;
  }
  .gz-category-page .ds-price-new {
    font-size: 19px !important;
  }
  .gz-category-page .ds-category-cart-btn,
  .gz-category-page .ds-module-cart-btn {
    min-height: 40px;
    font-size: 12px !important;
  }
  .gz-product-page .ds-product-top-info {
    font-size: 12px !important;
  }
  .gz-product-page .ds-product-tabs {
    top: 58px !important;
    overflow-x: auto;
  }
  .gz-product-page .ds-product-tabs-box {
    width: max-content !important;
    min-width: 100%;
    padding: 6px !important;
  }
  .gz-product-page .ds-product-tabs-item {
    min-width: 132px;
    min-height: 38px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .gz-product-main-content {
    margin-top: 12px;
    padding: 10px !important;
    border-radius: 18px !important;
  }
  .gz-product-page .ds-product-images-main img,
  .gz-product-page .slider-placeholder img {
    max-height: 440px;
  }
  .gz-product-page #product {
    padding-top: 10px !important;
  }
  .gz-product-page .ds-product-main-price .ds-price-new {
    font-size: 34px !important;
  }
  .gz-product-page .ds-product-main-buttons,
  .gz-product-page .ds-product-main-cart {
    width: 100%;
  }
  .gz-product-page .ds-product-main-cart {
    gap: 8px;
  }
  .gz-product-page .ds-module-quantity {
    margin-right: 0 !important;
  }
  .gz-shell-footer {
    padding-top: 28px !important;
    padding-bottom: 86px !important;
  }
  .gz-shell-footer .ds-footer-top {
    text-align: left;
  }
  .gz-shell-footer .ds-footer-logo {
    margin-left: 0 !important;
  }
}

@media (max-width: 389.98px) {
  .gz-category-page .ds-category-products > .ds-module-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
