/* =========================================================
   PiGamer — store pages (game page, shop, cart, checkout, account, plain pages)
   Built on the tokens and components of pg-v2.css.
   ========================================================= */

/* ---------- Shared: page head below the floating header ---------- */
.pp-head, .shop__head { position: relative; isolation: isolate; padding: 150px 0 40px; text-align: center; }
.pp-head::before, .shop__head::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 80% at 50% 0%, rgba(0, 229, 255, .13), transparent 70%); }
.pp-head .h2, .shop__head .h2 { margin-top: 6px; }
.shop__head .sec__lead { margin-inline: auto; }

/* ---------- Plain pages: readable content ---------- */
.pp-body { padding-bottom: 90px; }
.pp-content { max-width: 820px; margin-inline: auto; color: var(--gray-2); line-height: 1.95; font-size: 17px; }
.pp-page--cart .pp-content, .pp-page--checkout .pp-content, .pp-page--account .pp-content { max-width: none; color: var(--white); font-size: 16px; }
.pp-content h2, .pp-content h3 { font-family: var(--f-head); color: var(--white); margin: 1.6em 0 .6em; line-height: 1.35; }
.pp-content a { color: var(--cyan); }
.pp-content ul, .pp-content ol { padding-inline-start: 1.3em; }
.pp-content img { border-radius: 16px; }

/* ---------- WooCommerce notices ---------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner {
  list-style: none; margin: 0 0 18px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0, 229, 255, .07); color: var(--white);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.woocommerce-error, .wc-block-components-notice-banner.is-error { border-color: rgba(255, 77, 94, .5); background: rgba(255, 77, 94, .08); }
.woocommerce-message .button, .woocommerce-info .button { margin-inline-start: auto; }

/* ---------- Buttons & fields WooCommerce prints ---------- */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, button.single_add_to_cart_button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0; cursor: pointer;
  font: 700 16px var(--f-body); background: var(--cyan); color: #021015; box-shadow: 0 10px 30px -10px rgba(0, 229, 255, .75); transition: transform .25s var(--ease), box-shadow .25s; text-decoration: none; }
.woocommerce .button:hover, button.single_add_to_cart_button:hover { transform: translateY(-2px); box-shadow: 0 0 0 5px rgba(0, 229, 255, .16), 0 16px 40px -12px rgba(0, 229, 255, .9); }
.woocommerce .button.alt { background: var(--cyan); }
.woocommerce .button:disabled, .single_add_to_cart_button.disabled { opacity: .45; pointer-events: none; }
.woocommerce input[type=text], .woocommerce input[type=email], .woocommerce input[type=tel], .woocommerce input[type=password], .woocommerce input[type=number], .woocommerce textarea, .woocommerce select, .shop__sort select {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--white); font: 500 15px var(--f-body); outline: 0; transition: border-color .2s; }
.woocommerce input:focus, .woocommerce textarea:focus, .woocommerce select:focus { border-color: var(--line-2); }
.woocommerce select option, .shop__sort select option { background: var(--navy-2); color: var(--white); }
.woocommerce label { display: block; margin-bottom: 6px; color: var(--gray-2); font-weight: 600; font-size: 14px; }
.woocommerce form .form-row { margin: 0 0 16px; }
.required { color: #FF8A95; text-decoration: none; border: 0; }

/* =========================================================
   Game page
   ========================================================= */
.pd { position: relative; isolation: isolate; }
.pd__glow { position: absolute; inset: -10% 0 auto; height: 900px; z-index: -1; pointer-events: none; overflow: hidden;
  background: var(--cover) center 30% / cover; filter: blur(90px) saturate(1.5); opacity: .32;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.pd__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-top: 130px; padding-bottom: 40px; }
.pd__media { position: sticky; top: 110px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pd__cover { position: relative; width: 100%; max-width: 440px; aspect-ratio: 2 / 3; border-radius: 26px; overflow: hidden; transition: transform .25s linear;
  box-shadow: 0 50px 110px -40px color-mix(in srgb, var(--a) 75%, transparent), 0 0 0 1px rgba(255,255,255,.08); }
.pd__cover img { width: 100%; height: 100%; object-fit: cover; }
.pd__shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: .7;
  background: radial-gradient(420px circle at var(--sx, 30%) var(--sy, 20%), rgba(255,255,255,.55), transparent 50%); }
.pd__trailer { display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 9px; border-radius: 999px; cursor: pointer;
  font: 700 15px var(--f-body); color: var(--white); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); transition: background .25s, border-color .25s; }
.pd__trailer:hover { background: rgba(255, 0, 51, .14); border-color: rgba(255, 0, 51, .5); }

