/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme for PARMIS Furniture (مبلمان پارمیس)
 Author:       XTemos & PARMIS Brand Identity Design
 Author URI:   https://parmis-home.ir
 Template:     woodmart
 Version:      1.1.2
 Text Domain:  woodmart
*/

/* ==========================================================================
   PARMIS FURNITURE (مبلمان پارمیس) — IRANIAN LUXURY COLOR SYSTEM & DESIGN TOKENS
   Historical Palette: Imperial Lajvard & Warm Ivory with Tazhib Saffron Gold
   WCAG 2.2 AA / AAA Compliant
   ========================================================================== */

:root {
  /* Primitive Brand Colors */
  --parmis-lajvard-deep: #12263F;       /* Imperial Lapis Lazuli Deep Palatial Night */
  --parmis-lajvard-primary: #16325C;    /* Safavid Masjed-e Shah Haft-Rangi Royal Lapis */
  --parmis-lajvard-light: #20457A;      /* Bright Glazed Cobalt Accent */
  
  --parmis-zafarani-gold: #C5A059;      /* Khorasan Saffron Gold & Tazhib Leaf */
  --parmis-zafarani-hover: #AF8B45;     /* Deepened Gold for Hover States */
  --parmis-zafarani-light: #F7EEDB;     /* Saffron Silk Wash / Light Accent Tint */
  
  --parmis-plaster-alabaster: #FAF8F5;  /* Persian Architectural Plaster (Gach-bori) */
  --parmis-surface-ivory: #F3EFEA;      /* Warm Ivory Paper (Kaghaz-e Dowlat-Abadi) */
  --parmis-border-sand: #E5DFD5;        /* Muted Isfahan Clay Sand Divider */
  
  --parmis-charcoal-walnut: #1C212B;    /* Carved Dark Kashan Walnut (Monabat Wood) */
  --parmis-slate-muted: #5A6270;        /* Mineral Gray / Secondary Metadata */
  --parmis-pure-white: #FFFFFF;

  /* Theme Core Variables (Overrides Woodmart Defaults) */
  --wd-primary-color: #16325C;
  --wd-alternative-color: #C5A059;
  --color-primary: #16325C;
  --color-secondary: #C5A059;

  /* Accented Action Buttons (Add to Cart, Checkout, Submit) */
  --btn-accented-bgcolor: #16325C;
  --btn-accented-color: #FFFFFF;
  --btn-accented-bgcolor-hover: #12263F;
  --btn-accented-color-hover: #FFFFFF;
  --btn-accented-brd-radius: 8px;

  /* Default Neutral Buttons */
  --btn-default-bgcolor: #F3EFEA;
  --btn-default-color: #1C212B;
  --btn-default-bgcolor-hover: #E8E2D8;
  --btn-default-color-hover: #12263F;
  --btn-default-brd-radius: 8px;

  /* Typography & Links */
  --wd-title-color: #1C212B;
  --wd-text-color: #2D3139;
  --wd-link-color: #16325C;
  --wd-link-color-hover: #C5A059;

  /* Badges & Special Highlights */
  --notices-success-bg: #2E7D32;
  --notices-warning-bg: #C5A059;
}

/* Base Body Styling */
body {
  background-color: var(--parmis-plaster-alabaster);
  color: var(--wd-text-color);
}

/* Site Header Styling */
.whb-general-header {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--parmis-border-sand);
}

.whb-color-dark .wd-tools-element > a:hover {
  color: var(--parmis-lajvard-primary);
}

.wd-nav > li:hover > a,
.wd-nav > li.current-menu-item > a {
  color: var(--parmis-lajvard-primary) !important;
}

/* ==========================================================================
   PRODUCT CARDS & HOVER REFINEMENT — ZERO POP-OUT, UNIFIED CARD BORDER
   ========================================================================== */

