/*
 * shop.css — milad-theme
 * Minimal restyle of WooCommerce classic cart / checkout / account pages
 * (they render through page.php). Product & shop pages carry their own
 * inline styles in the woocommerce/ template overrides.
 */

:root {
  --shop-ink: #111111;
  --shop-muted: #6d6c66;   /* labels, table headers — dark enough to read on #f0efeb */
  --shop-border: #c2c0b8;  /* input/table borders — clearly visible on the page bg */
  --shop-panel: #f8f8f6;
}

.woocommerce form .form-row .input-text::placeholder,
.woocommerce form .form-row textarea::placeholder {
  color: #8f8e88;
  opacity: 1;
}

.woocommerce-cart .site-main,
.woocommerce-checkout .site-main,
.woocommerce-account .site-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 32px 100px;
}

.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title,
.woocommerce-account .entry-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--shop-ink);
  margin-bottom: 48px;
}

/* ── Back links (checkout → cart, cart → shop) ── */
.milad-back-link {
  display: inline-block;
  margin: 0 0 26px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4c4b46;
  text-decoration: none;
  border-bottom: 1px solid var(--shop-border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.milad-back-link:hover { color: var(--shop-ink); border-color: var(--shop-ink); }

/* ── Notices ── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  list-style: none;
  margin: 0 0 32px;
  padding: 14px 20px;
  border: 1px solid var(--shop-border);
  background: var(--shop-panel);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #333;
}
.woocommerce-error { border-color: #a33; }
.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a { color: var(--shop-ink); }
.woocommerce-message .button,
.woocommerce-info .button { float: right; margin-left: 16px; }

/* ── Buttons ── */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-cart .checkout-button,
.woocommerce-checkout button#place_order,
.woocommerce-page button.button,
.woocommerce-page a.button,
.woocommerce-page input.button {
  display: inline-block;
  padding: 13px 26px;
  background: var(--shop-ink);
  color: #f0efeb;
  border: 1px solid var(--shop-ink);
  border-radius: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.25s;
  line-height: 1.4;
}
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce-page button.button:hover,
.woocommerce-page a.button:hover { opacity: 0.8; }
.woocommerce button.button:disabled,
.woocommerce button.button.disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Tables (cart, order review, orders) ── */
.woocommerce table.shop_table,
.woocommerce-page table.shop_table {
  width: 100%;
  border-collapse: collapse;
  border: none;
  margin-bottom: 40px;
  font-size: 14px;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td,
.woocommerce-page table.shop_table th,
.woocommerce-page table.shop_table td {
  border: none;
  border-bottom: 1px solid var(--shop-border);
  padding: 16px 12px;
  text-align: left;
  vertical-align: middle;
  background: transparent;
}
.woocommerce table.shop_table thead th {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shop-muted);
}
.woocommerce table.shop_table td.product-name a {
  color: var(--shop-ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.woocommerce table.shop_table td.product-name a:hover { opacity: 0.6; }
.woocommerce table.shop_table .product-thumbnail img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}
.woocommerce table.shop_table td.product-remove a.remove {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  color: var(--shop-muted) !important;
  border: 1px solid var(--shop-border);
  border-radius: 50%;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.2s;
}
.woocommerce table.shop_table td.product-remove a.remove:hover {
  color: #fff !important;
  background: #a33;
  border-color: #a33;
}
.woocommerce table.shop_table .variation {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--shop-muted);
  letter-spacing: 0.06em;
}
.woocommerce table.shop_table .variation dt,
.woocommerce table.shop_table .variation dd { display: inline; margin: 0; }

/* ── Quantity ── */
.woocommerce .quantity .qty {
  width: 64px;
  padding: 10px 6px;
  border: 1px solid var(--shop-border);
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-size: 13px;
  color: var(--shop-ink);
}

/* ── Coupon / cart actions ── */
.woocommerce-cart table.cart td.actions { padding-top: 24px; }
.woocommerce-cart table.cart td.actions .coupon { display: inline-flex; gap: 10px; float: left; }
.woocommerce-cart table.cart td.actions .coupon .input-text {
  width: 180px;
  padding: 11px 14px;
  border: 1px solid var(--shop-border);
  border-radius: 0;
  background: transparent;
  font-size: 12px;
}

/* ── Cart totals ── */
.woocommerce .cart_totals,
.woocommerce-page .cart_totals { width: 100%; max-width: 420px; margin-left: auto; float: none; }
.woocommerce .cart_totals h2 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--shop-ink);
}
.woocommerce .cart_totals .checkout-button { width: 100%; text-align: center; margin-top: 8px; }

