/*
Theme Name: Whiteland
Theme URI: https://whiteland.example/
Author: Whiteland — built on Elementor
Author URI: https://whiteland.example/
Description: An Elementor-ready WordPress theme for Whiteland — a UAE/GCC dairy products trading company. Pastoral, quietly confident, and brand-locked. Includes a Product custom post type, B2B quote-request flow, and a brand-system stylesheet aligned to the Whiteland visual identity.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: whiteland
Tags: elementor, custom-post-type, custom-background, custom-logo, custom-menu, featured-images, footer-widgets, theme-options, threaded-comments, translation-ready, rtl-language-support
*/

/* ==========================================================================
   Whiteland — Brand Tokens
   Source of truth for all colors, type, spacing, radii.
   ========================================================================== */
:root {
  /* Colors */
  --wl-blue-deep:    #2B5BA8;
  --wl-blue-mid:     #3A6BC4;
  --wl-blue-light:   #6B99D6;
  --wl-blue-pale:    #C8D9F0;
  --wl-cream:        #F5F0E8;
  --wl-cream-warm:   #EDE4D0;
  --wl-taupe:        #B89F84;
  --wl-taupe-dark:   #8C7355;
  --wl-taupe-deeper: #5C4A30;
  --wl-ink:          #1A1410;
  --wl-white:        #FFFFFF;

  /* Typography */
  --wl-font-display: 'Playfair Display', Georgia, serif;
  --wl-font-body:    'Cormorant Garamond', Georgia, serif;
  --wl-font-sans:    'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --wl-space-xs:  8px;
  --wl-space-sm:  16px;
  --wl-space-md:  32px;
  --wl-space-lg:  64px;
  --wl-space-xl:  120px;

  /* Border radius */
  --wl-radius-sm: 6px;
  --wl-radius-md: 12px;
  --wl-radius-lg: 24px;

  /* Container */
  --wl-container: 1240px;
  --wl-container-narrow: 960px;

  /* Transitions */
  --wl-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --wl-duration: 320ms;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--wl-cream);
  color: var(--wl-ink);
  font-family: var(--wl-font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--wl-blue-deep);
  text-decoration: none;
  transition: color var(--wl-duration) var(--wl-ease);
}

a:hover { color: var(--wl-taupe-dark); }

