﻿/*
Theme Name: Danje Theme
Theme URI: localhost:10004
Author: Danje Urmia
Author URI: localhost:10004
Description: A premium, light quiet luxury WordPress WooCommerce theme for Danje Urmia, a Persian jewelry and gold-leaf artwork brand.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: danje-theme
Domain Path: /languages
Tags: translation-ready, custom-menu, featured-images, rtl-language-support, light, e-commerce

Danje Urmia Custom Theme.
*/

:root,
[data-theme="light"] {
  /* Light Theme (Default - Warm Luxury Gold/Beige) */
  --bg-primary:      #FAF8F4;
  --bg-surface:      #FFFFFF;
  --bg-card:         #F5F3ED;
  --bg-card-hover:   #EBE9E2;
  --bg-input:        #FFFFFF;
  --bg-section-alt:  #F2F0E9;
  --bg-nav-scrolled: rgba(250, 248, 244, 0.85);

  /* Gold System */
  --gold:            #C9A84C;
  --gold-light:      #D4B663;
  --gold-dark:       #B09038;
  --gold-shimmer:    #EADB96;
  --gold-muted:      rgba(201,168,76,0.1);
  --gold-border:     rgba(201,168,76,0.3);
  --gold-glow:       rgba(201,168,76,0.15);
  --gold-a11y:       #8A6B22;

  /* Primary Brand Accent (Gold Only) */
  --primary:         #C9A84C;
  --primary-light:   #D4B663;
  --primary-dark:    #B09038;
  --primary-muted:   rgba(201, 168, 76, 0.08);
  --primary-border:  rgba(201, 168, 76, 0.2);

  /* Text Colors */
  --text-primary:    #1A1A1A;
  --text-secondary:  #6B7280;
  --text-muted:      #9CA3AF;
  --text-on-gold:    #FFFFFF;
  --text-title:      #111111;

  --border:          #E2DFD8;
  --border-hover:    #D1CEC5;
  --divider:         rgba(0,0,0,0.06);

  --shadow-card:     0 4px 24px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 12px 48px rgba(0,0,0,0.08), 0 0 0 1px var(--gold-border);
  --shadow-gold:     0 0 30px rgba(201,168,76,0.15);
  --shadow-nav:      0 2px 40px rgba(0,0,0,0.06);
}

[data-theme="dark"] {
  /* Dark Theme (Toggleable) */
  --bg-primary:      #080808;
  --bg-surface:      #111111;
  --bg-card:         #161616;
  --bg-card-hover:   #1E1E1E;
  --bg-input:        #1A1A1A;
  --bg-section-alt:  #0D0D0D;
  --bg-nav-scrolled: rgba(8, 8, 8, 0.85);

  /* Gold System */
  --gold:            #C9A84C;
  --gold-light:      #E8D08A;
  --gold-dark:       #9A7A2E;
  --gold-shimmer:    #F5E6A0;
  --gold-muted:      rgba(201,168,76,0.15);
  --gold-border:     rgba(201,168,76,0.25);
  --gold-glow:       rgba(201,168,76,0.08);
  --gold-a11y:       #E0C273;

  /* Primary Brand Accent (Gold Only) */
  --primary:         #C9A84C;
  --primary-light:   #E8D08A;
  --primary-dark:    #9A7A2E;
  --primary-muted:   rgba(201, 168, 76, 0.12);
  --primary-border:  rgba(201, 168, 76, 0.3);

  /* Text Colors */
  --text-primary:    #F0EAE0;
  --text-secondary:  #A8977E;
  --text-muted:      #5C5046;
  --text-on-gold:    #1A1000;
  --text-title:      #F5F0E8;

  --border:          #222222;
  --border-hover:    #333333;
  --divider:         rgba(255,255,255,0.04);

  --shadow-card:     0 4px 24px rgba(0,0,0,0.4);
  --shadow-card-hover: 0 12px 48px rgba(0,0,0,0.6), 0 0 0 1px var(--gold-border);
  --shadow-gold:     0 0 30px rgba(201,168,76,0.15);
  --shadow-nav:      0 2px 40px rgba(0,0,0,0.8);
}

