/* ==========================================================================
   Pak-eSim — WooCommerce surfaces
   WooCommerce's own stylesheets are dequeued in inc/woocommerce.php, so this
   file is the whole visual layer for shop, cart, checkout and account.
   ========================================================================== */

/* ------------------------------------------------------------ shop page --- */

.shop-head { padding-block: clamp(40px, 5vw, 64px) 8px; }

.woocommerce-notices-wrapper:empty { display: none; }

/* ------------------------------------------------------- single product --- */

.product-single {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(32px, 4vw, 52px) clamp(48px, 6vw, 72px);
  align-items: start;
}
@media (max-width: 880px) { .product-single { grid-template-columns: 1fr; } }

.product-single__summary { display: flex; flex-direction: column; gap: 20px; }
.product-single__summary h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); }

.product-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.product-meta span {
  background: var(--teal-tint); color: var(--teal-dark);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  padding: 6px 13px; border-radius: var(--r-pill);
}

.product-price {
  font-family: var(--font-head); font-weight: 700; color: var(--teal);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); line-height: 1;
}
.product-price .woocommerce-Price-currencySymbol { font-size: .55em; }
.product-price small { display: block; font-family: var(--font-body); font-size: .95rem;
                       font-weight: 600; color: var(--muted); margin-top: 8px; }

.product-short { font-size: 1.0625rem; line-height: 1.7; color: var(--body); }

form.cart { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
form.cart .quantity { display: flex; }
form.cart .quantity input {
  width: 82px; padding: 14px 12px; text-align: center;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl);
  font-weight: 700; background: var(--surface);
}
form.cart .quantity input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(14,124,134,.14); }
form.cart button[type="submit"] {
  flex: 1 1 200px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: var(--r-ctl); border: 1.5px solid var(--teal);
  background: var(--teal); color: #fff; font-weight: 700; font-size: 15.5px;
  cursor: pointer; box-shadow: var(--sh-teal);
  transition: background-color .18s var(--ease), box-shadow .18s var(--ease);
}
form.cart button[type="submit"]:hover { background: var(--teal-dark); border-color: var(--teal-dark); }

