/* Panda Roz — mobile polish (v1.0.71) */

:root {
  --pr-safe-top: env(safe-area-inset-top, 0px);
  --pr-safe-bottom: env(safe-area-inset-bottom, 0px);
  --pr-safe-left: env(safe-area-inset-left, 0px);
  --pr-safe-right: env(safe-area-inset-right, 0px);
  --pr-touch-min: 44px;
}

body.pr-body {
  overflow-x: clip;
  padding-left: var(--pr-safe-left);
  padding-right: var(--pr-safe-right);
}

/* ── Header touch targets ── */
@media (max-width: 900px) {
  .pr-header__icon {
    width: var(--pr-touch-min);
    height: var(--pr-touch-min);
  }

  .pr-header__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--pr-touch-min);
    height: var(--pr-touch-min);
    padding: 0;
    border-radius: 50%;
    background: var(--pr-pink-soft);
    transition: background .2s ease, transform .2s ease;
  }

  .pr-header__burger span {
    width: 20px;
    transition: transform .25s ease, opacity .2s ease;
  }

  .pr-header__burger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .pr-header__burger.is-active span:nth-child(2) {
    opacity: 0;
  }

  .pr-header__burger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .pr-header__inner {
    padding-top: max(.35rem, var(--pr-safe-top));
  }
}

/* ── Mobile nav drawer — fallback dacă components.css e cache-uit vechi ── */
@media (max-width: 900px) {
  .pr-mobile-drawer {
    position: fixed !important;
    inset: 0;
    z-index: 550;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
  }

  .pr-mobile-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
  }

  .pr-mobile-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateX(100%);
    pointer-events: none;
  }

  .pr-mobile-drawer.is-open .pr-mobile-drawer__panel {
    transform: translateX(0);
    pointer-events: auto;
  }

  .pr-mobile-drawer__overlay {
    pointer-events: none;
  }

  .pr-mobile-drawer.is-open .pr-mobile-drawer__overlay {
    pointer-events: auto;
  }
}

/* ── Mobile nav drawer (base în components.css — safe-area + touch aici) ── */
.pr-mobile-drawer__panel {
  padding-top: var(--pr-safe-top);
  padding-bottom: var(--pr-safe-bottom);
}

.pr-mobile-drawer__close {
  width: var(--pr-touch-min);
  height: var(--pr-touch-min);
}

.pr-mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}

.pr-mobile-nav__list > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--pr-touch-min);
  padding: .65rem .85rem;
  border-radius: 12px;
  font-weight: 800;
  color: var(--pr-navy);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--pr-gray-100);
}

.pr-mobile-nav__list > li > a:hover,
.pr-mobile-nav__list > li > a:focus-visible {
  color: var(--pr-pink);
  border-color: #fbcfe8;
  background: #fff5f9;
}

.pr-mobile-nav__list .menu-item-has-children {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "link toggle"
    "sub sub";
  gap: .35rem .5rem;
  align-items: stretch;
}

.pr-mobile-nav__list .menu-item-has-children > a {
  grid-area: link;
}

.pr-mobile-nav__subtoggle {
  grid-area: toggle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pr-touch-min);
  min-height: var(--pr-touch-min);
  border: 1px solid var(--pr-gray-100);
  border-radius: 12px;
  background: var(--pr-cream);
  color: var(--pr-navy);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.pr-mobile-nav__subtoggle[aria-expanded="true"] span {
  transform: rotate(90deg);
  display: inline-block;
}

.pr-mobile-nav__list .menu-item-has-children > .sub-menu {
  grid-area: sub;
}

.pr-mobile-nav__list .sub-menu[hidden] {
  display: none !important;
}

.pr-mobile-nav__list .sub-menu:not([hidden]) {
  display: grid;
  list-style: none;
  margin: .35rem 0 0;
  padding: 0 0 0 .65rem;
  gap: .25rem;
  border-left: 2px solid var(--pr-pink-soft);
}

.pr-mobile-nav__list .sub-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .5rem .75rem;
  border-radius: 10px;
  font-weight: 700;
  color: var(--pr-gray-600);
  text-decoration: none;
}

.pr-mobile-nav__list .sub-menu a:hover {
  color: var(--pr-pink);
  background: var(--pr-pink-soft);
}

