/*
Theme Name: YF E-commerce
Theme URI: https://yfellow.com/themes/yf-ecommerce
Author: YFellow Studio
Author URI: https://yfellow.com
Description: A clean, light-themed blush and rose-pink E-commerce & WooCommerce storefront theme built for YF E-commerce. Features a 9-section conversion layout, YF monogram branding, interactive quick-view modal, slide-out shopping bag drawer, and full WordPress / Elementor / WooCommerce compatibility.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
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: yf-ecommerce
Tags: e-commerce, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, theme-options, woocommerce, elementor
*/

:root {
  --yf-bg-page: #FFF9FB;
  --yf-bg-surface: #FFFFFF;
  --yf-bg-soft: #FDECEF;
  --yf-bg-blush: #FAD8E0;
  --yf-border: #F3D1DA;
  --yf-border-strong: #E6B3C2;
  --yf-primary: #D94E78;
  --yf-primary-hover: #B83860;
  --yf-primary-light: #FCE4EC;
  --yf-text-main: #2A1A20;
  --yf-text-muted: #6E525C;
  --yf-text-light: #9E818B;
  --yf-badge-sale: #C2185B;
  --yf-badge-new: #8E24AA;
  --yf-radius-sm: 8px;
  --yf-radius-md: 14px;
  --yf-radius-lg: 22px;
  --yf-shadow-sm: 0 4px 14px rgba(217, 78, 120, 0.06);
  --yf-shadow-md: 0 12px 30px rgba(217, 78, 120, 0.12);
  --yf-container: 1320px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--yf-bg-page);
  color: var(--yf-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.yf-container {
  width: 100%;
  max-width: var(--yf-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Section 1: Announcement Bar */
.yf-announcement {
  background: linear-gradient(90deg, #D94E78 0%, #E86F93 50%, #D94E78 100%);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 9px 16px;
}

.yf-announcement span.yf-promo-pill {
  background: rgba(255, 255, 255, 0.22);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  font-family: monospace;
}

/* Section 2: Main Header */
.yf-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--yf-border);
}

.yf-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.yf-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--yf-text-main);
}

.yf-monogram {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--yf-bg-soft);
  border: 1.5px solid var(--yf-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.yf-search-bar {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  background: var(--yf-bg-page);
  border: 1px solid var(--yf-border-strong);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.yf-search-bar:focus-within {
  border-color: var(--yf-primary);
  box-shadow: 0 0 0 3px rgba(217, 78, 120, 0.14);
}

.yf-search-bar input[type="search"],
.yf-search-bar input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--yf-text-main);
  outline: none;
}

.yf-search-btn {
  background: var(--yf-primary);
  color: #FFF;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.yf-search-btn:hover {
  background: var(--yf-primary-hover);
}

.yf-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yf-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--yf-bg-soft);
  color: var(--yf-text-main);
  border: 1px solid var(--yf-border);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.yf-icon-btn:hover {
  background: var(--yf-bg-blush);
  border-color: var(--yf-primary);
}

.yf-badge-count {
  background: var(--yf-primary);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Section 3: Primary Navigation */
.yf-nav-bar {
  background: var(--yf-bg-surface);
  border-bottom: 1px solid var(--yf-border);
}

.yf-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 46px;
  overflow-x: auto;
}

.yf-nav-list li a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--yf-text-muted);
  white-space: nowrap;
  padding: 12px 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.yf-nav-list li a:hover,
.yf-nav-list li.current-menu-item a {
  color: var(--yf-primary);
  border-bottom-color: var(--yf-primary);
}

/* Buttons */
.yf-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--yf-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(217, 78, 120, 0.25);
  transition: transform 0.18s ease, background 0.2s ease;
}