.pd__crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--gray); margin-bottom: 18px; }
.pd__crumbs a { color: var(--gray-2); } .pd__crumbs a:hover { color: var(--cyan); }
.pd__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pd__tag { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--a); color: #04121a; }
.pd__chip { padding: 6px 12px; border-radius: 999px; font: 700 13px var(--f-num); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.pd__t { margin: 0 0 12px; font-family: var(--f-num); font-weight: 800; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.05; text-align: right;
  text-shadow: 0 0 50px color-mix(in srgb, var(--a) 40%, transparent); }
.pd__lead { margin: 0 0 26px; color: var(--gray-2); font-size: 17px; line-height: 1.9; max-width: 560px; }

.pd__buy { padding: 24px; border-radius: 24px; background: linear-gradient(180deg, rgba(13, 42, 51, .6), rgba(8, 22, 28, .92)); border: 1px solid color-mix(in srgb, var(--a) 35%, transparent);
  box-shadow: 0 40px 80px -50px color-mix(in srgb, var(--a) 60%, transparent); }
.pd__price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.pd__price small { color: var(--gray); font-weight: 600; }
.pd__price b { font-size: 52px; line-height: 1; color: var(--white); text-shadow: 0 0 30px color-mix(in srgb, var(--a) 45%, transparent); }
.pd__price b.is-tick { animation: tick .45s var(--ease); }
@keyframes tick { 40% { transform: translateY(-6px) scale(1.06); color: var(--a); } }

/* WooCommerce's variation form, restyled */
.pd .variations { width: 100%; border-collapse: collapse; margin: 0 0 6px; }
.pd .variations tr { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pd .variations th, .pd .variations td { padding: 0; text-align: start; }
.pd .variations th label { margin: 0; color: var(--gray); font-size: 14px; }
.pd__native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.pd .reset_variations { display: none !important; }
.pd__seg { display: inline-flex; flex-wrap: wrap; }
.pd__seg button:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.pd .woocommerce-variation-price, .pd .woocommerce-variation-description:empty { display: none; }
.pd .woocommerce-variation-availability .stock { margin: 0 0 12px; font-size: 14px; color: var(--teal); }
.pd .stock.out-of-stock { color: #FF8A95; }
.pd .woocommerce-variation-add-to-cart, .pd form.cart:not(.variations_form) { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.pd form.cart .quantity, .pd form.cart input.qty, .pd form.cart .ast-qty-wrap { display: none !important; }   /* digital items: one per add */
.pd button.single_add_to_cart_button { flex: 1; min-height: 60px; font-size: 18px; border-radius: 18px; }
.pd button.single_add_to_cart_button.is-busy { opacity: .7; }

.pd__perks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.pd__perks li { display: flex; align-items: center; gap: 12px; color: var(--gray-2); }
.pd__perks li svg { color: var(--cyan); flex-shrink: 0; }
.pd__perks b { color: var(--white); margin-inline-end: 4px; }
.pd__help { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 24px; }
.pd__about .pp-content { margin-inline: 0; }

/* =========================================================
   Shop / categories
   ========================================================= */
.shop { padding-bottom: 90px; }
.shop__bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.seg a { display: inline-grid; place-items: center; min-height: 40px; padding: 0 18px; border-radius: 11px; color: var(--gray-2); font-weight: 700; font-size: 14px; transition: color .35s; }
.seg a.is-on { color: #021015; }
.seg:not(.has-pill) a.is-on { background: var(--cyan); }
.shop__sort { min-width: 210px; }
.shop__sort form { margin: 0; }
.shop__cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; margin-bottom: 26px; }
.shop__cats::-webkit-scrollbar { display: none; }
.shop__cats a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
  color: var(--gray-2); background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: border-color .25s, color .25s, background .25s; }
.shop__cats a small { font: 700 11px var(--f-num); padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.08); }
.shop__cats a:hover { color: var(--white); border-color: var(--line-2); }
.shop__cats a.is-on { color: #021015; background: var(--cyan); border-color: var(--cyan); }
.shop__cats a.is-on small { background: rgba(2, 16, 21, .15); }
.woocommerce-result-count { display: none; }
.shop__pages .woocommerce-pagination ul { list-style: none; display: flex; justify-content: center; gap: 8px; padding: 0; margin: 40px 0 0; }
.shop__pages .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); font-family: var(--f-num); font-weight: 700; color: var(--gray-2); }
.shop__pages .page-numbers.current { background: var(--cyan); color: #021015; border-color: var(--cyan); }
.shop__empty { text-align: center; padding: 70px 20px; border-radius: 28px; border: 1px dashed var(--line-2); background: rgba(0, 229, 255, .03); }
.shop__empty-ic { display: block; font-size: 34px; letter-spacing: .3em; color: var(--cyan); opacity: .7; margin-bottom: 14px; }
.shop__empty p { color: var(--gray-2); margin: 8px 0 22px; }
.shop__empty-ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.card__t a { color: inherit; }
.card__add.is-busy { opacity: .6; }

/* toast link (added to cart → السلة) */
.toast__go { margin-inline-start: 8px; color: var(--cyan); font-weight: 800; white-space: nowrap; }

/* =========================================================
   Cart & checkout (WooCommerce blocks): dark theme pass
   ========================================================= */
.pp-page--cart .wc-block-cart, .pp-page--checkout .wc-block-checkout { color: var(--white); }
.wc-block-components-sidebar-layout .wc-block-components-main, .wc-block-components-sidebar { color: var(--white); }
.wc-block-cart-items, .wc-block-components-order-summary, .wc-block-components-totals-wrapper, .wc-block-checkout__form .wc-block-components-checkout-step {
  border-color: var(--line) !important; }
.wc-block-components-sidebar .wc-block-components-panel, .wc-block-cart__totals-title, .wc-block-components-sidebar > div { background: transparent; }
.wp-block-woocommerce-cart-order-summary-block, .wp-block-woocommerce-checkout-order-summary-block {
  padding: 18px !important; border-radius: 20px; background: linear-gradient(180deg, rgba(13, 42, 51, .55), rgba(8, 22, 28, .92)); border: 1px solid var(--line); }
.wc-block-components-text-input input, .wc-block-components-textarea, .wc-block-components-combobox .wc-block-components-combobox-control input, .wc-blocks-components-select__select {
  background: rgba(255,255,255,.04) !important; color: var(--white) !important; border-color: var(--line) !important; border-radius: 12px !important; }
.wc-block-components-text-input label, .wc-block-components-combobox label, .wc-blocks-components-select__label { color: var(--gray) !important; }
.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button {
  background: var(--cyan) !important; color: #021015 !important; border-radius: 16px !important; min-height: 56px; font: 800 17px var(--f-body) !important; border: 0 !important;
  box-shadow: 0 12px 34px -12px rgba(0, 229, 255, .85); }
.wc-block-components-product-name { color: var(--white) !important; font-family: var(--f-num); font-weight: 700; }
.wc-block-components-product-metadata, .wc-block-components-product-details { color: var(--gray) !important; }
.wc-block-cart-item__image img { border-radius: 12px; }
.wc-block-components-quantity-selector { border-color: var(--line) !important; border-radius: 12px !important; }
.wc-block-components-quantity-selector input, .wc-block-components-quantity-selector button { color: var(--white) !important; background: transparent !important; }
.wc-block-components-totals-item__label, .wc-block-components-totals-item__value { color: var(--white); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font: 800 26px var(--f-num); color: var(--cyan); }
.wc-block-cart__empty-cart__title, .wp-block-woocommerce-empty-cart-block h2 { color: var(--white); font-family: var(--f-head); }
.wc-block-components-checkout-step__title, .wc-block-components-title { color: var(--white) !important; font-family: var(--f-head) !important; }
.wc-block-components-checkout-step__description, .wc-block-checkout__terms { color: var(--gray-2); }
.wc-block-components-radio-control__option, .wc-block-components-checkbox__label { color: var(--white); }

/* =========================================================
   My account (shortcode)
   ========================================================= */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 4px; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); }