/* Skip-link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--wl-blue-deep);
  color: var(--wl-white);
  font-family: var(--wl-font-sans);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.skip-link:focus { left: 16px; top: 16px; color: #fff; }

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--wl-font-display);
  color: var(--wl-ink);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 0 0 var(--wl-space-sm);
}

h1 { font-size: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); }
h4 { font-size: 22px; }
h5 { font-size: 18px; font-family: var(--wl-font-sans); letter-spacing: 2px; text-transform: uppercase; }
h6 { font-size: 14px; font-family: var(--wl-font-sans); letter-spacing: 3px; text-transform: uppercase; color: var(--wl-blue-mid); }

em, .wl-italic {
  font-style: italic;
  color: var(--wl-taupe-dark);
}

p { margin: 0 0 1.2em; }

.wl-eyebrow {
  display: inline-block;
  font-family: var(--wl-font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--wl-blue-mid);
  margin-bottom: var(--wl-space-xs);
}

.wl-lead {
  font-family: var(--wl-font-body);
  font-size: 22px;
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  color: #3a3028;
  max-width: 640px;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.wl-container {
  max-width: var(--wl-container);
  margin: 0 auto;
  padding: 0 var(--wl-space-md);
}

.wl-container--narrow {
  max-width: var(--wl-container-narrow);
}

.wl-section {
  padding: var(--wl-space-xl) 0;
}

@media (max-width: 768px) {
  .wl-section { padding: var(--wl-space-lg) 0; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.wl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--wl-radius-sm);
  font-family: var(--wl-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--wl-duration) var(--wl-ease);
}

.wl-btn--primary {
  background: var(--wl-blue-deep);
  color: var(--wl-white);
}
.wl-btn--primary:hover {
  background: var(--wl-ink);
  color: var(--wl-cream);
  transform: translateY(-1px);
}

.wl-btn--ghost {
  background: transparent;
  color: var(--wl-blue-deep);
  border: 1px solid var(--wl-blue-deep);
}
.wl-btn--ghost:hover {
  background: var(--wl-blue-deep);
  color: var(--wl-white);
}

.wl-btn--cream {
  background: var(--wl-cream);
  color: var(--wl-taupe-deeper);
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.wl-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(184, 159, 132, 0.18);
}

.wl-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.wl-header__brand {
  font-family: var(--wl-font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  color: var(--wl-taupe-deeper);
  letter-spacing: 0.3px;
  text-decoration: none;
}

.wl-header__brand:hover { color: var(--wl-blue-deep); }

.wl-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.wl-nav__menu {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.wl-nav__menu a {
  font-family: var(--wl-font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--wl-ink);
  position: relative;
  padding: 4px 0;
}

.wl-nav__menu a:hover { color: var(--wl-blue-deep); }

.wl-nav__menu .current-menu-item > a::after,
.wl-nav__menu a:hover::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--wl-blue-deep);
}

.wl-nav__cta {
  margin-left: 8px;
}

.wl-nav__toggle {
  display: none;
  background: none;
  border: 0;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 0;
}

.wl-nav__toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--wl-ink);
  margin: 5px auto;
  transition: all var(--wl-duration) var(--wl-ease);
}

@media (max-width: 960px) {
  .wl-nav__menu, .wl-nav__cta { display: none; }
  .wl-nav__toggle { display: block; }
  .wl-nav.is-open .wl-nav__menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wl-cream);
    padding: var(--wl-space-md);
    gap: 18px;
    border-bottom: 1px solid var(--wl-cream-warm);
  }
  .wl-nav.is-open .wl-nav__cta { display: inline-flex; margin: var(--wl-space-sm) var(--wl-space-md); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.wl-hero {
  position: relative;
  background: var(--wl-blue-deep);
  color: var(--wl-white);
  padding: 140px 0 120px;
  overflow: hidden;
}

.wl-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 30%, rgba(106,153,214,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(43,91,168,0.4) 0%, transparent 60%);
  pointer-events: none;
}

.wl-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.wl-hero__eyebrow {
  font-family: var(--wl-font-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--wl-blue-pale);
  margin-bottom: 20px;
}

.wl-hero__title {
  font-family: var(--wl-font-display);
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 400;
  color: var(--wl-white);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.wl-hero__title em {
  font-style: italic;
  color: var(--wl-blue-pale);
}

.wl-hero__lead {
  font-family: var(--wl-font-body);
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: rgba(200, 217, 240, 0.85);
  max-width: 580px;
  margin-bottom: 36px;
}

.wl-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.wl-hero .wl-btn--primary {
  background: var(--wl-cream);
  color: var(--wl-taupe-deeper);
}
.wl-hero .wl-btn--primary:hover {
  background: var(--wl-white);
  color: var(--wl-ink);
}

.wl-hero .wl-btn--ghost {
  color: var(--wl-blue-pale);
  border-color: rgba(200, 217, 240, 0.4);
}
.wl-hero .wl-btn--ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--wl-white);
  border-color: var(--wl-white);
}

/* ==========================================================================
   Page header (interior pages)
   ========================================================================== */
.wl-page-header {
  background: var(--wl-cream-warm);
  padding: 100px 0 80px;
  border-bottom: 1px solid rgba(184, 159, 132, 0.25);
}

.wl-page-header__title {
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 12px;
}

.wl-page-header__breadcrumb {
  font-family: var(--wl-font-sans);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--wl-taupe-dark);
}

.wl-page-header__breadcrumb a { color: var(--wl-taupe-dark); }
.wl-page-header__breadcrumb a:hover { color: var(--wl-blue-deep); }

/* ==========================================================================
   Cards (Products, blog, generic)
   ========================================================================== */
.wl-grid {
  display: grid;
  gap: var(--wl-space-md);
}

.wl-grid--3 { grid-template-columns: repeat(3, 1fr); }
.wl-grid--2 { grid-template-columns: repeat(2, 1fr); }
.wl-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .wl-grid--3, .wl-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .wl-grid--2, .wl-grid--3, .wl-grid--4 { grid-template-columns: 1fr; }
}