.pr-mobile-nav__list .menu-item-has-children > a::after {
  content: "▾";
  font-size: .85rem;
  opacity: .65;
  transition: transform .2s ease;
}

.pr-mobile-nav__list .menu-item-has-children > a[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* ── Touch targets: drawer, modal, qty ── */
.pr-drawer__close,
.pr-modal__close {
  width: var(--pr-touch-min);
  height: var(--pr-touch-min);
  min-width: var(--pr-touch-min);
  min-height: var(--pr-touch-min);
}

.pr-drawer__footer {
  padding-bottom: calc(1rem + var(--pr-safe-bottom));
}

.pr-drawer__panel {
  padding-bottom: var(--pr-safe-bottom);
}

#pr-mini-cart-content .quantity .pr-qty-btn,
.pr-drawer .pr-mini-line-item .quantity .pr-qty-btn,
.woocommerce-checkout-review-order-table .quantity .pr-qty-btn,
.pr-checkout-item__qty .quantity .pr-qty-btn {
  width: var(--pr-touch-min);
  min-height: var(--pr-touch-min);
}

#pr-mini-cart-content .quantity .qty,
.pr-drawer .pr-mini-line-item .quantity .qty,
.woocommerce-checkout-review-order-table .quantity .qty,
.pr-checkout-item__qty .quantity .qty {
  width: 2.5rem;
  min-height: var(--pr-touch-min);
}

#pr-mini-cart-content .pr-mini-line-item .remove,
.pr-drawer .pr-mini-line-item .remove,
.pr-mini-line-item .remove {
  width: var(--pr-touch-min);
  height: var(--pr-touch-min);
  min-width: var(--pr-touch-min);
  min-height: var(--pr-touch-min);
  font-size: 1.35rem;
}

.pr-help__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pr-touch-min);
  height: var(--pr-touch-min);
}

.pr-help {
  bottom: calc(1rem + var(--pr-safe-bottom));
  right: calc(1rem + var(--pr-safe-right));
}

.pr-help.is-open .pr-help__panel {
  bottom: calc(4.75rem + var(--pr-safe-bottom));
  right: calc(1rem + var(--pr-safe-right));
  width: min(360px, calc(100vw - 2rem - var(--pr-safe-left) - var(--pr-safe-right)));
}

.pr-cookie {
  padding: 0 calc(1rem + var(--pr-safe-right)) calc(1rem + var(--pr-safe-bottom)) calc(1rem + var(--pr-safe-left));
}

.pr-cookie__btn {
  min-height: var(--pr-touch-min);
  padding: .75rem 1rem;
}

/* ── Product page: add-to-cart bar + layout polish ── */
@media (max-width: 820px) {
  .pr-add-cart-bar {
    flex-wrap: nowrap;
    align-items: stretch;
    gap: .5rem;
  }

  .pr-add-cart-bar .quantity {
    flex: 0 0 auto;
    max-width: none;
    box-shadow: 0 1px 6px rgba(45, 51, 89, .06);
  }

  .pr-add-cart-bar .quantity .qty {
    width: 1.65rem;
    min-height: var(--pr-touch-min);
    font-size: .9375rem;
  }

  .pr-add-cart-bar .pr-qty-btn {
    width: 36px;
    min-width: var(--pr-touch-min);
    min-height: var(--pr-touch-min);
    font-size: 1.05rem;
  }

  .pr-add-cart-bar .single_add_to_cart_button,
  .pr-add-cart-bar .pr-btn {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    min-height: 48px !important;
    font-size: 1rem !important;
    padding: .7rem 1rem !important;
  }

  .pr-product-trust {
    margin-top: 1.15rem;
    padding: 1rem 1.05rem;
  }
}