.woocommerce-MyAccount-navigation a { display: block; padding: 12px 14px; border-radius: 12px; color: var(--gray-2); font-weight: 700; transition: background .2s, color .2s; }
.woocommerce-MyAccount-navigation a:hover { color: var(--white); background: rgba(255,255,255,.04); }
.woocommerce-MyAccount-navigation .is-active a { color: #021015; background: var(--cyan); }
.woocommerce-MyAccount-content { padding: 24px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(13, 42, 51, .45), rgba(8, 22, 28, .9)); color: var(--gray-2); line-height: 1.8; }
.woocommerce-MyAccount-content a { color: var(--cyan); }
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: start; color: var(--white); }
.woocommerce table.shop_table th { color: var(--gray); font-weight: 600; font-size: 14px; }
.woocommerce-form-login, .woocommerce-form-register { padding: 26px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(13, 42, 51, .45), rgba(8, 22, 28, .9)); }
.u-columns.col2-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.woocommerce-account h2 { font-family: var(--f-head); color: var(--white); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .pd__grid { grid-template-columns: minmax(0, 1fr); padding-top: 110px; }
  .pd__media { position: static; }
  .pd__cover { max-width: 300px; }
  .pd__t { text-align: center; }
  .pd__tags, .pd__crumbs { justify-content: center; }
  .pd__lead { text-align: center; margin-inline: auto; }
  .woocommerce-account .woocommerce, .u-columns.col2-set { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .pp-head, .shop__head { padding-top: 120px; }
  .pd__buy { padding: 18px; }
  .pd__price b { font-size: 44px; }
  .shop__bar { flex-direction: column; align-items: stretch; }
  .shop__bar .seg { align-self: center; }
  .shop__sort { min-width: 0; }
  .shop__grid.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 12px; }
  .shop__grid .card { flex: initial; }
  .pd__related .cards { padding-bottom: 8px; }
}