/* Aside card on the product page */
.product-aside {
  position: sticky; top: 96px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 26px;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--sh-card);
}
.product-aside h2 { font-size: 17px; }
.product-aside dl { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.product-aside .row {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 13.5px; padding: 11px 14px;
  background: var(--teal-wash); border-radius: 10px;
}
.product-aside .row dt { color: var(--muted); font-weight: 600; margin: 0; }
.product-aside .row dd { font-weight: 700; margin: 0; text-align: right; }

.product-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.product-steps li { display: flex; gap: 11px; font-size: 13.5px; color: var(--body); line-height: 1.55; }
.product-steps b {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px;
  background: var(--teal-tint); color: var(--teal);
  display: grid; place-items: center; font-size: 12px;
}

.woocommerce-tabs { padding-bottom: clamp(48px, 6vw, 72px); }
.woocommerce-tabs .tabs { display: none; }
.woocommerce-Tabs-panel h2 { margin-bottom: 14px; }

/* --------------------------------------------------------------- cart --- */

.cart-layout {
  display: grid; grid-template-columns: 1.5fr .9fr; gap: clamp(24px, 3vw, 40px);
  align-items: start; padding-bottom: clamp(48px, 6vw, 72px);
}
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-lines { display: flex; flex-direction: column; gap: 12px; }

.cart-line {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; display: grid;
  grid-template-columns: 1fr auto auto auto; gap: 18px; align-items: center;
}
@media (max-width: 620px) {
  .cart-line { grid-template-columns: 1fr auto; row-gap: 12px; }
  .cart-line__price { grid-column: 1; }
}
.cart-line__name { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.cart-line__name a { color: var(--ink); }
.cart-line__name a:hover { color: var(--teal); }
.cart-line__meta { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.cart-line__price { font-weight: 700; white-space: nowrap; }
.cart-line .quantity input {
  width: 68px; padding: 9px 8px; text-align: center;
  border: 1.5px solid var(--line-strong); border-radius: 9px; font-weight: 700;
}
.cart-line__remove {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--muted); font-size: 18px; line-height: 1; background: var(--bg);
}
.cart-line__remove:hover { background: var(--error-bg); color: var(--error); }

.cart-actions { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; }

/* Summary card — shared by cart and checkout */
.summary {
  position: sticky; top: 96px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 26px;
  box-shadow: var(--sh-card);
}
.summary h2 { font-size: 18px; margin-bottom: 18px; }
.summary table { width: 100%; border-collapse: collapse; }
.summary th, .summary td { padding: 11px 0; font-size: 14.5px; text-align: left; }
.summary td { text-align: right; font-weight: 700; }
.summary th { font-weight: 600; color: var(--body); }
.summary tr + tr th, .summary tr + tr td { border-top: 1px solid var(--line); }
.summary .order-total th, .summary .order-total td {
  border-top: 2px solid var(--line-strong); padding-top: 15px;
  font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--ink);
}
.summary .order-total td { color: var(--teal); }
.summary .btn { margin-top: 20px; }

.summary__note { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.55; }

/* ----------------------------------------------------------- checkout --- */

.checkout-steps {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding-block: 24px 0; font-size: 13.5px; font-weight: 700; color: var(--muted);
}
.checkout-steps span { display: inline-flex; align-items: center; gap: 8px; }
.checkout-steps .is-current { color: var(--teal); }
.checkout-steps b {
  width: 22px; height: 22px; border-radius: var(--r-pill);
  display: grid; place-items: center; font-size: 12px;
  background: var(--line); color: var(--muted);
}
.checkout-steps .is-current b, .checkout-steps .is-done b { background: var(--teal); color: #fff; }
.checkout-steps i { font-style: normal; color: var(--line-strong); }

.checkout-layout {
  display: grid; grid-template-columns: 1.35fr .95fr; gap: clamp(24px, 3vw, 44px);
  align-items: start; padding-block: 24px clamp(48px, 6vw, 72px);
}
@media (max-width: 940px) { .checkout-layout { grid-template-columns: 1fr; } }

.checkout-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: clamp(22px, 3vw, 30px);
  margin-bottom: 18px;
}
.checkout-card > h2 {
  font-size: 19px; margin-bottom: 6px;
  display: flex; align-items: center; gap: 11px;
}
.checkout-card > h2 b {
  width: 26px; height: 26px; border-radius: 8px; background: var(--teal-tint);
  color: var(--teal); display: grid; place-items: center; font-size: 13px;
}
.checkout-card__hint { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

/* Fields */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 560px) {
  .woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr; }
}
.form-row { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.form-row-wide, .form-row.notes { grid-column: 1 / -1; }

.form-row label {
  font-size: 13.5px; font-weight: 700; color: var(--body);
}
.form-row label .required { color: var(--error); text-decoration: none; margin-left: 2px; }
.form-row .optional { color: var(--muted); font-weight: 600; }

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="password"],
.form-row textarea,
.form-row select {
  width: 100%; padding: 13px 14px; border-radius: 10px;
  border: 1.5px solid var(--line-strong); background: var(--surface);
  font-size: 15px; font-weight: 500; color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form-row textarea { min-height: 92px; resize: vertical; font-family: var(--font-body); }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(14,124,134,.14);
}
.form-row .description { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.form-row.woocommerce-invalid input,
.form-row.woocommerce-invalid select { border-color: var(--error); }
.form-row.woocommerce-validated input { border-color: var(--teal); }

/* Order review inside the checkout summary */
.checkout-review { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.checkout-review__line {
  display: flex; justify-content: space-between; gap: 14px; font-size: 14.5px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.checkout-review__line:last-child { border-bottom: 0; padding-bottom: 0; }
.checkout-review__name { font-weight: 700; }
.checkout-review__qty { color: var(--muted); font-weight: 600; font-size: 13px; }
.checkout-review__amount { font-weight: 700; white-space: nowrap; }

/* Payment */
.wc_payment_methods { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wc_payment_method > label {
  display: flex; align-items: center; gap: 11px;
  border: 1.5px solid var(--teal); background: var(--teal-tint);
  border-radius: 12px; padding: 15px 18px;
  font-weight: 700; font-size: 15px; cursor: pointer;
}
.wc_payment_method input[type="radio"] { accent-color: var(--teal); width: 17px; height: 17px; }
.payment_box {
  background: var(--teal-wash); border-radius: 12px;
  padding: 16px 18px; margin-top: 10px;
  font-size: 14px; line-height: 1.6; color: var(--body);
}
.payment_box p:last-child { margin-bottom: 0; }

#place_order {
  width: 100%; margin-top: 4px;
  padding: 16px 28px; border-radius: var(--r-ctl); border: 0;
  background: var(--teal); color: #fff; font-weight: 700; font-size: 16.5px;
  cursor: pointer; box-shadow: var(--sh-teal);
  transition: background-color .18s var(--ease);
}
#place_order:hover { background: var(--teal-dark); }

.checkout-reassure { font-size: 12.5px; color: var(--muted); text-align: center; margin: 12px 0 0; line-height: 1.55; }

.woocommerce-terms-and-conditions-wrapper { margin-bottom: 14px; font-size: 13.5px; }

/* --------------------------------------------------- order received --- */

.order-done { padding-block: clamp(40px, 5vw, 64px) clamp(48px, 6vw, 80px); }

.order-done__head {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 14px; margin-bottom: 36px;
}
.order-done__tick {
  width: 62px; height: 62px; border-radius: var(--r-pill);
  background: var(--teal-tint); color: var(--teal);
  display: grid; place-items: center;
}
.order-done__tick svg { width: 30px; height: 30px; }

.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 780px) { .order-grid { grid-template-columns: 1fr; } }

.order-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 26px;
}
.order-panel h2 { font-size: 17px; margin-bottom: 16px; }
.order-panel--bank { border-color: var(--teal); box-shadow: var(--sh-card); }

.bank-rows { display: flex; flex-direction: column; gap: 9px; }
.bank-row {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  padding: 12px 15px; background: var(--teal-wash); border-radius: 10px; font-size: 14px;
}
.bank-row span:first-child { color: var(--muted); font-weight: 600; }
.bank-row span:last-child { font-weight: 700; font-family: ui-monospace, monospace; text-align: right; word-break: break-all; }

.order-lines { width: 100%; border-collapse: collapse; }
.order-lines th, .order-lines td { padding: 11px 0; font-size: 14.5px; text-align: left; border-bottom: 1px solid var(--line); }
.order-lines td:last-child, .order-lines th:last-child { text-align: right; }
.order-lines tfoot th { font-weight: 600; color: var(--body); }
.order-lines tfoot td { font-weight: 700; }
.order-lines tfoot tr:last-child th, .order-lines tfoot tr:last-child td {
  font-family: var(--font-head); font-size: 17px; border-bottom: 0; padding-top: 14px;
}
.order-lines tfoot tr:last-child td { color: var(--teal); }

.order-status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-tint); color: var(--teal-dark);
  font-size: 13px; font-weight: 700; padding: 7px 15px; border-radius: var(--r-pill);
}

