/* ==========================================================================
   MAGAZIN — stilurile WooCommerce în tokenurile temei. Se încarcă doar pe paginile
   magazinului (inc/magazin.php). Înlocuiește foaia implicită WooCommerce.
   ========================================================================== */

/* --- banda de sub antet ---------------------------------------------------- */
.banda-magazin__interior { display: flex; flex-direction: column; align-items: flex-start; gap: 2rem; padding-top: 24rem; }
.fir { display: flex; flex-wrap: wrap; gap: 1rem; font-size: var(--nota); opacity: 0.8; }
.fir a { text-decoration: underline; }
.banda-magazin__subtitlu { max-width: 80rem; }
.banda-magazin__subtitlu p { margin: 0; }

.magazin { display: flex; flex-direction: column; gap: 3rem; }
.magazin--ingust { max-width: 120rem; }

/* --- bara de sortare ---------------------------------------------------- */
.woocommerce-ordering { display: flex; justify-content: flex-end; }
.woocommerce-ordering select, .magazin select, .magazin input[type="text"], .magazin input[type="email"], .magazin input[type="tel"],
.magazin input[type="password"], .magazin input[type="number"], .magazin textarea {
  width: 100%; padding: 1.2rem 1.5rem; font: inherit; color: var(--negru); background: #fff; border: 1px solid var(--bej); border-radius: 0; }
.woocommerce-ordering select { width: auto; }
.magazin input[type="number"] { width: 7rem; }

/* --- lista de produse: aceleași carduri bej ca pe pagina de capsule ------- */
.products { padding: 0; list-style: none; }
.grila-carduri { padding-top: 0; }
/* coloanele grilei: .grila-carduri din temă nu le definește (o fac variantele --3/--5), WooCommerce le dă prin columns-N.
   Fără regula asta fiecare card umple toată lățimea, cu imaginea de 1300+ px — văzut de Ion pe 22.09. */
.products.columns-4 { grid-template-columns: repeat(4, 1fr); }
.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
.products > li { display: flex; flex-direction: column; margin: 0; }
.products .woocommerce-loop-product__link { display: flex; flex-direction: column; flex: 1; gap: 1.5rem; padding: 3rem; text-align: center; background-color: var(--bej); }
.products .woocommerce-loop-product__link img { width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform 300ms cubic-bezier(0.68, -0.6, 0.32, 1.6); }
.products > li:hover .woocommerce-loop-product__link img { transform: scale(1.06); }
.card-produs__categorie { font-size: var(--nota); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.woocommerce-loop-product__title { margin: 0; font-size: var(--h5); font-weight: 700; }
.products .price { margin-top: auto; font-weight: 600; }
.products .button { align-self: center; margin-top: 1rem; }
.onsale { position: absolute; top: 1.5rem; left: 1.5rem; padding: 0.5rem 1rem; font-size: var(--nota); font-weight: 600; color: var(--bej); background: var(--maro); }
.products > li { position: relative; }

/* --- butoane: ale temei ------------------------------------------------- */
.magazin .button, .magazin button[type="submit"], .magazin input[type="submit"], .magazin .wc-forward, .magazin a.checkout-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.2rem 1.5rem; font: inherit; font-weight: 600;
  letter-spacing: 0.5px; line-height: 130%; color: var(--bej); background-color: var(--maro); border: 0; border-radius: 0; cursor: pointer; transition: var(--tranzitie); }
.magazin .button:hover, .magazin button[type="submit"]:hover { background-color: var(--negru); }
.magazin .button.disabled, .magazin .button:disabled { opacity: 0.5; cursor: default; }

/* --- pagina produsului: imaginea 5 coloane, restul 7, ca fereastra capsulei --- */
div.product { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3rem 3rem; }
div.product .woocommerce-product-gallery { grid-column: span 5; }
div.product .summary { grid-column: span 7; display: flex; flex-direction: column; gap: 2rem; }
div.product .woocommerce-tabs, div.product .related, div.product .up-sells { grid-column: 1 / -1; }
.woocommerce-product-gallery { position: relative; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bej); }
.woocommerce-product-gallery .flex-control-thumbs { display: flex; gap: 1rem; margin-top: 1rem; padding: 0; list-style: none; }
.woocommerce-product-gallery .flex-control-thumbs li { width: 8rem; cursor: pointer; opacity: 0.6; }
.woocommerce-product-gallery .flex-control-thumbs li img.flex-active, .woocommerce-product-gallery .flex-control-thumbs li:hover { opacity: 1; }
.woocommerce-product-gallery__trigger { position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 3.6rem; height: 3.6rem; text-indent: -999em; background: #fff; border-radius: 100%; }
.summary .price { font-size: var(--h4); font-weight: 600; }
.summary .woocommerce-product-details__short-description { font-size: var(--h6); }
.summary .product_meta { font-size: var(--nota); opacity: 0.8; }
.summary .product_meta > span { display: block; }
.produs__indisponibil { padding: 1.5rem 2rem; background: var(--bej); }

.variations { width: 100%; border-collapse: collapse; }
.variations th, .variations td { padding: 0.5rem 0; text-align: left; vertical-align: middle; }
.variations th { padding-right: 2rem; font-weight: 600; white-space: nowrap; }
.variations select { width: auto; min-width: 20rem; }
.reset_variations { display: block; margin-top: 0.5rem; font-size: var(--nota); text-decoration: underline; }
.woocommerce-variation-price { margin-bottom: 1rem; }
form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
form.cart .quantity input { text-align: center; }
form.variations_form.cart { flex-direction: column; align-items: flex-start; }
form.variations_form .single_variation_wrap { width: 100%; }
.woocommerce-variation-add-to-cart { display: flex; align-items: center; gap: 1.5rem; }

/* filele: nu file, ci secțiuni una sub alta, cu titlu */
.woocommerce-tabs .wc-tabs { display: none; }
.woocommerce-tabs .woocommerce-Tabs-panel { display: block !important; padding-top: 3rem; border-top: 1px solid var(--bej); }
.woocommerce-tabs .woocommerce-Tabs-panel h2 { margin-bottom: 2rem; font-size: var(--h4); }
.woocommerce-tabs .woocommerce-Tabs-panel--description h2 { display: none; }
.woocommerce-product-attributes { width: 100%; border-collapse: collapse; }
.woocommerce-product-attributes th, .woocommerce-product-attributes td { padding: 1rem 0; text-align: left; border-bottom: 1px solid var(--bej); }
.woocommerce-product-attributes th { width: 30%; font-weight: 600; }
.woocommerce-product-attributes p { margin: 0; }
.related > h2, .up-sells > h2 { margin-bottom: 3rem; font-size: var(--h3); font-weight: 400; }

/* --- coș ------------------------------------------------------------------ */
.woocommerce-cart-form table, .shop_table { width: 100%; border-collapse: collapse; }
.shop_table th, .shop_table td { padding: 1.5rem 1rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--bej); }
.shop_table thead th { font-weight: 600; }
.shop_table .product-thumbnail img { width: 8rem; }
.shop_table .product-remove a { display: inline-flex; width: 3rem; height: 3rem; align-items: center; justify-content: center; font-size: 2.4rem; line-height: 1; }
.cart-collaterals { display: flex; justify-content: flex-end; }
.cart_totals { width: 100%; max-width: 48rem; padding: 3rem; background: var(--bej); }
.cart_totals h2 { margin-bottom: 2rem; font-size: var(--h5); font-weight: 700; }
.cart_totals .shop_table th, .cart_totals .shop_table td { border-color: rgba(43, 29, 24, 0.15); }
.wc-proceed-to-checkout { margin-top: 2rem; }
.wc-proceed-to-checkout .checkout-button { width: 100%; }
.coupon { display: flex; gap: 1rem; }
.cart-empty, .return-to-shop { text-align: center; }

