/* ==========================================================
   Taz Cable Shop — WooCommerce pages in the agency's dark brand
   Loaded only on shop, product, cart, checkout and account pages.
   ========================================================== */
body.tca { color-scheme: dark; }

.shop-page .woocommerce-notices-wrapper:empty { display: none; }
.shop-page .crumbs { margin-bottom: 28px; }
.store-wrap { max-width: var(--wrap); }

/* ---------- Sort + count ---------- */
.woocommerce-result-count { float: left; margin: 6px 0 24px; color: var(--muted); font-size: 15px; }
.woocommerce-ordering { float: right; margin: 0 0 24px; }
.woocommerce-ordering select, .shop-page select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-btn);
  padding: 10px 36px 10px 12px; font: 15px var(--font); max-width: 100%;
}

/* ---------- Product grid ---------- */
.tca ul.products { clear: both; list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.tca ul.products::before, .tca ul.products::after { display: none; }
.tca ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; padding: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.tca ul.products li.product:hover { border-color: var(--red); }
.tca ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: var(--text); }
.tca ul.products li.product img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #f4f3f1; margin: 0 !important; transition: transform .35s ease; }
.tca ul.products li.product:hover img { transform: scale(1.04); }
.tca ul.products li.product .woocommerce-loop-product__title { font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: 0; margin: 16px 18px 6px; padding: 0; color: var(--text); }
.tca ul.products li.product .price { display: block; margin: 0 18px 14px; color: var(--muted); font-size: 15px; }
.tca ul.products li.product .price .amount { color: var(--text); font-weight: 700; }
.tca ul.products li.product .button { margin: auto 18px 18px; align-self: flex-start; }
.tca ul.products li.product .onsale, .tca .onsale { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--red); color: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; min-height: 0; min-width: 0; line-height: 1.3; }
.tca ul.products li.product { position: relative; }

/* ---------- Buttons ---------- */
.tca .woocommerce a.button, .tca .woocommerce button.button, .tca .woocommerce input.button, .tca a.button, .tca button.button,
.tca .button.alt, .tca .single_add_to_cart_button, .tca #respond input#submit, .tca .checkout-button, .tca .wc-forward {
  display: inline-block; background: var(--red) !important; color: #fff !important; border: 1px solid var(--red) !important; border-radius: var(--radius-btn) !important;
  padding: 12px 18px !important; font: 700 15px/1.3 var(--font) !important; text-decoration: none !important; cursor: pointer; transition: background .15s ease; box-shadow: none !important; text-shadow: none !important;
}
.tca .button:hover, .tca .single_add_to_cart_button:hover, .tca .checkout-button:hover { background: var(--red-dark) !important; border-color: var(--red-dark) !important; }
.tca .button.disabled, .tca .button:disabled, .tca .single_add_to_cart_button.disabled { opacity: .5; cursor: not-allowed; }
.tca .added_to_cart { display: inline-block; margin: 0 18px 18px; color: var(--pink); font-weight: 700; }

