/*
Theme Name:   DG Cosmetic Child
Theme URI:    https://dgcosmetico.com/
Description:  Premium Cosmetic & Beauty eCommerce Child Theme for Astra
Author:       DG Cosmetic Team
Author URI:   https://dgcosmetico.com/
Template:     astra
Version:      1.0.5
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  dg-cosmetic
Tags:         cosmetic, beauty, woocommerce, ecommerce, luxury, feminine, responsive
*/

/* =============================================
   DG COSMETIC — PREMIUM CSS DESIGN SYSTEM
   ============================================= */

/* ── CSS Custom Properties ── */
:root {
  /* Brand Colors */
  --color-rose:        #F2A7B8;
  --color-rose-light:  #F8C8D4;
  --color-rose-pale:   #FCE4EC;
  --color-rose-deep:   #D4818F;
  --color-nude:        #E8D5C4;
  --color-nude-light:  #F5EDD8;
  --color-beige:       #F5EDD8;
  --color-cream:       #FFF8F3;
  --color-cream-dark:  #FFF0E6;
  --color-gold:        #C9A96E;
  --color-gold-light:  #E8D5B0;
  --color-gold-dark:   #A8854A;
  --color-mauve:       #8B4A6B;
  --color-mauve-light: #C47FA5;
  --color-white:       #FFFFFF;
  --color-off-white:   #FAFAF8;

  /* Text Colors */
  --text-primary:   #1A0A00;
  --text-secondary: #5C3D2E;
  --text-muted:     #9E7B6B;
  --text-light:     #C4A898;
  --text-white:     #FFFFFF;

  /* Border */
  --border-color:   #EDD9C8;
  --border-light:   #F5EAE0;
  --border-gold:    #D4BF9A;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(242, 167, 184, 0.12);
  --shadow-md:   0 6px 24px rgba(201, 169, 110, 0.15);
  --shadow-lg:   0 16px 48px rgba(139, 74, 107, 0.12);
  --shadow-card: 0 4px 20px rgba(26, 10, 0, 0.06);
  --shadow-hover:0 12px 40px rgba(242, 167, 184, 0.25);

  /* Typography */
  --font-display:  'Cormorant Garamond', 'Georgia', serif;
  --font-heading:  'Playfair Display', 'Georgia', serif;
  --font-body:     'Poppins', 'Helvetica Neue', sans-serif;
  --font-script:   'Dancing Script', cursive;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;
  --space-2xl: 8rem;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-pill: 100px;
  --radius-full: 50%;

  /* Transitions */
  --transition-fast:   all 0.2s ease;
  --transition-base:   all 0.3s ease;
  --transition-slow:   all 0.5s ease;
  --transition-spring: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky:   1020;
  --z-overlay:  1040;
  --z-modal:    1060;
  --z-toast:    1080;
}

/* ── Global Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Selection ── */
::selection {
  background: var(--color-rose-light);
  color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-cream); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-rose), var(--color-gold));
  border-radius: 3px;
}

/* ── Typography Scale ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

a {
  color: var(--color-mauve);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover { color: var(--color-rose-deep); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Utility Classes ── */
.text-gold     { color: var(--color-gold) !important; }
.text-rose     { color: var(--color-rose) !important; }
.text-mauve    { color: var(--color-mauve) !important; }
.text-muted-dg { color: var(--text-muted) !important; }

.bg-cream      { background-color: var(--color-cream) !important; }
.bg-rose-pale  { background-color: var(--color-rose-pale) !important; }
.bg-nude       { background-color: var(--color-nude-light) !important; }

.font-display  { font-family: var(--font-display) !important; }
.font-script   { font-family: var(--font-script) !important; }

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

/* ── Section Headings ── */
.dg-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.dg-section-header .section-label {
  display: inline-block;
  font-family: var(--font-script);
  font-size: 1.1rem;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.dg-section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.dg-section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-rose), var(--color-gold));
  border-radius: 2px;
}

.dg-section-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 1.5rem auto 0;
}

/* ── Buttons ── */
.btn-dg,
.dg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--transition-spring);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-dg::before,
.dg-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.2);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn-dg:hover::before,
.dg-btn:hover::before {
  transform: translateX(0);
}

/* Primary Button */
.btn-dg-primary {
  background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-rose-deep) 100%);
  color: var(--color-white);
  box-shadow: 0 6px 24px rgba(242, 167, 184, 0.4);
}

.btn-dg-primary:hover {
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(242, 167, 184, 0.5);
}