/* ── Forms (checkout, account, addresses) ── */
.woocommerce form .form-row { margin: 0 0 18px; padding: 0; }
.woocommerce form .form-row label {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4c4b46;
  margin-bottom: 6px;
}
.woocommerce form .form-row label .required { color: #a33; text-decoration: none; }
.woocommerce form .form-row .input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row .input-text {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--shop-border);
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  color: var(--shop-ink);
  box-sizing: border-box;
}
.woocommerce form .form-row .input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  outline: none;
  border-color: var(--shop-ink);
}
.woocommerce form .form-row.woocommerce-invalid .input-text { border-color: #a33; }

/* Select2 (country/state dropdowns) */
.woocommerce .select2-container--default .select2-selection--single {
  border: 1px solid var(--shop-border);
  border-radius: 0;
  height: auto;
  padding: 8px 10px;
  background: transparent;
}
.woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow { top: 8px; }

/* ── Checkout layout ── */
.woocommerce-checkout #customer_details { margin-bottom: 48px; }
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 { float: none; width: 100%; max-width: 640px; }
.woocommerce-checkout #customer_details .col-2 { margin-top: 32px; }

.woocommerce-checkout h3,
.woocommerce-checkout #order_review_heading {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shop-ink);
  margin: 0 0 20px;
}

.woocommerce-checkout #order_review {
  border: 1px solid var(--shop-border);
  background: var(--shop-panel);
  padding: 28px;
}
.woocommerce-checkout #order_review table.shop_table { margin-bottom: 24px; }

/* ── Payment methods ── */
.woocommerce-checkout #payment { background: transparent; border-radius: 0; }
.woocommerce-checkout #payment ul.payment_methods {
  list-style: none;
  margin: 0 0 20px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--shop-border);
}
.woocommerce-checkout #payment ul.payment_methods li { margin-bottom: 12px; font-size: 13px; }
.woocommerce-checkout #payment div.payment_box {
  background: transparent;
  border: 1px solid var(--shop-border);
  padding: 14px 16px;
  margin: 10px 0 0;
  font-size: 12px;
  color: #555;
}
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout button#place_order { width: 100%; padding: 16px; }

/* ── Order received / order details ── */
.woocommerce-order .woocommerce-thankyou-order-received {
  font-size: 15px;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  color: var(--shop-ink);
}
.woocommerce ul.order_details {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  margin: 0 0 40px;
  padding: 20px 0;
  border-top: 1px solid var(--shop-border);
  border-bottom: 1px solid var(--shop-border);
}
.woocommerce ul.order_details li {
  border: none;
  float: none;
  margin: 0;
  padding: 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shop-muted);
}
.woocommerce ul.order_details li strong { display: block; margin-top: 5px; font-size: 14px; color: var(--shop-ink); letter-spacing: 0.02em; text-transform: none; }

/* ── My account ── */
.woocommerce-account .woocommerce-MyAccount-navigation { float: none; width: 100%; margin-bottom: 36px; }
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--shop-border);
}
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shop-muted);
  text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { color: var(--shop-ink); }
.woocommerce-account .woocommerce-MyAccount-content { float: none; width: 100%; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .woocommerce-cart .site-main,
  .woocommerce-checkout .site-main,
  .woocommerce-account .site-main { padding: 32px 18px 70px; }

  .woocommerce-cart .entry-title,
  .woocommerce-checkout .entry-title,
  .woocommerce-account .entry-title { font-size: 1.4rem; margin-bottom: 32px; }

  .woocommerce table.shop_table .product-thumbnail img { width: 56px; height: 56px; }
  .woocommerce-cart table.cart td.actions .coupon { float: none; width: 100%; margin-bottom: 14px; }
  .woocommerce-cart table.cart td.actions .coupon .input-text { flex: 1; width: auto; }
  .woocommerce .cart_totals { max-width: none; }
  .woocommerce-checkout #order_review { padding: 18px; }
}