/* --- finalizare comandă ----------------------------------------------------- */
.woocommerce-checkout .col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.form-row { display: flex; flex-direction: column; gap: 0.5rem; margin: 0 0 1.5rem; }
.form-row label { font-weight: 500; }
.form-row .required { color: #b32d2e; text-decoration: none; }
.form-row-first, .form-row-last { display: inline-flex; width: calc(50% - 1rem); }
.form-row-last { margin-left: 2rem; }
.form-row.woocommerce-invalid input { border-color: #b32d2e; }
.woocommerce-checkout-review-order { margin-top: 3rem; padding: 3rem; background: var(--bej); }
#order_review_heading { margin-top: 3rem; font-size: var(--h5); font-weight: 700; }
.woocommerce-checkout-payment { margin-top: 2rem; }
.wc_payment_methods { padding: 0; list-style: none; }
.wc_payment_method { padding: 1rem 0; border-bottom: 1px solid rgba(43, 29, 24, 0.15); }
.wc_payment_method label { font-weight: 600; }
.payment_box { margin-top: 1rem; font-size: var(--nota); }
.place-order .button { width: 100%; margin-top: 2rem; }
.woocommerce-privacy-policy-text { font-size: var(--nota); }
.select2-container .select2-selection--single { height: auto; padding: 1.2rem 1.5rem; border: 1px solid var(--bej); border-radius: 0; }
.select2-container .select2-selection--single .select2-selection__rendered { padding: 0; line-height: inherit; }
.select2-container .select2-selection--single .select2-selection__arrow { top: 50%; transform: translateY(-50%); }

/* --- contul meu ------------------------------------------------------------ */
.woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 1rem; padding: 0; list-style: none; }
.woocommerce-MyAccount-navigation a { display: block; padding: 1rem 1.5rem; background: var(--bej); }
.woocommerce-MyAccount-navigation .is-active a { color: var(--bej); background: var(--maro); }
.woocommerce-MyAccount-content { margin-top: 3rem; }
.woocommerce-form-login, .woocommerce-form-register { max-width: 48rem; }
.woocommerce-form-login .button { margin-top: 1rem; }

/* --- mesaje ---------------------------------------------------------------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error { padding: 1.5rem 2rem; margin: 0; list-style: none; background: var(--bej); }
.woocommerce-error { border-left: 4px solid #b32d2e; }
.woocommerce-message .button, .woocommerce-info .button { margin-left: 1.5rem; }
.woocommerce-notices-wrapper:empty { display: none; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- ecrane înguste --------------------------------------------------------- */
@media (max-width: 1250px) { .products.columns-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 991px) { .products.columns-4, .products.columns-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) {
  .banda-magazin__interior { padding-top: 16rem; }
  .products.columns-4, .products.columns-3, .products.columns-2 { grid-template-columns: 1fr; }
  div.product { display: flex; flex-direction: column; }
  .woocommerce-checkout .col2-set { grid-template-columns: 1fr; }
  .form-row-first, .form-row-last { width: 100%; margin-left: 0; }
  .shop_table thead { display: none; }
  .shop_table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--bej); }
  .shop_table td { padding: 0; border: 0; }
  .shop_table td.product-name { flex: 1; }
  .shop_table td.product-quantity, .shop_table td.product-subtotal { width: auto; }
  .cart_totals .shop_table tr { display: table-row; }
  .cart_totals .shop_table th, .cart_totals .shop_table td { display: table-cell; padding: 1rem 0; }
  .woocommerce-MyAccount-navigation ul { flex-direction: column; }
}

/* finalizare: titlurile secțiunilor și cutia de cupon vor aer (văzut la proba de flux din 22.09) */
.woocommerce-checkout h3 { margin: 2rem 0 1.5rem; font-size: var(--h5); font-weight: 700; }
.woocommerce-form-coupon-toggle .woocommerce-info { margin-bottom: 3rem; }