/* Gold Button */
.btn-dg-gold {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: var(--color-white);
  box-shadow: 0 6px 24px rgba(201, 169, 110, 0.35);
}

.btn-dg-gold:hover {
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(201, 169, 110, 0.5);
}

/* Outline Button */
.btn-dg-outline {
  background: transparent;
  color: var(--color-mauve);
  border: 2px solid var(--color-rose);
}

.btn-dg-outline:hover {
  background: var(--color-rose);
  color: var(--color-white);
  border-color: var(--color-rose);
  transform: translateY(-2px);
}

/* White Outline */
.btn-dg-white-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
}

.btn-dg-white-outline:hover {
  background: var(--color-white);
  color: var(--text-primary);
  border-color: var(--color-white);
}

/* Ghost */
.btn-dg-ghost {
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-dg-ghost:hover {
  background: rgba(255,255,255,0.25);
  color: var(--color-white);
}

/* Icon Button */
.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  font-size: 1rem;
  padding: 0;
}

.btn-icon-light {
  background: rgba(255,255,255,0.9);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-icon-light:hover {
  background: var(--color-white);
  color: var(--color-rose-deep);
  box-shadow: var(--shadow-md);
  transform: scale(1.1);
}

/* ── Badges ── */
.dg-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-sale    { background: var(--color-rose);  color: var(--color-white); }
.badge-new     { background: var(--color-gold);  color: var(--color-white); }
.badge-hot     { background: #E8506A;            color: var(--color-white); }
.badge-limited { background: var(--color-mauve); color: var(--color-white); }

/* ── Card Base ── */
.dg-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition-base);
}

.dg-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* ── Dividers ── */
.dg-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.dg-divider::before,
.dg-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.dg-divider span {
  color: var(--color-gold);
  font-size: 0.8rem;
}

/* ── Form Elements ── */
.dg-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--color-white);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition-base);
  appearance: none;
}

.dg-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--color-rose);
  box-shadow: 0 0 0 3px rgba(242, 167, 184, 0.2);
}

/* ── Rating Stars ── */
.dg-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  color: var(--color-gold);
  font-size: 0.8rem;
}

.dg-rating .count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.3rem;
}

/* ── Preloader ── */
#dg-preloader {
  position: fixed;
  inset: 0;
  background: var(--color-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#dg-preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.dg-preloader-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-mauve);
  margin-bottom: 1.5rem;
  animation: pulse 1.5s ease infinite;
}

.dg-preloader-bar {
  width: 120px;
  height: 2px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.dg-preloader-bar::after {
  content: '';
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-rose), var(--color-gold));
  animation: loading-bar 1.5s ease infinite;
}

@keyframes loading-bar {
  0%   { width: 0; }
  50%  { width: 80%; }
  100% { width: 100%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Toast Notifications ── */
.dg-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dg-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--color-rose);
  min-width: 260px;
  animation: toast-slide-in 0.4s ease;
  font-size: 0.875rem;
}

.dg-toast.success { border-left-color: #52C41A; }
.dg-toast.error   { border-left-color: #FF4D4F; }
.dg-toast.info    { border-left-color: var(--color-gold); }

@keyframes toast-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Overlay ── */
.dg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 10, 0, 0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  backdrop-filter: blur(2px);
}

.dg-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Breadcrumb ── */
.dg-breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
}

.dg-breadcrumb a {
  color: var(--text-muted);
}

.dg-breadcrumb a:hover {
  color: var(--color-rose-deep);
}

.dg-breadcrumb .sep {
  margin: 0 0.4rem;
  color: var(--text-light);
}

.dg-breadcrumb .current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Page Hero ── */
.dg-page-hero {
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-rose-pale) 50%, var(--color-nude-light) 100%);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dg-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f2a7b8' fill-opacity='0.08'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.dg-page-hero h1 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-rose), var(--color-rose-deep));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-spring);
  z-index: var(--z-sticky);
  font-size: 1rem;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ── WooCommerce Notices Override ── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  border-radius: var(--radius-md) !important;
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  padding: 1rem 1.5rem !important;
  border-top: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.woocommerce-message {
  background: #F0FDF4 !important;
  border-left: 3px solid #22C55E !important;
  color: #166534 !important;
}

.woocommerce-error {
  background: #FEF2F2 !important;
  border-left: 3px solid #EF4444 !important;
  color: #991B1B !important;
}

.woocommerce-info {
  background: var(--color-rose-pale) !important;
  border-left: 3px solid var(--color-rose) !important;
  color: var(--color-mauve) !important;
}