:root {
  /* Typography Scale */
  --text-xs:    0.75rem;   /* 12px â€” labels, captions */
  --text-sm:    0.875rem;  /* 14px â€” metadata, tags */
  --text-base:  1rem;      /* 16px â€” body */
  --text-lg:    1.125rem;  /* 18px â€” large body */
  --text-xl:    1.25rem;   /* 20px â€” card titles */
  --text-2xl:   1.5rem;    /* 24px â€” section subtitles */
  --text-3xl:   2rem;      /* 32px â€” section titles */
  --text-4xl:   2.75rem;   /* 44px â€” page headings */
  --text-5xl:   3.75rem;   /* 60px â€” hero headline */
  --text-6xl:   5rem;      /* 80px â€” oversized display */

  /* Micro Spacing (Components) â€” reduced 30-40% for compact premium feel */
  --space-xs:   3px;
  --space-sm:   6px;
  --space-md:   12px;
  --space-lg:   16px;
  --space-xl:   28px;
  --space-2xl:  40px;
  --space-3xl:  56px;
  --space-4xl:  64px;
  
  /* Macro Spacing (Sections â€” reduced 30-40% for tight cohesive layout) */
  --section-xs: 16px;
  --section-sm: 24px;
  --section-md: 36px;
  --section-lg: 52px;
  --section-v:  32px; /* Tight vertical section padding */
  
  --container:  1320px;   /* max-width */
  --gutter:     24px;     /* horizontal padding */

  /* Shape */
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-xl:    32px;
  --radius-pill:  999px;

  /* Animation Easing */
  --ease-out:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in:       cubic-bezier(0.55, 0, 1, 0.45);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-luxury:   cubic-bezier(0.16, 1, 0.3, 1);

  /* Animation Durations */
  --dur-fast:      150ms;
  --dur-base:      300ms;
  --dur-slow:      500ms;
  --dur-reveal:    800ms;
  --dur-hero:      1200ms;
}

/* Base resets & RTL Setup */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  direction: rtl;
  font-family: 'Vazirmatn', sans-serif;
  font-feature-settings: "ss02"; /* Enforce Persian numerals where supported */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
}

body {
  background-color: var(--bg-primary);
  background-repeat: repeat;
  background-size: 500px auto;
  color: var(--text-primary);
  font-family: 'Vazirmatn', sans-serif;
  font-size: var(--text-base);
  line-height: 1.9; /* Persian needs more breathing room */
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Vazirmatn', sans-serif;
  line-height: 1.3;
  color: var(--text-title, var(--text-primary));
  font-weight: 700;
}

/* Custom Gold Selection Highlight */
::selection {
  background-color: var(--gold);
  color: var(--text-on-gold);
}

::-moz-selection {
  background-color: var(--gold);
  color: var(--text-on-gold);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--primary-light);
}

/* Layout Utilities */
.danje-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (max-width: 1024px) {
  :root {
    --section-v: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
    --section-v: 18px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-v: 14px;
  }
}

/* Premium Gold Leaf Loop Badge Styling */
.danje-gold-badge-container {
  margin-bottom: 6px;
  margin-top: 2px;
  text-align: center;
}
.danje-gold-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 500;
  color: #c59b4e;
  background: rgba(197, 155, 78, 0.08);
  border: 1px solid rgba(197, 155, 78, 0.25);
  border-radius: 4px;
  direction: rtl;
  line-height: 1.2;
}


/* ==========================================================================
   Phase 8: Mobile Search Overlay & Menu Fixes
   ========================================================================== */

/* Hide the new mobile search button on desktop */
.danje-header__mobile-search-btn {
	display: none;
	background: none;
	border: none;
	color: var(--text-dark);
	cursor: pointer;
	padding: 8px;
	margin-left: 8px;
	transition: color 0.3s ease;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}

.danje-header__mobile-search-btn:hover {
	color: var(--gold);
}

/* Mobile Search Overlay styling */
.danje-search__mobile-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh; /* fallback */
	height: 100dvh;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.danje-search__mobile-overlay[aria-hidden="false"] {
	visibility: visible;
	opacity: 1;
}

.danje-search__mobile-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 1;
}

.danje-search__mobile-content {
	position: relative;
	z-index: 2;
	background: var(--bg-body);
	width: 100%;
	border-bottom-left-radius: 20px;
	border-bottom-right-radius: 20px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
	transform: translateY(-20px);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
}

.danje-search__mobile-overlay[aria-hidden="false"] .danje-search__mobile-content {
	transform: translateY(0);
}

.danje-search__mobile-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid rgba(0,0,0,0.05);
}

html[data-theme="dark"] .danje-search__mobile-header {
	border-bottom-color: rgba(255,255,255,0.05);
}

.danje-search__mobile-title {
	font-family: 'YekanBakh', sans-serif;
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--text-dark);
}

.danje-search__mobile-close {
	background: none;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: 5px;
	transition: color 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
}

.danje-search__mobile-close:hover {
	color: var(--danger-color, #e74c3c);
}

.danje-search__mobile-body {
	padding: 24px;
}

.danje-search-form--mobile {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
}

.danje-search-field--mobile {
	width: 100%;
	padding: 16px 20px;
	padding-right: 48px;
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 12px;
	background: var(--bg-alt);
	color: var(--text-dark);
	font-family: 'YekanBakh', sans-serif;
	font-size: 1rem;
	transition: all 0.3s ease;
	outline: none;
}

html[data-theme="dark"] .danje-search-field--mobile {
	border-color: rgba(255,255,255,0.1);
}

.danje-search-field--mobile:focus {
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.danje-search-submit--mobile {
	position: absolute;
	right: 12px;
	background: none;
	border: none;
	color: var(--text-muted);
	padding: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Media Query for Mobile */
@media (max-width: 991px) {
	.danje-header__search {
		display: none !important; /* Hide desktop search */
	}
	
	.danje-header__mobile-search-btn {
		display: flex; /* Show mobile search trigger */
	}
}