/* ------------------------------------------------------------ account --- */

.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding-bottom: clamp(48px,6vw,72px); align-items: start; }
@media (max-width: 780px) { .account-layout { grid-template-columns: 1fr; } }

.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.woocommerce-MyAccount-navigation a {
  display: block; padding: 11px 15px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: var(--body);
}
.woocommerce-MyAccount-navigation a:hover { background: var(--teal-wash); color: var(--teal); }
.woocommerce-MyAccount-navigation .is-active a { background: var(--teal); color: #fff; }

.woocommerce-MyAccount-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px; }

.woocommerce-orders-table, .shop_table { width: 100%; border-collapse: collapse; }
.woocommerce-orders-table th, .woocommerce-orders-table td,
.shop_table th, .shop_table td {
  padding: 13px 10px; font-size: 14px; text-align: left; border-bottom: 1px solid var(--line);
}
.woocommerce-orders-table th, .shop_table th { font-weight: 700; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }

/* ------------------------------------------------------------ notices --- */

.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice {
  border-radius: 12px; padding: 15px 20px; margin: 0 0 18px;
  font-size: 14.5px; font-weight: 600; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.woocommerce-message { background: var(--ok-bg); color: var(--ok); border-left: 4px solid var(--teal); }
.woocommerce-info    { background: var(--teal-wash); color: var(--body); border-left: 4px solid var(--teal-soft); }
.woocommerce-error   { background: var(--error-bg); color: var(--error); border-left: 4px solid var(--error); flex-direction: column; align-items: flex-start; }
.woocommerce-error li { margin-bottom: 4px; }

.woocommerce-message .button, .woocommerce-info .button {
  background: var(--teal); color: #fff; padding: 9px 18px;
  border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.woocommerce-message .button:hover, .woocommerce-info .button:hover { background: var(--teal-dark); color: #fff; }

/* ------------------------------------------------------ device matrix --- */

.device-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.device-list li { display: flex; gap: 9px; align-items: baseline; font-size: 14px; color: var(--body); }
.device-list .is-ok > span:first-child { color: var(--teal); font-weight: 700; }
.device-list .is-no > span:first-child { color: var(--error); font-weight: 700; }
.device-list .is-no { color: var(--muted); }

/* ------------------------------------------------------------- misc --- */

.woocommerce-loop-product__link { display: block; }
.wc-block-components-notice-banner { border-radius: 12px; }
.blockUI.blockOverlay { background: rgba(247,250,250,.7) !important; }
.woocommerce a.remove { text-decoration: none; }

/* --------------------------------------------- BACS bank details panel --- */
/* Rendered by the WooCommerce BACS gateway on the thank-you page and in the
   customer email; styled here rather than re-implemented so the gateway stays
   the single source of truth for what the account fields are. */

.wc-bacs-bank-details-heading,
.woocommerce-bacs-bank-details h2 { font-size: 15px; margin: 4px 0 12px; }

ul.wc-bacs-bank-details {
  list-style: none; margin: 0 0 6px; padding: 0;
  display: flex; flex-direction: column; gap: 9px;
}
ul.wc-bacs-bank-details li {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  padding: 12px 15px; background: var(--teal-wash); border-radius: 10px; font-size: 14px;
}
ul.wc-bacs-bank-details li strong {
  font-family: ui-monospace, monospace; font-weight: 700;
  text-align: right; word-break: break-all;
}
.wc-bacs-bank-details-account-name { font-weight: 700; }

/* ------------------------------------------------- account entry point --- */

.account-entry {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  align-items: start; padding-bottom: clamp(48px, 6vw, 72px);
}
.account-entry--three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .account-entry--three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .account-entry, .account-entry--three { grid-template-columns: 1fr; } }

.account-entry .checkout-card { margin-bottom: 0; height: 100%; }

.login-actions { gap: 14px; }
.inline-check { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--body); cursor: pointer; }
.inline-check input { width: 17px; height: 17px; accent-color: var(--teal); margin: 0; }
.lost-password { font-size: 13.5px; font-weight: 600; text-align: center; }

/* WooCommerce prints a bare <span class="woocommerce-form__label-for-checkbox">
   wrapper around some checkboxes; without a rule it renders as a stray box. */
.woocommerce-form__label-for-checkbox { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.woocommerce-form__label-for-checkbox input { width: 17px; height: 17px; accent-color: var(--teal); margin: 0; }

/* Order-tracking result table */
.woocommerce-order .order-lines,
.woocommerce-order .shop_table { margin-top: 18px; }

/* ------------------------------------- generic WooCommerce button fallback --*/
/* Any Woo template we have not overridden still renders `.button`; give it the
   Pak-eSim primary treatment so nothing falls back to the browser default. */

.woocommerce .button:not(.btn),
.woocommerce a.button:not(.btn),
.woocommerce button.button:not(.btn),
.woocommerce input.button:not(.btn),
.woocommerce-page .button:not(.btn) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--r-ctl);
  background: var(--teal); color: #fff; border: 1.5px solid var(--teal);
  font-weight: 700; font-size: 15px; line-height: 1.2; cursor: pointer;
  text-decoration: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.woocommerce .button:not(.btn):hover,
.woocommerce a.button:not(.btn):hover,
.woocommerce button.button:not(.btn):hover,
.woocommerce input.button:not(.btn):hover,
.woocommerce-page .button:not(.btn):hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

/* Nothing here may restyle `.btn`. Every selector above excludes it, so the
   button system in main.css governs on its own.
 *
 * There used to be a `.woocommerce .btn { background: unset; }` reset with
 * per-variant restores below it. It broke every hover state on WooCommerce
 * pages: `.woocommerce-page .btn` and `.btn--outline:hover` both score (0,2,0),
 * and this file loads after main.css, so the reset won the tie. Hovering a plan
 * card's "Buy" button applied `color:#fff` from main.css but dropped the teal
 * background — white text on white. It only showed on shop/product/cart pages,
 * because those are the only ones carrying the `.woocommerce-page` body class,
 * which is why the home page looked fine. */

/* Stacked form rows in the login / register / tracking forms need vertical
   rhythm; .form-row zeroes the paragraph margin for the checkout grid, which
   supplies its own gap. */
.woocommerce-form .form-row + .form-row,
.track_order .form-row + .form-row { margin-top: 16px; }

/* Product description panel: align with the summary columns above it and drop
   the heading to section-subhead scale — at h2 default it out-shouts the H1. */
.woocommerce-tabs { padding-top: 8px; }
.woocommerce-Tabs-panel > h2 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); }
.woocommerce-Tabs-panel { max-width: 68ch; font-size: 1.0625rem; line-height: 1.75; color: var(--body); }
.woocommerce-Tabs-panel p { margin-bottom: 1em; }

/* Checkout summary heading with its "change plan" escape hatch. */
.summary__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.summary__change {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 700;
  color: var(--teal); white-space: nowrap;
}
.summary__change:hover { color: var(--teal-dark); text-decoration: underline; }