.wl-card {
  background: var(--wl-white);
  border: 1px solid rgba(184, 159, 132, 0.2);
  border-radius: var(--wl-radius-md);
  overflow: hidden;
  transition: transform var(--wl-duration) var(--wl-ease),
              box-shadow var(--wl-duration) var(--wl-ease);
  display: flex;
  flex-direction: column;
}

.wl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(43, 91, 168, 0.12);
}

.wl-card__media {
  aspect-ratio: 4 / 3;
  background: var(--wl-cream-warm);
  overflow: hidden;
}

.wl-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--wl-ease);
}

.wl-card:hover .wl-card__media img {
  transform: scale(1.04);
}

.wl-card__body {
  padding: 24px 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wl-card__category {
  font-family: var(--wl-font-sans);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--wl-blue-mid);
  margin-bottom: 8px;
}

.wl-card__title {
  font-family: var(--wl-font-display);
  font-size: 24px;
  margin: 0 0 10px;
  color: var(--wl-ink);
  line-height: 1.2;
}

.wl-card__title a { color: inherit; }
.wl-card__title a:hover { color: var(--wl-blue-deep); }

.wl-card__excerpt {
  font-family: var(--wl-font-body);
  font-size: 16px;
  color: #5a4a38;
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.wl-card__meta {
  display: flex;
  gap: 14px;
  font-family: var(--wl-font-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--wl-taupe-dark);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--wl-cream-warm);
}

.wl-card__link {
  font-family: var(--wl-font-sans);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--wl-blue-deep);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--wl-cream-warm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wl-card__link::after {
  content: '→';
  transition: transform var(--wl-duration) var(--wl-ease);
}
.wl-card:hover .wl-card__link::after { transform: translateX(4px); }

/* ==========================================================================
   Single Product
   ========================================================================== */
.wl-product {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--wl-space-lg);
  align-items: start;
}

@media (max-width: 900px) {
  .wl-product { grid-template-columns: 1fr; }
}

.wl-product__gallery {
  background: var(--wl-cream-warm);
  border-radius: var(--wl-radius-md);
  aspect-ratio: 1;
  overflow: hidden;
}

.wl-product__gallery img { width: 100%; height: 100%; object-fit: cover; }

.wl-product__category {
  font-family: var(--wl-font-sans);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--wl-blue-mid);
  margin-bottom: 12px;
}

.wl-product__title {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 16px;
}

.wl-product__lead {
  font-family: var(--wl-font-body);
  font-style: italic;
  font-weight: 300;
  font-size: 20px;
  color: #5a4a38;
  margin-bottom: 32px;
  line-height: 1.6;
}

.wl-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-family: var(--wl-font-sans);
  font-size: 14px;
}

.wl-spec-table th,
.wl-spec-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--wl-cream-warm);
  text-align: left;
}

.wl-spec-table th {
  width: 40%;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wl-taupe-dark);
}

.wl-spec-table td {
  color: var(--wl-ink);
  font-weight: 400;
}

/* ==========================================================================
   Quote Form
   ========================================================================== */
.wl-quote-form {
  background: var(--wl-white);
  border-radius: var(--wl-radius-md);
  padding: 40px;
  border: 1px solid rgba(184, 159, 132, 0.2);
}

.wl-quote-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .wl-quote-form__row { grid-template-columns: 1fr; }
}

.wl-field { display: flex; flex-direction: column; gap: 8px; }

.wl-field label {
  font-family: var(--wl-font-sans);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wl-taupe-dark);
  font-weight: 500;
}

.wl-field input,
.wl-field select,
.wl-field textarea {
  padding: 12px 14px;
  border: 1px solid rgba(184, 159, 132, 0.4);
  border-radius: var(--wl-radius-sm);
  background: var(--wl-cream);
  font-family: var(--wl-font-body);
  font-size: 17px;
  color: var(--wl-ink);
  transition: border-color var(--wl-duration) var(--wl-ease),
              background var(--wl-duration) var(--wl-ease);
}

.wl-field input:focus,
.wl-field select:focus,
.wl-field textarea:focus {
  outline: none;
  border-color: var(--wl-blue-deep);
  background: var(--wl-white);
}

