/*
Theme Name: EZ-Dock Inc.
Theme URI: https://ezdockcarolina.com
Author: Anthony Twyman
Author URI: https://anthonytwyman.com
Description: Premium, responsive waterfront WordPress theme for EZ-DOCK INC. Built for Lake Wylie, SC and the Carolinas' Lake Regions. Full-width photographic hero, editable business content, product catalog integration, accessible My Project drawer, and SEO-ready business markup.
Version: 2.3.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ezdock-inc
Requires at least: 6.4
Tested up to: 7.1.3
Requires PHP: 8.0
Tags: block-theme, full-width-template, e-commerce, business, waterfront, docks, accessibility-ready
*/

/* Base resets and variables are handled via theme.json, this file provides critical enhancements */

/* Prevent horizontal overflow - root cause fix */
html, body {
  overflow-x: clip;
  max-width: 100%;
}
* {
  box-sizing: border-box;
}
img {
  max-width: 100%;
  height: auto;
}
.wp-site-blocks {
  overflow-x: clip;
}

/* Focus-visible - WCAG 2.2 AA */
:root {
  --ezdock-focus: 0 0 0 3px #14A9CC, 0 0 0 6px #0F385F;
}

*:focus {
  outline: none;
}
*:focus-visible {
  outline: none;
  box-shadow: var(--ezdock-focus);
  border-radius: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--ezdock-focus);
  position: relative;
  z-index: 2;
}

/* Skip link */
.skip-link:focus {
  box-shadow: var(--ezdock-focus);
}

/* Product cards - CSS Grid equal height, no JS needed */
.ezdock-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  align-items: stretch;
}
.ezdock-product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ezdock-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15,56,95,.12);
}
.ezdock-product-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #F5F3EB;
  position: relative;
}
.ezdock-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ezdock-product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}
.ezdock-product-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0F385F;
  margin: 0 0 .5rem;
  line-height: 1.3;
}
.ezdock-product-card__meta {
  font-size: .875rem;
  color: #6b7280;
  margin-bottom: .75rem;
}
.ezdock-product-card__desc {
  flex: 1;
  font-size: .95rem;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 1.25rem;
}
.ezdock-product-card__actions {
  margin-top: auto;
  display: flex;
  gap: .75rem;
}

/* Buttons */
.ezdock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s ease;
}
.ezdock-btn--primary {
  background: #0F385F;
  color: #fff;
  border-color: #0F385F;
}
.ezdock-btn--primary:hover {
  background: #0c2d4c;
  color: #fff;
}
.ezdock-btn--secondary {
  background: #fff;
  color: #0F385F;
  border-color: #0F385F;
}
.ezdock-btn--accent {
  background: #14A9CC;
  color: #fff;
  border-color: #14A9CC;
}

/* Full-width hero - genuine photo */
.ezdock-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0F385F;
}
.ezdock-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.ezdock-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,56,95,.85) 0%, rgba(15,56,95,.45) 55%, rgba(15,56,95,.15) 100%);
}
.ezdock-hero__content {
  position: relative;
  z-index: 2;
  width: min(1280px, 90vw);
  margin: 0 auto;
  padding: 6rem 0;
  color: #fff;
}

/* Footer - navy bg with pure white logo, no filter */
.site-footer {
  background: #0F385F;
  color: #fff;
}
.site-footer a {
  color: #fff;
}
.site-footer a:hover {
  color: #14A9CC;
}
.footer-logo-img {
  display: block;
  max-width: 280px;
  height: auto;
}
.footer-logo-img--white {
  /* No filter! Pure white asset */
  filter: none !important;
}

/* Cart drawer - accessible modal */
.ezdock-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.ezdock-drawer.is-open {
  display: block;
}
.ezdock-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
.ezdock-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ezdock-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #0F385F;
  color: #fff;
}
.ezdock-drawer__close {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ezdock-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Forms */
.ezdock-form-group {
  margin-bottom: 1.25rem;
}
.ezdock-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: .5rem;
  color: #0F385F;
}
.ezdock-form-group input,
.ezdock-form-group textarea,
.ezdock-form-group select {
  width: 100%;
  padding: .75rem 1rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color .2s;
}
.ezdock-form-group input:focus,
.ezdock-form-group textarea:focus,
.ezdock-form-group select:focus {
  border-color: #14A9CC;
  outline: none;
  box-shadow: 0 0 0 3px rgba(20,169,204,.15);
}
.ezdock-form-group input[aria-invalid="true"],
.ezdock-form-group textarea[aria-invalid="true"] {
  border-color: #dc2626;
}

/* Honeypot hidden */
.ezdock-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Utilities */
.ezdock-live-region {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
