/*
 Theme Name:   Clark & Partners Child
 Theme URI:    https://clarkshop.co.uk
 Description:  Child theme for Clark & Partners
 Author:       Fortay Media
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  clark-child
*/

* {
  font-family: 'Questrial', sans-serif !important;
}

/* Force full width - override Hello Elementor's responsive max-width on .site-main */
body:not([class*=elementor-page-]) .site-main,
.site-main,
#primary,
#content,
#page,
.page-content,
.entry-content,
.elementor-section-wrap,
.elementor-inner,
body.page .entry-content,
body.single-product .site-main,
body.tax-product_cat .site-main,
body.post-type-archive-product .site-main {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* WooCommerce default product card image background - white */
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
  background: #ffffff !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product {
  background: #ffffff !important;
}

/* Override at all breakpoints */
@media (min-width: 576px) {
  body:not([class*=elementor-page-]) .site-main {
    max-width: 100% !important;
  }
}
@media (min-width: 768px) {
  body:not([class*=elementor-page-]) .site-main {
    max-width: 100% !important;
  }
}
@media (min-width: 992px) {
  body:not([class*=elementor-page-]) .site-main {
    max-width: 100% !important;
  }
}
@media (min-width: 1200px) {
  body:not([class*=elementor-page-]) .site-main {
    max-width: 100% !important;
  }
}

/* Hide page title on My Account page */
.woocommerce-account .entry-title,
.woocommerce-account .page-title,
.woocommerce-account h1.entry-title { display: none !important; }

/* ── Nav dropdown ────────────────────────────────────────────────────────── */
.clark-nav-item { position: relative; }
.clark-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 999;
}
.clark-nav-item:hover .clark-dropdown,
.clark-nav-item:focus-within .clark-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.clark-dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #333 !important;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.clark-dropdown a:hover {
  background: #fff1f4;
  color: #EE2359 !important;
}

/* Footer legal links row */
.clark-footer-legal-links { margin-top: 6px; }
.clark-footer-legal-links a { color: rgba(255,255,255,.4); text-decoration: none; font-size: 12px; }
.clark-footer-legal-links a:hover { color: rgba(255,255,255,.7); }

/* ── My Account — kill WooCommerce default sidebar column layout ─────────── */
.woocommerce-account .woocommerce,
.woocommerce-account .woocommerce-MyAccount-navigation + .woocommerce-MyAccount-content {
  display: block !important;
  flex: none !important;
  width: auto !important;
}
/* The nav is inside .ma-hero — hide any duplicate nav WooCommerce might render */
.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation {
  display: none !important;
}
/* Content should be full width — no left offset from a missing sidebar */
.woocommerce-account .woocommerce-MyAccount-content {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide logout from tab nav — Sign out is already in the hero top-right */
.ma-tab-nav .woocommerce-MyAccount-navigation-link--customer-logout {
  display: none !important;
}

/* ── Tablet dropdown: support touch via :focus-within (already in CSS) ──────
   At 769-1024px the desktop nav is visible; ensure dropdowns work on touch   */
@media (max-width: 1024px) and (min-width: 769px) {
  .clark-nav-item > a { padding: 13px 12px; font-size: 12px; }
}

/* ── Touch target minimums (44px) ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .clark-footer-legal-links a { min-height: 44px; display: inline-flex; align-items: center; padding: 4px 0; }
  .clark-drawer-sub-item a { min-height: 44px; display: flex; align-items: center; }
  .clark-drawer-item > a { min-height: 48px; display: flex; align-items: center; }
}

/* ── WooCommerce Cart ───────────────────────────────────────────────────────── */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 80px;
  box-sizing: border-box;
}

/* Cart table scrollable on mobile */
.woocommerce-cart-form { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.woocommerce table.shop_table { min-width: 520px; border-collapse: collapse; width: 100%; }
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { padding: 14px 16px; border-bottom: 1px solid #e8e8e8; font-size: 14px; vertical-align: middle; }
.woocommerce table.shop_table th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #999; background: #fafafa; }
.woocommerce .cart-collaterals { margin-top: 32px; }
.woocommerce .cart_totals { max-width: 400px; margin-left: auto; background: #f9f9f9; padding: 28px; border: 1px solid #e8e8e8; border-radius: 8px; }
.woocommerce .cart_totals h2 { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.woocommerce .cart_totals table { min-width: 0; }

/* Checkout two-column → single on mobile */
.woocommerce-checkout .woocommerce { padding: 40px 40px 80px; }
.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review { max-width: 100%; }

/* Checkout input fields */
.woocommerce-checkout .woocommerce-input-wrapper input,
.woocommerce-checkout .woocommerce-input-wrapper select,
.woocommerce-checkout .woocommerce-input-wrapper textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid #e0e0e0; border-radius: 6px;
  font-size: 15px; font-family: inherit; box-sizing: border-box; outline: none;
  transition: border-color .2s;
}
.woocommerce-checkout .woocommerce-input-wrapper input:focus,
.woocommerce-checkout .woocommerce-input-wrapper select:focus { border-color: #EE2359; }

/* Place order button */
#place_order {
  background: #EE2359 !important; color: #fff !important; border: none !important;
  padding: 16px 32px !important; font-size: 16px !important; font-weight: 600 !important;
  width: 100% !important; border-radius: 6px !important; cursor: pointer !important;
  transition: background .2s !important; letter-spacing: .02em !important;
}
#place_order:hover { background: #c91845 !important; }

@media (max-width: 768px) {
  .woocommerce-cart .woocommerce,
  .woocommerce-checkout .woocommerce { padding: 24px 16px 60px; }

  /* Cart table scrollable */
  .woocommerce-cart-form { border-radius: 8px; border: 1px solid #e8e8e8; }

  /* Cart totals full width on mobile */
  .woocommerce .cart_totals { max-width: 100%; margin-left: 0; }

  /* Checkout columns stack */
  .woocommerce-checkout .col2-set { width: 100% !important; float: none !important; }
  .woocommerce-checkout .col2-set .col-1,
  .woocommerce-checkout .col2-set .col-2 { width: 100% !important; float: none !important; }

  /* Order review on mobile */
  .woocommerce-checkout #order_review,
  .woocommerce-checkout #order_review_heading { padding: 0 !important; float: none !important; width: 100% !important; }

  /* Coupon + cart buttons stack */
  .woocommerce .coupon { display: flex; flex-direction: column; gap: 8px; }
  .woocommerce .coupon input { width: 100% !important; }
  .woocommerce .actions { display: flex; flex-direction: column; gap: 10px; }
  .woocommerce .actions .button { width: 100% !important; text-align: center !important; }

  /* Shop page grid — WooCommerce default archive */
  body.post-type-archive-product .products,
  body.tax-product_cat .products {
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 16px !important;
    padding: 20px !important;
  }
}
