/* ===== Villa Dark Theme - WooCommerce Pages v5.1 ===== */
/* Inspired by Shopify checkout, adapted for dark theme */

/* ===== Base ===== */
.woocommerce-template, .page-template {
  background-color: #0a0a0a;
  color: #e8e4de;
  min-height: 100vh;
  padding: 90px 0 60px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.woocommerce-container, .page-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Typography ===== */
.woocommerce-template h1,
.woocommerce-template h2,
.woocommerce-template h3 {
  color: #e8e4de;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.woocommerce-template h2 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1a1a1a;
}

.woocommerce-template h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a8580;
  margin-bottom: 18px;
  padding-bottom: 0;
  border-bottom: none;
}

/* ===== Checkout form layout (single column like Shopify) ===== */
.woocommerce-checkout .checkout {
  display: block;
}

.woocommerce-checkout .checkout > .col2-set,
.woocommerce-checkout .checkout > .col-1,
.woocommerce-checkout .checkout > .col-2 {
  width: 100% !important;
  float: none !important;
  max-width: 100% !important;
}

/* Hide order review sidebar, show it inline below form */
.woocommerce-checkout .checkout-review-order-wrapper,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
  width: 100% !important;
  float: none !important;
}

/* ===== Section spacing ===== */
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-checkout .woocommerce-additional-fields,
.woocommerce-checkout .woocommerce-checkout-review-order {
  margin-bottom: 36px;
}

/* ===== Form fields - Shopify style ===== */
.woocommerce-template .form-row {
  margin-bottom: 18px;
  padding: 0 !important;
}

.woocommerce-template .form-row label {
  color: #e8e4de;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.woocommerce-template .form-row input.input-text,
.woocommerce-template .form-row textarea,
.woocommerce-template .form-row select {
  background: #141414;
  color: #e8e4de;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 14px 16px;
  width: 100%;
  font-size: 15px;
  height: auto;
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}

.woocommerce-template .form-row input.input-text:focus,
.woocommerce-template .form-row textarea:focus,
.woocommerce-template .form-row select:focus {
  outline: none;
  border-color: #c9a96e;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
  background: #1a1a1a;
}

.woocommerce-template .form-row input::placeholder,
.woocommerce-template .form-row textarea::placeholder {
  color: #5a5550;
}

/* Select dropdowns */
.woocommerce-template select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a8580' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px !important;
}

/* Form row widths */
.woocommerce-template .form-row-first,
.woocommerce-template .form-row-last {
  width: 48% !important;
  float: none !important;
  display: inline-block;
  vertical-align: top;
}

.woocommerce-template .form-row-first { margin-right: 4% !important; }

@media (max-width: 600px) {
  .woocommerce-template .form-row-first,
  .woocommerce-template .form-row-last {
    width: 100% !important;
    margin-right: 0 !important;
  }
}

/* ===== Payment methods - Shopify card style ===== */
.woocommerce-checkout .wc_payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
}

.woocommerce-checkout .wc_payment_methods .wc_payment_method {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 0 !important;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}

.woocommerce-checkout .wc_payment_methods .wc_payment_method:hover {
  border-color: #3a3a3a;
}

.woocommerce-checkout .wc_payment_methods .wc_payment_method.woocommerce-selected-payment-method {
  border-color: #c9a96e;
  background: #1a1710;
}

.woocommerce-checkout .wc_payment_methods .wc_payment_method > label {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 16px 18px !important;
  cursor: pointer;
  color: #e8e4de;
  font-size: 15px;
  font-weight: 500;
  margin: 0 !important;
}

/* Radio buttons */
.woocommerce-checkout .wc_payment_methods input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #3a3a3a;
  border-radius: 50%;
  margin: 0;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.woocommerce-checkout .wc_payment_methods input[type="radio"]:checked {
  border-color: #c9a96e;
}

.woocommerce-checkout .wc_payment_methods input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #c9a96e;
  border-radius: 50%;
}

/* Payment box content */
.woocommerce-checkout .wc_payment_methods .payment_box {
  background: #0f0f0f;
  border-top: 1px solid #1a1a1a;
  padding: 16px 18px;
  margin: 0;
  font-size: 14px;
  color: #8a8580;
  line-height: 1.6;
}

/* ===== Order review - inline section ===== */
.woocommerce-checkout .woocommerce-checkout-review-order {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 24px;
}