.yf-btn-primary:hover {
  background: var(--yf-primary-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.yf-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FFFFFF;
  color: var(--yf-text-main);
  border: 1.5px solid var(--yf-border-strong);
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.yf-btn-outline:hover {
  border-color: var(--yf-primary);
  background: var(--yf-bg-soft);
}

/* Section 4: Hero Split */
.yf-hero {
  padding: 44px 0 36px;
}

.yf-hero-card {
  background: linear-gradient(135deg, #FDECEF 0%, #FAD8E0 55%, #FFF4F7 100%);
  border: 1px solid var(--yf-border);
  border-radius: var(--yf-radius-lg);
  padding: 52px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--yf-shadow-sm);
}

.yf-eyebrow {
  display: inline-block;
  background: #FFFFFF;
  color: var(--yf-primary);
  border: 1px solid var(--yf-border-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.yf-hero h1 {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  color: var(--yf-text-main);
}

.yf-hero p {
  font-size: 1.05rem;
  color: var(--yf-text-muted);
  margin: 0 0 28px;
  max-width: 520px;
}

.yf-hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.yf-hero-visual {
  background: #FFFFFF;
  border: 1px solid var(--yf-border);
  border-radius: var(--yf-radius-md);
  padding: 28px;
  text-align: center;
  box-shadow: var(--yf-shadow-md);
}

.yf-hero-visual-art {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: radial-gradient(circle at top right, #FAD8E0, #FFF5F8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px dashed var(--yf-border-strong);
}

/* Section 5: 4-Column Departments */
.yf-section {
  padding: 40px 0;
}

.yf-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.yf-section-head h2 {
  font-size: 1.65rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.yf-dept-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.yf-dept-card {
  background: var(--yf-bg-surface);
  border: 1px solid var(--yf-border);
  border-radius: var(--yf-radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.yf-dept-card:hover,
.yf-dept-card.active {
  transform: translateY(-3px);
  border-color: var(--yf-primary);
  box-shadow: var(--yf-shadow-md);
  background: var(--yf-bg-soft);
}

.yf-dept-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--yf-bg-soft);
  color: var(--yf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.yf-dept-card h3 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.yf-dept-card p {
  font-size: 0.83rem;
  color: var(--yf-text-muted);
  margin: 0;
}

/* Section 6: Product Grid */
.yf-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yf-pill {
  background: #FFFFFF;
  border: 1px solid var(--yf-border);
  color: var(--yf-text-muted);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.yf-pill.active,
.yf-pill:hover {
  background: var(--yf-primary);
  border-color: var(--yf-primary);
  color: #FFFFFF;
}

.yf-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.yf-product-card {
  background: #FFFFFF;
  border: 1px solid var(--yf-border);
  border-radius: var(--yf-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.yf-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--yf-shadow-md);
  border-color: var(--yf-border-strong);
}

.yf-product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, #FFF2F6 0%, #FCE1E9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.yf-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.yf-product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--yf-primary);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.yf-product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.yf-product-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--yf-primary);
  margin-bottom: 4px;
}

.yf-product-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--yf-text-main);
}

.yf-product-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--yf-text-main);
  margin-bottom: 14px;
}

.yf-product-price del {
  color: var(--yf-text-light);
  font-weight: 500;
  font-size: 0.88rem;
  margin-left: 6px;
}

.yf-product-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.yf-add-btn {
  background: var(--yf-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.yf-add-btn:hover {
  background: var(--yf-primary-hover);
}

.yf-qv-btn {
  background: var(--yf-bg-soft);
  color: var(--yf-primary);
  border: 1px solid var(--yf-border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.yf-qv-btn:hover {
  background: var(--yf-bg-blush);
}

/* Section 7: Promo Banner */
.yf-promo-banner {
  background: linear-gradient(120deg, #FAD8E0 0%, #FDECEF 60%, #FFF7F9 100%);
  border: 1px solid var(--yf-border-strong);
  border-radius: var(--yf-radius-lg);
  padding: 42px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.yf-promo-banner h2 {
  font-size: 1.85rem;
  margin: 0 0 8px;
}

.yf-promo-banner p {
  margin: 0;
  color: var(--yf-text-muted);
  max-width: 560px;
}

/* Section 8: Value Props */
.yf-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.yf-trust-item {
  background: #FFFFFF;
  border: 1px solid var(--yf-border);
  border-radius: var(--yf-radius-md);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.yf-trust-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--yf-bg-soft);
  color: var(--yf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.yf-trust-item h4 {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

.yf-trust-item p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--yf-text-muted);
}

/* Section 9: Footer */
.yf-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--yf-border);
  margin-top: 48px;
  padding: 56px 0 28px;
}

.yf-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--yf-border);
}

.yf-footer h4 {
  font-size: 0.95rem;
  margin: 0 0 14px;
  color: var(--yf-text-main);
}

.yf-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.yf-footer ul a {
  font-size: 0.88rem;
  color: var(--yf-text-muted);
}

.yf-footer ul a:hover {
  color: var(--yf-primary);
}

.yf-newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.yf-newsletter-form input {
  flex: 1;
  border: 1px solid var(--yf-border-strong);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.88rem;
  background: var(--yf-bg-page);
}

.yf-footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--yf-text-light);
}

/* Slide-Out Cart Drawer & Quick View Modal */
.yf-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(42, 26, 32, 0.42);
  backdrop-filter: blur(3px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.yf-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.yf-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 410px;
  height: 100vh;
  background: #FFFFFF;
  border-left: 1px solid var(--yf-border);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}

.yf-cart-drawer.open {
  transform: translateX(0);
}

.yf-drawer-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--yf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yf-shipping-bar {
  background: var(--yf-bg-soft);
  padding: 12px 24px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--yf-border);
}

.yf-progress-track {
  height: 6px;
  background: #FAD8E0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.yf-progress-fill {
  height: 100%;
  background: var(--yf-primary);
  width: 0%;
  transition: width 0.25s ease;
}

.yf-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.yf-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--yf-border);
  border-radius: 12px;
  background: var(--yf-bg-page);
}

.yf-drawer-foot {
  padding: 20px 24px;
  border-top: 1px solid var(--yf-border);
  background: var(--yf-bg-page);
}

.yf-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: 92%;
  max-width: 680px;
  background: #FFFFFF;
  border: 1px solid var(--yf-border-strong);
  border-radius: var(--yf-radius-lg);
  padding: 32px;
  z-index: 1250;
  box-shadow: var(--yf-shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
}

.yf-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* WooCommerce & Elementor Compatibility Helpers */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  background: #FFFFFF;
  border: 1px solid var(--yf-border);
  border-radius: var(--yf-radius-md);
  padding: 16px;
}

.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce a.button,
.woocommerce button.button {
  background-color: var(--yf-primary) !important;
  color: #FFFFFF !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}

.elementor-page .yf-main-content {
  max-width: 100%;
  padding: 0;
}

@media (max-width: 1024px) {
  .yf-hero-card {
    grid-template-columns: 1fr;
    padding: 36px;
  }
  .yf-dept-grid,
  .yf-product-grid,
  .yf-trust-grid,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
  .yf-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .yf-header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
  }
  .yf-search-bar {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .yf-dept-grid,
  .yf-product-grid,
  .yf-trust-grid,
  .yf-footer-grid,
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
  .yf-promo-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }
}