/* ── Cart page: card layout ── */
@media (max-width: 900px) {
  .woocommerce-cart table.shop_table thead {
    display: none;
  }

  .woocommerce-cart table.shop_table tr.cart_item {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--pr-gray-100);
  }

  .woocommerce-cart table.shop_table tr.cart_item td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100% !important;
    border: 0;
    padding: 0;
  }

  .woocommerce-cart table.shop_table .product-name {
    display: block;
    order: 1;
  }

  .woocommerce-cart table.shop_table .product-name::before {
    display: none;
  }

  .woocommerce-cart table.shop_table .product-price,
  .woocommerce-cart table.shop_table .product-quantity,
  .woocommerce-cart table.shop_table .product-subtotal {
    font-weight: 700;
  }

  .woocommerce-cart table.shop_table .product-price::before,
  .woocommerce-cart table.shop_table .product-quantity::before,
  .woocommerce-cart table.shop_table .product-subtotal::before {
    content: attr(data-title);
    font-size: .8125rem;
    font-weight: 800;
    color: var(--pr-gray-600);
    text-transform: uppercase;
    letter-spacing: .03em;
    flex-shrink: 0;
  }

  .woocommerce-cart table.shop_table .product-price { order: 2; }
  .woocommerce-cart table.shop_table .product-quantity { order: 3; }
  .woocommerce-cart table.shop_table .product-subtotal { order: 4; color: var(--pr-pink); }

  .woocommerce-cart table.shop_table .product-remove {
    order: 5;
    justify-content: flex-start;
  }

  .woocommerce-cart table.shop_table .product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--pr-touch-min);
    min-height: var(--pr-touch-min);
    padding: 0 .85rem;
    border-radius: 999px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 700;
    font-size: .8125rem;
    text-decoration: none;
  }

  .woocommerce-cart table.shop_table .product-remove .screen-reader-text {
    position: static !important;
    width: auto;
    height: auto;
    clip: auto;
    overflow: visible;
  }
}

/* ── Checkout review: card layout ── */
@media (max-width: 768px) {
  .pr-checkout__billing,
  .pr-checkout__order {
    padding: 1.15rem;
  }

  .woocommerce-checkout-review-order-table thead {
    display: none;
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item {
    display: block;
    position: relative;
    padding: 1rem 0;
    border-bottom: 1px solid var(--pr-gray-100);
  }

  .woocommerce-checkout-review-order-table tbody tr.cart_item td {
    display: block;
    border: 0;
    padding: 0;
    width: 100% !important;
  }

  .woocommerce-checkout-review-order-table .product-total {
    position: absolute;
    top: 1rem;
    right: 0;
    text-align: right;
    font-size: 1rem;
    padding-left: .5rem;
    background: linear-gradient(90deg, transparent 0%, #fff 28%);
  }

  .woocommerce-checkout-review-order-table .product-name {
    padding-right: 5.5rem;
  }

  .pr-checkout-item__btn {
    min-height: var(--pr-touch-min);
    padding: .55rem 1rem;
    font-size: .8125rem;
  }

  .woocommerce-checkout #place_order {
    min-height: var(--pr-touch-min);
  }
}

@media (max-width: 520px) {
  .pr-checkout-line__tools {
    align-items: stretch;
    flex-direction: column;
    gap: .65rem;
  }

  .pr-checkout-item__actions {
    width: 100%;
  }

  .pr-checkout-item__btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ── Footer / hero / forms ── */
@media (max-width: 600px) {
  .pr-hero {
    padding: 2.5rem 0 3rem;
  }

  .pr-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pr-hero__actions .pr-btn {
    width: 100%;
    min-height: var(--pr-touch-min);
  }

  .pr-container {
    width: min(100% - 1.25rem, var(--pr-max));
  }

  .pr-modal {
    padding: calc(1rem + var(--pr-safe-top)) calc(1rem + var(--pr-safe-right)) calc(1rem + var(--pr-safe-bottom)) calc(1rem + var(--pr-safe-left));
  }
}

/* ── Prevent horizontal scroll from wide tables ── */
.woocommerce-cart-form,
.pr-checkout__order,
.pr-cart-page {
  max-width: 100%;
  overflow-x: clip;
}

.woocommerce-checkout-review-order-table,
.woocommerce-cart table.shop_table {
  table-layout: fixed;
  width: 100%;
}

/* ── Product page: prevent gallery/summary overlap ── */
.pr-product-page {
  overflow-x: clip;
}
.pr-product-wrap div.images,
.pr-product-wrap .woocommerce-product-gallery {
  float: none !important;
  width: 100% !important;
  max-width: 100%;
}
.pr-product-gallery-col,
.pr-product-gallery-col .flex-viewport {
  overflow: hidden;
  max-width: 100%;
}