/* ---------- Pagination ---------- */
.woocommerce-pagination ul { list-style: none; display: flex; justify-content: center; gap: 8px; padding: 0; margin: 20px 0 0; border: 0; }
.woocommerce-pagination li { border: 0 !important; }
.woocommerce-pagination .page-numbers { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius-btn); text-decoration: none; color: var(--text); background: transparent; }
.woocommerce-pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Single product ---------- */
.tca div.product { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: start; }
.tca div.product .woocommerce-product-gallery, .tca div.product .summary { width: auto !important; float: none !important; margin: 0 !important; min-width: 0; }
.tca div.product .woocommerce-tabs, .tca div.product .related, .tca div.product .upsells { grid-column: 1 / -1; }
.woocommerce-product-gallery { position: relative; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image { background: #f4f3f1; border-radius: var(--radius); overflow: hidden; }
.woocommerce-product-gallery__image img { width: 100%; height: auto; }
.woocommerce-product-gallery .flex-control-thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.woocommerce-product-gallery .flex-control-thumbs li { margin: 0; }
.woocommerce-product-gallery .flex-control-thumbs img { border-radius: 6px; background: #f4f3f1; opacity: .55; cursor: pointer; border: 2px solid transparent; transition: opacity .15s ease; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active, .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--red); }
.woocommerce-product-gallery__trigger { position: absolute; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; background: rgba(16,17,18,.75); display: flex; align-items: center; justify-content: center; text-indent: -9999px; overflow: hidden; }
.woocommerce-product-gallery__trigger::before { content: ""; text-indent: 0; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; position: absolute; top: 10px; left: 10px; }
.woocommerce-product-gallery__trigger::after { content: ""; width: 2px; height: 8px; background: #fff; position: absolute; top: 23px; left: 26px; transform: rotate(-45deg); }

.tca div.product .product_title { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -1.5px; margin: 0 0 12px; }
.tca div.product .summary .price { font-size: 26px; font-weight: 900; color: var(--text); margin: 0 0 20px; }
.tca div.product .summary .price .amount { color: var(--text); }
.tca div.product .woocommerce-product-details__short-description { color: var(--muted); margin-bottom: 20px; }
.tca table.variations { width: 100%; border: 0; margin: 0 0 16px; border-collapse: collapse; }
.tca table.variations th, .tca table.variations td { display: block; padding: 0; border: 0; text-align: left; background: none; }
.tca table.variations th.label, .tca table.variations td.label { margin-bottom: 8px; }
.tca table.variations label { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.tca table.variations td.value { margin-bottom: 16px; }
.tca table.variations select { width: 100%; max-width: 320px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 12px; font: 16px var(--font); }
.tca .reset_variations { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--pink); }
.tca .woocommerce-variation-price .price { font-size: 22px; margin-bottom: 12px; }
.tca .woocommerce-variation-availability, .tca .stock { color: var(--muted); font-size: 15px; }
.tca form.cart { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 24px; }
.tca form.variations_form { display: block; }
.tca .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tca .quantity input.qty, .tca input.qty { width: 76px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 11px 8px; font: 700 16px var(--font); text-align: center; }
.tca .single_add_to_cart_button { padding: 14px 26px !important; font-size: 16px !important; }
.tca .product_meta { border-top: 1px solid var(--line); padding-top: 16px; font-size: 14px; color: var(--dim); display: grid; gap: 4px; }
.tca .product_meta a { color: var(--muted); }

/* Tabs */
.tca .woocommerce-tabs { margin-top: 24px; }
.tca .woocommerce-tabs ul.tabs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 -1px; border-bottom: 1px solid var(--line); }
.tca .woocommerce-tabs ul.tabs::before, .tca .woocommerce-tabs ul.tabs::after, .tca .woocommerce-tabs ul.tabs li::before, .tca .woocommerce-tabs ul.tabs li::after { display: none; }
.tca .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.tca .woocommerce-tabs ul.tabs li a { display: block; padding: 12px 16px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.tca .woocommerce-tabs ul.tabs li.active a { color: var(--text); border-bottom-color: var(--red); }
.tca .woocommerce-tabs .panel { padding: 24px 0 0; margin: 0; color: #dcd9d3; font-size: 17px; }
.tca table.shop_attributes { width: 100%; border-collapse: collapse; }
.tca table.shop_attributes th, .tca table.shop_attributes td { border-bottom: 1px solid var(--line); padding: 10px 0; text-align: left; font-style: normal; background: none; }
.tca table.shop_attributes th { width: 160px; color: var(--muted); }
.tca table.shop_attributes p { margin: 0; color: var(--text); }
.tca .related > h2, .tca .upsells > h2 { font-size: 30px; letter-spacing: -1px; margin: 24px 0 22px; }
.tca .star-rating, .tca .stars a { color: #f0a500; }

/* ---------- Notices ---------- */
.tca .woocommerce-message, .tca .woocommerce-info, .tca .woocommerce-error, .tca .wc-block-components-notice-banner {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel) !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-left: 4px solid var(--red) !important; border-radius: var(--radius); padding: 16px 20px !important; margin: 0 0 24px;
}
.tca .woocommerce-message:focus, .tca .woocommerce-info:focus, .tca .woocommerce-error:focus, .tca .wc-block-components-notice-banner:focus { outline: none; }
.tca .woocommerce-message::before, .tca .woocommerce-info::before, .tca .woocommerce-error::before { display: none; }
.tca .woocommerce-message .button, .tca .woocommerce-info .button { order: 2; }
.tca .woocommerce-error li { margin: 0; }

/* ---------- Forms (classic cart, checkout, account) ---------- */
.shop-page input[type=text], .shop-page input[type=email], .shop-page input[type=tel], .shop-page input[type=password], .shop-page input[type=number], .shop-page input[type=search], .shop-page textarea,
.shop-page .select2-container .select2-selection {
  width: 100%; background: var(--panel) !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-radius: var(--radius-btn) !important; padding: 11px 12px; font: 16px var(--font); min-height: 46px;
}
.shop-page input:focus, .shop-page textarea:focus, .shop-page select:focus { outline: 2px solid var(--pink); outline-offset: 1px; }
.shop-page label { color: var(--muted); font-size: 14px; font-weight: 700; }
.shop-page .required { color: var(--pink); text-decoration: none; }
.select2-dropdown { background: var(--panel) !important; color: var(--text) !important; border-color: var(--line) !important; }
.select2-results__option--highlighted { background: var(--red) !important; }
.shop-page .form-row { margin: 0 0 16px; }

/* Classic cart table */
.tca table.shop_table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.tca table.shop_table th, .tca table.shop_table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; background: none; }
.tca table.shop_table th { background: var(--panel); color: var(--muted); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.tca table.shop_table img { width: 72px; border-radius: 6px; background: #f4f3f1; }
.tca table.shop_table a.remove { color: var(--muted) !important; font-size: 22px; text-decoration: none; }
.tca table.shop_table a.remove:hover { color: var(--red) !important; background: none; }
.tca .cart-collaterals .cart_totals { max-width: 460px; margin-left: auto; }

/* ---------- Cart & checkout blocks ---------- */
.tca .wc-block-cart, .tca .wc-block-checkout, .tca .wp-block-woocommerce-cart, .tca .wp-block-woocommerce-checkout { color: var(--text); }
.tca .wc-block-components-sidebar-layout { margin: 0; }
.tca .wc-block-components-sidebar, .tca .wc-block-checkout__sidebar, .tca .wp-block-woocommerce-cart-totals-block {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px !important;
}
.tca .wc-block-cart-items, .tca .wc-block-cart-items th, .tca .wc-block-cart-items td, .tca .wc-block-components-totals-wrapper, .tca .wc-block-components-panel, .tca .wc-block-components-order-summary-item { border-color: var(--line) !important; }
.tca .wc-block-cart-items th, .tca .wc-block-components-totals-item__label, .tca .wc-block-components-product-metadata, .tca .wc-block-components-checkout-step__description { color: var(--muted); }
.tca .wc-block-components-product-name, .tca .wc-block-cart-item__product a { color: var(--text) !important; font-weight: 700; text-decoration: none; }
.tca .wc-block-cart-item__image img, .tca .wc-block-components-order-summary-item__image img { background: #f4f3f1; border-radius: 6px; }
.tca .wc-block-components-text-input input, .tca .wc-block-components-text-input textarea, .tca .wc-blocks-components-select select, .tca .wc-block-components-combobox .components-combobox-control input, .tca .wc-block-components-form .wc-block-components-text-input input {
  background: var(--panel) !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-radius: var(--radius-btn) !important;
}
.tca .wc-block-components-text-input label, .tca .wc-blocks-components-select label, .tca .wc-block-components-combobox label { color: var(--muted) !important; }
.tca .wc-blocks-components-select .wc-blocks-components-select__container { background: var(--panel) !important; border-color: var(--line) !important; }
.tca .wc-block-components-button:not(.is-link), .tca .wc-block-cart__submit-button, .tca .wc-block-components-checkout-place-order-button {
  background: var(--red) !important; color: #fff !important; border: 0 !important; border-radius: var(--radius-btn) !important; font-weight: 700 !important; min-height: 50px;
}
.tca .wc-block-components-button:not(.is-link):hover { background: var(--red-dark) !important; }
.tca .wc-block-components-quantity-selector { border-color: var(--line) !important; background: var(--panel); }
.tca .wc-block-components-quantity-selector input, .tca .wc-block-components-quantity-selector button { color: var(--text) !important; background: transparent !important; }
.tca .wc-block-components-radio-control__option, .tca .wc-block-components-radio-control-accordion-option { border-color: var(--line) !important; }
.tca .wc-block-components-radio-control__input, .tca .wc-block-components-checkbox__input { background: var(--panel) !important; border-color: var(--muted) !important; }
.tca .wc-block-components-radio-control__input:checked::before { background: var(--red) !important; }
.tca .wc-block-components-checkbox__input:checked { background: var(--red) !important; border-color: var(--red) !important; }
.tca .wc-block-components-totals-footer-item .wc-block-components-totals-item__value, .tca .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { color: var(--text); font-size: 20px; }
.tca .wc-block-components-title, .tca .wc-block-components-checkout-step__title { color: var(--text); letter-spacing: -.3px; }
.tca .wc-block-components-checkout-step__heading-content a, .tca .wc-block-components-panel__button { color: var(--pink) !important; }
.tca .wc-block-components-formatted-money-amount { color: inherit; }
.tca .wc-block-components-sale-badge, .tca .wc-block-components-product-badge { color: var(--pink) !important; border-color: var(--pink) !important; background: transparent !important; }
.tca .wp-block-woocommerce-empty-cart-block { text-align: center; }
.tca .wc-block-grid__product { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding-bottom: 16px; }
.tca .wc-block-grid__product-image img { background: #f4f3f1; }

/* ---------- My account ---------- */
.tca .woocommerce-account .woocommerce, .tca.woocommerce-account .woocommerce { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.tca .woocommerce-MyAccount-navigation, .tca .woocommerce-MyAccount-content { float: none !important; width: auto !important; min-width: 0; }
.tca .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tca .woocommerce-MyAccount-navigation li { margin: 0; }
.tca .woocommerce-MyAccount-navigation a { display: block; padding: 12px 18px; text-decoration: none; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.tca .woocommerce-MyAccount-navigation li:last-child a { border-bottom: 0; }
.tca .woocommerce-MyAccount-navigation li.is-active a { color: var(--text); background: rgba(227,38,54,.12); box-shadow: inset 3px 0 0 var(--red); }
.tca.woocommerce-account:not(.logged-in) .woocommerce { display: block; max-width: 520px; }
.tca .woocommerce-form-login, .tca .woocommerce-form-register { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .tca ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .tca ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .tca ul.products li.product .woocommerce-loop-product__title { font-size: 15px; margin: 12px 12px 4px; }
  .tca ul.products li.product .price { margin: 0 12px 12px; font-size: 14px; }
  .tca ul.products li.product .button { margin: auto 12px 12px; padding: 10px 12px !important; font-size: 14px !important; }
  .tca div.product { grid-template-columns: 1fr; gap: 28px; }
  .tca .woocommerce-account .woocommerce, .tca.woocommerce-account .woocommerce { grid-template-columns: 1fr; }
  .woocommerce-result-count, .woocommerce-ordering { float: none; }
  .tca table.shop_table_responsive thead { display: none; }
  .tca table.shop_table_responsive tr td { display: block; text-align: right; }
  .tca table.shop_table_responsive tr td::before { content: attr(data-title) ": "; float: left; font-weight: 700; color: var(--muted); }
}

/* Block cart/checkout sizing */
.tca .wc-block-cart-items { width: 100%; }
.tca .wc-block-components-order-summary-item .wc-block-components-product-name,
.tca .wc-block-cart-item__product .wc-block-components-product-name { font-size: 15px !important; line-height: 1.35; letter-spacing: 0; }
.tca .wc-block-components-order-summary-item__description { min-width: 0; }
.tca .wc-block-cart, .tca .wc-block-checkout { font-size: 16px; }