.wl-field textarea { min-height: 120px; resize: vertical; }

.wl-form-message {
  padding: 14px 18px;
  border-radius: var(--wl-radius-sm);
  font-family: var(--wl-font-sans);
  font-size: 13px;
  margin-bottom: 20px;
}

.wl-form-message--success {
  background: #eef4f0;
  color: #3a7a4a;
  border: 1px solid #b8d4bc;
}

.wl-form-message--error {
  background: #f9eeee;
  color: #a03a3a;
  border: 1px solid #d4b8b8;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.wl-footer {
  background: var(--wl-blue-deep);
  color: var(--wl-blue-pale);
  padding: var(--wl-space-lg) 0 var(--wl-space-md);
}

.wl-footer__cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--wl-space-md);
  padding-bottom: var(--wl-space-md);
  border-bottom: 1px solid rgba(200, 217, 240, 0.15);
}

@media (max-width: 900px) {
  .wl-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .wl-footer__cols { grid-template-columns: 1fr; }
}

.wl-footer__brand {
  font-family: var(--wl-font-display);
  font-style: italic;
  font-size: 28px;
  font-weight: 400;
  color: var(--wl-white);
  margin-bottom: 12px;
  display: block;
}

.wl-footer__tag {
  font-family: var(--wl-font-body);
  font-style: italic;
  font-size: 17px;
  color: rgba(200, 217, 240, 0.8);
  max-width: 320px;
  line-height: 1.6;
}

.wl-footer__heading {
  font-family: var(--wl-font-sans);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--wl-blue-pale);
  margin-bottom: 18px;
  font-weight: 500;
}

.wl-footer ul { list-style: none; padding: 0; margin: 0; }
.wl-footer li { margin-bottom: 10px; }

.wl-footer a {
  color: rgba(200, 217, 240, 0.75);
  font-family: var(--wl-font-body);
  font-size: 16px;
}

.wl-footer a:hover { color: var(--wl-white); }

.wl-footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--wl-space-md);
  font-family: var(--wl-font-sans);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200, 217, 240, 0.5);
}

@media (max-width: 600px) {
  .wl-footer__base { flex-direction: column; gap: 12px; text-align: center; }
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.wl-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--wl-space-lg);
  font-family: var(--wl-font-sans);
  font-size: 13px;
}

.wl-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--wl-radius-sm);
  border: 1px solid rgba(184, 159, 132, 0.3);
  color: var(--wl-ink);
  letter-spacing: 1px;
}

.wl-pagination .page-numbers.current,
.wl-pagination .page-numbers:hover {
  background: var(--wl-blue-deep);
  color: var(--wl-white);
  border-color: var(--wl-blue-deep);
}

/* ==========================================================================
   Decorative section variants
   ========================================================================== */
.wl-section--cream { background: var(--wl-cream); }
.wl-section--warm  { background: var(--wl-cream-warm); }
.wl-section--blue  {
  background: var(--wl-blue-deep);
  color: var(--wl-blue-pale);
}
.wl-section--blue h1, .wl-section--blue h2,
.wl-section--blue h3, .wl-section--blue h4 {
  color: var(--wl-white);
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.wl-text-center { text-align: center; }
.wl-mt-md { margin-top: var(--wl-space-md); }
.wl-mt-lg { margin-top: var(--wl-space-lg); }

.wl-divider {
  width: 60px;
  height: 1px;
  background: var(--wl-taupe);
  margin: var(--wl-space-md) auto;
  border: 0;
}

/* ==========================================================================
   WordPress core classes (alignment, captions, etc.)
   ========================================================================== */
.alignleft { float: left; margin: 0 var(--wl-space-md) var(--wl-space-sm) 0; }
.alignright { float: right; margin: 0 0 var(--wl-space-sm) var(--wl-space-md); }
.aligncenter { display: block; margin: 0 auto var(--wl-space-sm); }
.alignwide { max-width: var(--wl-container); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

.wp-caption-text {
  font-family: var(--wl-font-sans);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--wl-taupe-dark);
  text-align: center;
  padding-top: 8px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