.woocommerce-checkout .woocommerce-checkout-review-order h3 {
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.woocommerce-checkout .woocommerce-checkout-review-order table.shop_table {
  background: transparent;
  border: none;
  border-collapse: collapse;
  width: 100%;
}

.woocommerce-checkout .woocommerce-checkout-review-order th {
  color: #8a8580;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
  text-align: left;
}

.woocommerce-checkout .woocommerce-checkout-review-order td {
  color: #e8e4de;
  font-size: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
}

.woocommerce-checkout .order-total td strong {
  color: #c9a96e;
  font-size: 18px;
}

/* ===== Place order button - Shopify style ===== */
.woocommerce-checkout #place_order,
.woocommerce-checkout button.button.alt,
.woocommerce-checkout input.button.alt {
  background: #c9a96e !important;
  color: #0a0a0a !important;
  border: none !important;
  border-radius: 12px !important;
  width: 100%;
  padding: 16px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 20px;
  letter-spacing: 0.02em;
  display: block;
  box-sizing: border-box;
  height: auto !important;
  line-height: 1.4 !important;
}

.woocommerce-checkout #place_order:hover,
.woocommerce-checkout button.button.alt:hover,
.woocommerce-checkout input.button.alt:hover {
  background: #dfc193 !important;
  color: #0a0a0a !important;
}

.woocommerce-checkout #place_order:active {
  transform: scale(0.99);
}

/* ===== General buttons ===== */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .button {
  background: #c9a96e;
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
  height: auto;
  line-height: 1.4;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button:hover {
  background: #dfc193;
  color: #0a0a0a;
}

.woocommerce .checkout-button {
  width: 100%;
  text-align: center;
  padding: 16px !important;
  font-size: 16px !important;
  border-radius: 12px !important;
}

/* ===== Terms checkbox ===== */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #1a1a1a;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper label {
  color: #8a8580;
  font-size: 13px;
  line-height: 1.6;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a {
  color: #c9a96e;
}

/* checkbox style */
.woocommerce-checkout input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #c9a96e;
  margin-right: 8px;
  vertical-align: middle;
}

/* ===== Coupon ===== */
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .woocommerce-form-coupon {
  margin-bottom: 24px;
}

.woocommerce-checkout .woocommerce-info {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: #8a8580;
  padding: 14px 16px;
  font-size: 14px;
}

.woocommerce-checkout .woocommerce-info a {
  color: #c9a96e;
}

/* ===== Cart page styles ===== */
.woocommerce-cart table.shop_table {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.woocommerce-cart table.shop_table th {
  background: #1a1a1a;
  color: #8a8580;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px;
  border-bottom: 1px solid #2a2a2a;
}

.woocommerce-cart table.shop_table td {
  padding: 16px;
  color: #e8e4de;
  border-bottom: 1px solid #1a1a1a;
}

.woocommerce-cart table.shop_table tr:last-child td {
  border-bottom: none;
}

.woocommerce-cart .cart_totals {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 24px;
}

.woocommerce-cart .cart_totals h2 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2a2a;
}

/* ===== Quantity input ===== */
.woocommerce .quantity input.qty {
  background: #1a1a1a;
  color: #e8e4de;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 10px;
  width: 60px;
  text-align: center;
}

/* ===== Notices ===== */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
  background: #141414;
  border-left: 3px solid #c9a96e;
  color: #e8e4de;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
}

.woocommerce .woocommerce-error {
  border-left-color: #e74c3c;
}

/* ===== Breadcrumb ===== */
.woocommerce .woocommerce-breadcrumb {
  color: #5a5550;
  margin-bottom: 24px;
  font-size: 13px;
}

.woocommerce .woocommerce-breadcrumb a {
  color: #8a8580;
}

.woocommerce .woocommerce-breadcrumb a:hover {
  color: #c9a96e;
}

/* ===== Product grid (shop page) ===== */
.woocommerce ul.products li.product {
  background: #141414;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.3s, transform 0.3s;
}

.woocommerce ul.products li.product:hover {
  border-color: #2a2a2a;
  transform: translateY(-2px);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: #e8e4de;
  font-size: 16px;
  font-weight: 500;
}

.woocommerce ul.products li.product .price {
  color: #c9a96e;
  font-size: 16px;
  font-weight: 600;
}

/* ===== Links ===== */
.woocommerce-template a {
  color: #c9a96e;
  text-decoration: none;
}

.woocommerce-template a:hover {
  color: #dfc193;
}

/* ===== Login form on checkout ===== */
.woocommerce-checkout .woocommerce-form-login,
.woocommerce-checkout .woocommerce-form-coupon {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

/* ===== Express payment buttons (Apple Pay / Google Pay) ===== */
#wcpay-payment-request-button,
.wcpay-payment-request-wrapper {
  margin-bottom: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .woocommerce-template, .page-template {
    padding: 70px 0 40px;
  }
  .woocommerce-container, .page-container {
    padding: 0 16px;
  }
  .woocommerce-template .form-row-first,
  .woocommerce-template .form-row-last {
    width: 100% !important;
    margin-right: 0 !important;
  }
}