/* Outer grid containers & cells: clean, transparent, no duplicate phantom frames */
.wd-products-with-bg,
.products.wd-products,
.product-grid-item,
.wd-product {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* The actual Card Box: .wd-product-wrapper */
.wd-product .wd-product-wrapper,
.product-grid-item .wd-product-wrapper {
  background-color: #FFFFFF !important;
  border: 1.5px solid var(--parmis-border-sand) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  position: relative !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  /* Prevent wrapper from lifting out of the grid row */
  transform: none !important;
}

/* Hover state: Card border transitions to Gold with luxury shadow, staying flush in row */
.wd-product:hover .wd-product-wrapper,
.product-grid-item:hover .wd-product-wrapper,
.wd-product.wd-hover-buttons-on-hover .wd-product-wrapper:hover,
.wd-product.wd-hover-buttons-on-hover:hover .wd-product-wrapper {
  border-color: var(--parmis-zafarani-gold) !important;
  box-shadow: 0 10px 28px rgba(22, 50, 92, 0.12) !important;
  transform: none !important;
  z-index: 5 !important;
}

/* Ensure the top of the image inside the thumbnail has rounded corners matching the card */
.wd-product .wd-product-thumb {
  border-top-left-radius: 11px !important;
  border-top-right-radius: 11px !important;
  overflow: hidden !important;
}

.wd-product .wd-product-thumb img {
  border-top-left-radius: 11px !important;
  border-top-right-radius: 11px !important;
}

/* Price Display */
.price, .amount {
  color: var(--parmis-lajvard-primary) !important;
  font-weight: 700;
}

.price ins, .price ins .amount {
  color: var(--parmis-zafarani-gold) !important;
  font-weight: 800;
}

.price del, .price del .amount {
  color: var(--parmis-slate-muted) !important;
  opacity: 0.7;
}

/* Product Badges (Sale / New / Hot) */
.onsale,
.product-label.onsale {
  background-color: var(--parmis-zafarani-gold) !important;
  color: #1C212B !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
}

/* Interactive Action Buttons (Excluding Search Submit Button) */
.single_add_to_cart_button,
.woocommerce-Button.button,
.wd-buy-now-btn,
.btn-color-primary,
button[type="submit"]:not(.searchsubmit) {
  background-color: var(--parmis-lajvard-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(22, 50, 92, 0.25) !important;
  transition: all 0.25s ease !important;
}

.single_add_to_cart_button:hover,
.woocommerce-Button.button:hover,
.wd-buy-now-btn:hover,
.btn-color-primary:hover,
button[type="submit"]:not(.searchsubmit):hover {
  background-color: var(--parmis-lajvard-deep) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 18px rgba(18, 38, 63, 0.35) !important;
  transform: translateY(-1px);
}

/* Secondary Button Accents */
.btn-color-secondary,
.btn-style-default {
  background-color: var(--parmis-surface-ivory) !important;
  color: var(--parmis-charcoal-walnut) !important;
  border: 1px solid var(--parmis-border-sand) !important;
}

.btn-color-secondary:hover,
.btn-style-default:hover {
  background-color: #E8E2D8 !important;
  color: var(--parmis-lajvard-deep) !important;
  border-color: var(--parmis-zafarani-gold) !important;
}

/* Progress Bars & Active Indicators */
.wd-progress-bar .progress-bar {
  background-color: var(--parmis-lajvard-primary) !important;
}

/* Footer Section */
.wd-footer {
  background-color: var(--parmis-lajvard-deep) !important;
  color: #D3DFEE !important;
}

.wd-footer .widget-title {
  color: var(--parmis-zafarani-gold) !important;
  border-bottom: 2px solid rgba(197, 160, 89, 0.3);
  padding-bottom: 8px;
}

.wd-footer a {
  color: #D3DFEE;
}

.wd-footer a:hover {
  color: var(--parmis-zafarani-gold) !important;
}

/* ==========================================================================
   HEADER SEARCH BAR REFINEMENT — CIRCULAR BUTTON ON LEFT SIDE OF PILL TEXTBOX
   ========================================================================== */

/* Search Form Wrapper */
form.searchform,
.searchform.wd-style-4,
.wd-header-search-form form.searchform {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  --wd-form-height: 44px !important;
  height: 44px !important;
  border-radius: 50px !important;
  background-color: #FFFFFF !important;
}

/* Search Text Input (Pill shape, text starts from right, circular button sits on left) */
form.searchform input[type="text"].s,
.searchform.wd-style-4 input[type="text"] {
  height: 44px !important;
  line-height: 44px !important;
  border-radius: 50px !important;
  background-color: #FFFFFF !important;
  border: 1.5px solid var(--parmis-border-sand) !important;
  color: var(--parmis-charcoal-walnut) !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  /* RTL Spacing: Right side (text entry) 22px; Left side (circular button) 48px */
  padding-right: 22px !important;
  padding-left: 48px !important;
  padding-inline-start: 22px !important;
  padding-inline-end: 48px !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

form.searchform input[type="text"].s:focus,
.searchform.wd-style-4 input[type="text"]:focus {
  border-color: var(--parmis-lajvard-primary) !important;
  box-shadow: 0 0 0 3px rgba(22, 50, 92, 0.12) !important;
  outline: none !important;
}

/* Search Submit Button: Circular Shape on the LEFT Side */
form.searchform .searchsubmit,
.searchform.wd-style-4 .searchsubmit,
button[type="submit"].searchsubmit {
  /* Positioning: Fixed to the LEFT side */
  position: absolute !important;
  left: 4px !important;
  right: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: 4px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  
  /* Circular Shape Matching Pill Corners */
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  border-radius: 50% !important;
  
  /* Brand Palatial Lapis Theme */
  background-color: var(--parmis-lajvard-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 0 2px 8px rgba(22, 50, 92, 0.3) !important;
  
  /* Interaction & Centering */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 5 !important;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Hide raw text inside span */
form.searchform .searchsubmit span {
  display: none !important;
}

/* Magnifying Glass Icon inside the circle */
form.searchform .searchsubmit:after,
.searchform.wd-style-4 .searchsubmit:after {
  content: "\f130" !important;
  font-family: "woodmart-font" !important;
  font-size: 15px !important;
  color: #FFFFFF !important;
  line-height: 1 !important;
  display: block !important;
  transition: transform 0.2s ease !important;
}

/* Hover and Active Feedback */
form.searchform .searchsubmit:hover,
.searchform.wd-style-4 .searchsubmit:hover,
button[type="submit"].searchsubmit:hover {
  background-color: var(--parmis-lajvard-deep) !important;
  box-shadow: 0 4px 12px rgba(18, 38, 63, 0.4) !important;
  transform: translateY(-50%) scale(1.06) !important;
}

form.searchform .searchsubmit:hover:after {
  transform: scale(1.1) !important;
}

form.searchform .searchsubmit:active,
button[type="submit"].searchsubmit:active {
  transform: translateY(-50%) scale(0.96) !important;
}

/* Clear Search Button ("X") */
form.searchform .wd-clear-search {
  left: 44px !important;
  right: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: 44px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 4 !important;
}

/* Anti-CLS and Explicit Dimensions for Navigation Icons & UI Elements */
img.wd-nav-img, .wd-nav-img { width: 18px !important; height: 18px !important; aspect-ratio: 1 / 1 !important; object-fit: contain !important; }
.info-svg-wrapper img { width: 16px !important; height: 16px !important; aspect-ratio: 1 / 1 !important; }
.wd-slide-icon-wrapper img, img[src*="slide-icon"] { width: 34px !important; height: 34px !important; aspect-ratio: 1 / 1 !important; }
img[src*="dot-list"] { width: 16px !important; height: 16px !important; aspect-ratio: 1 / 1 !important; }
img[src*="phone"] { width: 16px !important; height: 16px !important; aspect-ratio: 1 / 1 !important; }
img[alt="payments"] { width: 255px !important; height: 22px !important; aspect-ratio: 255 / 22 !important; max-width: 100% !important; }
