/**
 * Kosmetix Main Styles
 * Using WordPress theme.json CSS variables
 * Design System: Rose Gold + Champagne
 */

/* ============================================
   GLOBAL OVERRIDES - Storefront Parent Theme
   ============================================ */

/* Replace Storefront's purple outline with theme-consistent focus ring */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--wp--preset--color--rose-gold);
  outline-offset: 2px;
}

/* Hide focus ring for mouse users, show for keyboard users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   GOOGLE FONTS
   Fonts loaded via PHP (inc/performance.php) with preload
   for better performance - no render-blocking @import
   ============================================ */

/* ============================================
   GLOBAL RESET
   ============================================ */

:root {
  --wp--preset--spacing--2xl: 4rem;
  --wp--preset--spacing--3xl: 6rem;
  --wp--preset--spacing--4xl: 8rem;
}

/* Tippy.js Custom Theme: Kosmetix */
.tippy-box[data-theme~='kosmetix'] {
  background-color: var(--wp--preset--color--charcoal, #333);
  color: var(--wp--preset--color--white, #fff);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tippy-box[data-theme~='kosmetix'][data-placement^='top']
  > .tippy-arrow::before {
  border-top-color: var(--wp--preset--color--charcoal, #333);
}
.tippy-box[data-theme~='kosmetix'][data-placement^='bottom']
  > .tippy-arrow::before {
  border-bottom-color: var(--wp--preset--color--charcoal, #333);
}
.tippy-box[data-theme~='kosmetix'][data-placement^='left']
  > .tippy-arrow::before {
  border-left-color: var(--wp--preset--color--charcoal, #333);
}
.tippy-box[data-theme~='kosmetix'][data-placement^='right']
  > .tippy-arrow::before {
  border-right-color: var(--wp--preset--color--charcoal, #333);
}

/* Tippy Shift-Away Animation */
.tippy-box[data-animation='shift-away'][data-state='hidden'] {
  opacity: 0;
}
.tippy-box[data-animation='shift-away'][data-state='hidden'][data-placement^='top'] {
  transform: translateY(-10px);
}
.tippy-box[data-animation='shift-away'][data-state='hidden'][data-placement^='bottom'] {
  transform: translateY(10px);
}
.tippy-box[data-animation='shift-away'][data-state='hidden'][data-placement^='left'] {
  transform: translateX(-10px);
}
.tippy-box[data-animation='shift-away'][data-state='hidden'][data-placement^='right'] {
  transform: translateX(10px);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.kosmetix-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--xs, 0.5rem);
  padding: var(--wp--preset--spacing--sm, 0.75rem)
    var(--wp--preset--spacing--md, 1rem);
  background: var(--wp--preset--color--charcoal, #3e2c29);
  color: var(--wp--preset--color--white, #fff);
  border-radius: var(--wp--custom--radius--md, 8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  font-size: var(--wp--preset--font-size--sm, 0.875rem);
  font-weight: 500;
  z-index: 10000;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kosmetix-toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.kosmetix-toast__icon {
  font-size: 1.25rem;
  color: var(--wp--preset--color--success, #10b981);
}

.kosmetix-toast__text {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--wp--preset--font-family--body);
  color: var(--wp--preset--color--charcoal);
  background: var(--wp--preset--color--warm-alabaster);
  line-height: var(--wp--custom--line-height--normal);
  margin: 0;
  padding: 0;
}

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

/* ============================================
   GLOBAL TYPOGRAPHY SYSTEM
   Mapped to theme.json settings
   ============================================ */

/* Headings Base - Premium Weight Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--wp--preset--font-family--heading);
  color: var(--wp--preset--color--charcoal);
  line-height: var(--wp--custom--line-height--tight);
  margin-top: 0;
  margin-bottom: var(--wp--preset--spacing--sm);
}

/* H1: Bold for maximum impact */
h1 {
  font-size: var(--wp--preset--font-size--display);
  font-weight: 700; /* Bold - Strong hierarchy */
  letter-spacing: -0.02em; /* Tighter tracking for Playfair elegance */
}

/* H2: SemiBold for strong sections */
h2 {
  font-size: var(--wp--preset--font-size--3xl);
  font-weight: 600; /* SemiBold - Clear hierarchy */
  letter-spacing: -0.02em; /* Tighter tracking */
}

/* H3: SemiBold for subsections */
h3 {
  font-size: var(--wp--preset--font-size--2xl);
  font-weight: 600; /* SemiBold */
  letter-spacing: -0.01em; /* Slightly tighter */
}

/* H4-H6: Medium weight for subtle hierarchy */
h4 {
  font-size: var(--wp--preset--font-size--xl);
  font-weight: 500; /* Medium */
}

h5 {
  font-size: var(--wp--preset--font-size--lg);
  font-weight: 500; /* Medium */
}

h6 {
  font-size: var(--wp--preset--font-size--md);
  font-weight: 600; /* SemiBold for labels */
  text-transform: uppercase;
  letter-spacing: 0.05em; /* Wider for uppercase readability */
}

/* Form Elements Reset */
input,
textarea,
select,
button {
  font-family: inherit; /* Inherit global font (Inter/Playfair) */
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* Body Text Base - Clean Inter Typography
   Using charcoal for WCAG AA contrast compliance (12:1 ratio) */
body,
p,
ul,
ol,
li {
  font-family: var(--wp--preset--font-family--body);
  color: var(--wp--preset--color--charcoal);
  line-height: var(--wp--custom--line-height--relaxed);
  font-size: var(--wp--preset--font-size--base);
  font-weight: 400; /* Regular - Clean readability */
}

/* Muted/secondary text - use slate sparingly */
.text-muted,
.text-secondary {
  color: var(--wp--preset--color--slate);
}

p {
  margin-bottom: var(--wp--preset--spacing--md);
}

/* Inline Elements */
span {
  display: inline-block; /* Allows transforms/padding if needed, usually safe */
}

strong,
b {
  font-weight: 600; /* SemiBold for emphasis */
  color: var(--wp--preset--color--charcoal);
}

small {
  font-size: var(--wp--preset--font-size--xs);
  color: var(--wp--preset--color--slate);
  opacity: 0.9;
}

a {
  color: var(--wp--preset--color--rose-gold);
  text-decoration: none;
  transition: color var(--wp--custom--transition--fast);
}

a:hover {
  color: var(--wp--preset--color--rose-gold-dark);
}

/* ============================================
   GLOBAL LAYOUT OVERRIDES (Fix .col-full)
   ============================================ */
.col-full,
.storefront-full-width-content .col-full,
.site-content .col-full {
  max-width: 1280px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 var(--wp--preset--spacing--md) !important;
  box-sizing: border-box !important;
}

/* Large screens: wider container */
@media (min-width: 1600px) {
  .col-full,
  .storefront-full-width-content .col-full,
  .site-content .col-full {
    max-width: 1440px !important;
  }
}

@media (max-width: 480px) {
  .col-full,
  .storefront-full-width-content .col-full {
    padding: 0 10px !important;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .col-full,
  .storefront-full-width-content .col-full {
    padding: 0 12px !important;
  }
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--wp--preset--spacing--md);
}

/* Large screens: wider container */
@media (min-width: 1600px) {
  .container {
    max-width: 1440px;
  }
}

.kosmetix-homepage {
  /* Flexbox layout for homepage sections */
  overflow-x: visible;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  gap: 0; /* Remove gap, use section padding instead */
  align-items: stretch;
  justify-content: flex-start;
}

/* ============================================
   UNIFIED SECTION SPACING SYSTEM
   Desktop: 80px between sections (--spacing--3xl = 6rem)
   Tablet: 60px between sections (--spacing--2xl = 4rem)
   Mobile: 40px between sections (--spacing--xl = 2.5rem)
   ============================================ */

/* Desktop (XL) - Default */
.kosmetix-homepage > section {
  padding-top: var(--wp--preset--spacing--3xl);
  padding-bottom: var(--wp--preset--spacing--3xl);
  margin: 0; /* Reset any margins */
}

/* Hero has no padding (full-bleed section) */
.kosmetix-homepage > .kosmetix-hero {
  padding-top: 0;
  padding-bottom: 0;
}

/* First section after hero - reduce top padding (hero provides visual spacing) */
.kosmetix-homepage > .kosmetix-hero + section {
  padding-top: var(--wp--preset--spacing--3xl);
}

/* Last section before footer - extra bottom spacing */
.kosmetix-homepage > section:last-child {
  padding-bottom: var(--wp--preset--spacing--4xl);
}

/* Clip overflow on sections (not hero) */
.kosmetix-homepage > section:not(.kosmetix-hero) {
  overflow-x: clip;
}

/* Tablet (M) - 992px and below */
@media (max-width: 991px) {
  .kosmetix-homepage > section {
    padding-top: var(--wp--preset--spacing--2xl);
    padding-bottom: var(--wp--preset--spacing--2xl);
  }

  .kosmetix-homepage > .kosmetix-hero + section {
    padding-top: var(--wp--preset--spacing--2xl);
  }

  .kosmetix-homepage > section:last-child {
    padding-bottom: var(--wp--preset--spacing--3xl);
  }
}

/* Mobile (S) - 767px and below */
@media (max-width: 767px) {
  .kosmetix-homepage > section {
    padding-top: var(--wp--preset--spacing--xl);
    padding-bottom: var(--wp--preset--spacing--xl);
  }

  .kosmetix-homepage > .kosmetix-hero + section {
    padding-top: var(--wp--preset--spacing--xl);
  }

  .kosmetix-homepage > section:last-child {
    padding-bottom: var(--wp--preset--spacing--2xl);
  }
}

/* Offset for fixed header - .site-header contains .kosmetix-header */
.site-header {
  min-height: 140px; /* Reserve space for fixed header */
}

@media (max-width: 767px) {
  .site-header {
    min-height: 70px;
  }
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.woocommerce-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: var(--wp--preset--spacing--md) 0;
  margin-bottom: var(--wp--preset--spacing--lg);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--wp--preset--color--slate);
}

/* Breadcrumb Links */
.woocommerce-breadcrumb a {
  color: var(--wp--preset--color--charcoal) !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
  position: relative;
}

.woocommerce-breadcrumb a:hover {
  color: var(--wp--preset--color--rose-gold) !important;
}

/* Elegant underline on hover */
.woocommerce-breadcrumb a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--wp--preset--color--rose-gold);
  transition: width 0.3s ease;
}

.woocommerce-breadcrumb a:hover::after {
  width: 100%;
}

/* Current Page (last item) */
.woocommerce-breadcrumb > span:last-child,
.woocommerce-breadcrumb strong {
  color: var(--wp--preset--color--rose-gold);
  font-weight: 500;
}

/* Separator Styling */
.woocommerce-breadcrumb .breadcrumb-separator,
.woocommerce-breadcrumb::before {
  color: var(--wp--preset--color--rose-gold-light);
}

/* Home Icon Enhancement */
.woocommerce-breadcrumb .home-icon,
.woocommerce-breadcrumb a[href*='strona-glowna'] .material-symbols-outlined,
.woocommerce-breadcrumb a:first-of-type {
  display: inline-flex;
  align-items: center;
}

/* Storefront specific breadcrumb fix */
.storefront-breadcrumb {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.storefront-breadcrumb .woocommerce-breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--md);
}

/* Mobile Breadcrumbs */
@media (max-width: 767px) {
  .woocommerce-breadcrumb {
    font-size: 0.8rem;
    padding: var(--wp--preset--spacing--sm) 0;
    margin-bottom: var(--wp--preset--spacing--md);
  }
}

/* ============================================
   HERO SLIDER SECTION
   Full-width promotional carousel
   ============================================ */

.kosmetix-hero {
  position: relative;
  height: 640px;
  max-height: 640px;
  overflow: hidden;

  /* Full-bleed centered technique */
  width: 100vw;
  max-width: 1920px;
  left: 50%;
  transform: translateX(-50%);
  margin-left: 0;
  margin-right: 0;
}

/* Hero Swiper container */
.hero-slider {
  width: 100%;
  height: 100%;
}

.hero-slider .swiper-wrapper {
  height: 100%;
}

/* Individual slide */
.hero-slide {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Slide background */
.hero-slide__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide__gradient {
  width: 100%;
  height: 100%;
  background: var(--wp--preset--gradient--hero-gradient);
}

.hero-slide__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 2;
}

/* Slide content */
.hero-slide__content {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: var(--wp--preset--spacing--xl) max(5%, 48px);
}

.hero-slide__text {
  max-width: 700px;
}

/* Light text variant (default) */
.hero-slide--light .hero-slide__title,
.hero-slide--light .hero-slide__subtitle {
  color: var(--wp--preset--color--white);
}

/* Dark text variant */
.hero-slide--dark .hero-slide__title {
  color: var(--wp--preset--color--charcoal);
}

.hero-slide--dark .hero-slide__subtitle {
  color: var(--wp--preset--color--slate);
}

.hero-slide--dark .hero-slide__overlay {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
}

/* Typography */
.hero-slide__title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--wp--preset--spacing--md) 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-slide__subtitle,
.hero-slide__content-body {
  font-family: var(--wp--preset--font-family--body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  margin: 0 0 var(--wp--preset--spacing--lg) 0;
  opacity: 0.95;
  max-width: 500px;
}

.hero-slide__content-body p {
  margin: 0 0 0.75rem 0;
}

.hero-slide__content-body p:last-child {
  margin-bottom: 0;
}

.hero-slide__content-body ul,
.hero-slide__content-body ol {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
}

.hero-slide__content-body strong {
  font-weight: 600;
}

/* Hero Navigation - Same style as product sliders */
.hero-slider .hero-nav,
.kosmetix-hero .hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wp--preset--color--white);
  border: none;
  border-radius: var(--wp--custom--radius--pill);
  box-shadow: var(--wp--custom--shadow--md);
  color: var(--wp--preset--color--rose-gold);
  cursor: pointer;
  transition: all var(--wp--custom--transition--fast);
  margin: 0;
  padding: 0;
}

.hero-slider .hero-nav:hover {
  box-shadow: var(--wp--custom--shadow--glow);
  transform: translateY(-50%) scale(1.05);
}

.hero-slider .hero-nav--prev,
.kosmetix-hero .swiper-button-prev.hero-nav {
  left: 32px;
  right: auto;
}

.hero-slider .hero-nav--next,
.kosmetix-hero .swiper-button-next.hero-nav {
  right: 32px;
  left: auto;
}

.hero-nav .material-symbols-rounded {
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

/* Override Swiper default nav arrows */
.hero-slider .swiper-button-prev::after,
.hero-slider .swiper-button-next::after,
.hero-nav.swiper-button-prev::after,
.hero-nav.swiper-button-next::after {
  display: none !important;
  content: none !important;
}

/* Hero Pagination - Centered at bottom */
.hero-slider .hero-pagination,
.kosmetix-hero .hero-pagination {
  position: absolute;
  bottom: 32px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center;
  gap: 10px;
  transform: none !important;
  z-index: 10;
}

.hero-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  opacity: 1;
  margin: 0 !important;
  transition: all 0.3s ease;
}

.hero-pagination .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-pagination .swiper-pagination-bullet-active {
  background: var(--wp--preset--color--white);
  border-color: var(--wp--preset--color--white);
  width: 32px;
  border-radius: 6px;
}

/* Hero responsive - Tablet */
@media (max-width: 1024px) {
  .kosmetix-hero {
    max-width: 100%;
    height: 500px;
    max-height: 500px;
  }

  .hero-nav {
    width: 40px;
    height: 40px;
  }

  .hero-nav--prev {
    left: 16px;
  }

  .hero-nav--next {
    right: 16px;
  }
}

/* Hero responsive - Mobile */
@media (max-width: 768px) {
  .kosmetix-hero {
    height: 420px;
    max-height: 420px;
  }

  .hero-slide__content {
    padding: var(--wp--preset--spacing--lg) var(--wp--preset--spacing--md);
  }

  .hero-slide__text {
    max-width: 100%;
  }

  .hero-nav {
    display: none;
  }

  .hero-pagination {
    bottom: 16px !important;
  }
}

@media (max-width: 480px) {
  .kosmetix-hero {
    height: 360px;
    max-height: 360px;
  }

  .hero-slide__title {
    font-size: 1.75rem;
  }

  .hero-slide__subtitle {
    font-size: 0.95rem;
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--base);
  font-weight: 600;
  letter-spacing: var(--wp--custom--letter-spacing--wide);
  text-decoration: none;
  border-radius: var(--wp--custom--radius--md);
  transition: all var(--wp--custom--transition--normal);
  border: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.5;
}

.btn-hero {
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--rose-gold-dark);
  box-shadow: var(--wp--custom--shadow--md);
}

.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: var(--wp--custom--shadow--xl);
  color: var(--wp--preset--color--rose-gold-dark);
}

.btn-primary {
  background: var(--wp--preset--color--rose-gold);
  color: var(--wp--preset--color--white);
  box-shadow: var(--wp--custom--shadow--sm);
}

.btn-primary:hover {
  background: var(--wp--preset--color--rose-gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--wp--custom--shadow--glow);
}

.btn-outline {
  border: 2px solid var(--wp--preset--color--rose-gold);
  color: var(--wp--preset--color--rose-gold);
  background: transparent;
  padding: 0.75rem 1.875rem;
}

.btn-outline:hover {
  background: var(--wp--preset--color--rose-gold);
  color: var(--wp--preset--color--white);
  box-shadow: var(--wp--custom--shadow--glow);
}

.btn-add-to-cart {
  width: 100%;
  background: var(--wp--preset--color--rose-gold-dark);
  color: var(--wp--preset--color--white);
}

.btn-add-to-cart:hover {
  background: var(--wp--preset--color--rose-gold-dark);
  box-shadow: var(--wp--custom--shadow--glow);
}

.btn-add-to-cart.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-disabled {
  background: var(--wp--preset--color--slate);
  color: var(--wp--preset--color--white);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Secondary button with champagne accent */
.btn-secondary {
  background: var(--wp--preset--color--champagne);
  color: var(--wp--preset--color--charcoal);
}

.btn-secondary:hover {
  background: var(--wp--preset--color--champagne-gold);
}

/* ============================================
   SECTIONS BASE
   ============================================ */

/* Section titles (used across homepage sections) */

.section-title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--wp--preset--spacing--xl);
  color: var(--wp--preset--color--mocha-mousse);
  letter-spacing: var(--wp--custom--letter-spacing--tight);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--wp--preset--spacing--lg);
  flex-wrap: wrap;
  gap: var(--wp--preset--spacing--sm);
}

.section-header .section-title {
  margin-bottom: 0;
  text-align: left;
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */

.kosmetix-categories {
  padding: var(--wp--preset--spacing--2xl) 0;
  background: var(--wp--preset--gradient--blush-fade);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--wp--preset--spacing--md);
}

.category-card {
  position: relative;
  border-radius: var(--wp--custom--radius--xl);
  overflow: hidden;
  background: var(--wp--preset--color--white);
  box-shadow: var(--wp--custom--shadow--sm);
  transition: all var(--wp--custom--transition--normal);
  text-decoration: none;
  display: block;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--wp--custom--shadow--lg);
}

.category-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background: var(--wp--preset--color--blush-light);
}

.category-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--wp--custom--transition--slow);
}

.category-card:hover .category-image img {
  transform: scale(1.08);
}

.category-info {
  padding: var(--wp--preset--spacing--md);
  text-align: center;
}

.category-info h3 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--xl);
  color: var(--wp--preset--color--mocha-mousse);
  margin-bottom: var(--wp--preset--spacing--2xs);
  margin-top: 0;
}

.category-count {
  font-size: var(--wp--preset--font-size--sm);
  color: var(--wp--preset--color--slate);
}

/* ============================================
   PRODUCTS SECTIONS
   ============================================ */

/* Spacing handled by .kosmetix-homepage > section rules */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--wp--preset--spacing--md);
}

.product-card {
  background: var(--wp--preset--color--white);
  border-radius: var(--wp--custom--radius--xl);
  overflow: hidden;
  box-shadow: var(--wp--custom--shadow--sm);
  transition: all var(--wp--custom--transition--normal);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--wp--custom--shadow--lg);
  transform: translateY(-4px);
}

.product-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background: var(--wp--preset--color--blush-light);
}

.product-image a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--wp--custom--transition--slow);
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.badge {
  position: absolute;
  top: var(--wp--preset--spacing--sm);
  padding: 0.375rem 1rem;
  border-radius: var(--wp--custom--radius--pill);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--wp--custom--letter-spacing--wider);
  z-index: 2;
}

.badge-sale {
  left: var(--wp--preset--spacing--sm);
  background: var(--wp--preset--color--error);
  color: var(--wp--preset--color--white);
}

.badge-new {
  right: var(--wp--preset--spacing--sm);
  background: var(--wp--preset--color--rose-gold);
  color: var(--wp--preset--color--white);
}

.product-info {
  padding: var(--wp--preset--spacing--md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--base);
  font-weight: 500;
  margin-bottom: var(--wp--preset--spacing--2xs);
  margin-top: 0;
}

.product-title a {
  color: var(--wp--preset--color--mocha-mousse);
  text-decoration: none;
  transition: color var(--wp--custom--transition--fast);
}

.product-title a:hover {
  color: var(--wp--preset--color--rose-gold);
}

.product-rating {
  margin-bottom: var(--wp--preset--spacing--2xs);
  min-height: 20px;
  color: var(--wp--preset--color--champagne-gold);
}

.product-price {
  font-size: var(--wp--preset--font-size--xl);
  font-weight: 700;
  color: var(--wp--preset--color--rose-gold-dark);
  margin: var(--wp--preset--spacing--sm) 0;
}

.product-price del {
  font-size: var(--wp--preset--font-size--base);
  color: var(--wp--preset--color--slate);
  margin-right: var(--wp--preset--spacing--2xs);
  font-weight: 400;
}

.product-info button {
  margin-top: auto;
}

/* ============================================
   BENEFITS SECTION
   ============================================ */

.kosmetix-benefits {
  padding: var(--wp--preset--spacing--xl) 0;
  background: var(--wp--preset--color--white);
  border-top: 1px solid var(--wp--preset--color--mist);
  border-bottom: 1px solid var(--wp--preset--color--mist);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--wp--preset--spacing--lg);
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--md);
}

.benefit-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wp--preset--gradient--rose-subtle);
  border-radius: var(--wp--custom--radius--pill);
  color: var(--wp--preset--color--rose-gold);
}

.benefit-icon svg {
  width: 24px;
  height: 24px;
}

.benefit-content h4 {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--base);
  font-weight: 600;
  margin-bottom: 0.25rem;
  margin-top: 0;
  color: var(--wp--preset--color--mocha-mousse);
}

.benefit-content p {
  font-size: var(--wp--preset--font-size--sm);
  color: var(--wp--preset--color--slate);
  margin: 0;
}

/* ============================================
   SWIPER SLIDER (BESTSELLERS)
   ============================================ */

.products-slider {
  overflow: hidden;
  position: relative;
  padding: 0 0 3rem 0;
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide {
  height: auto;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--wp--preset--color--rose-gold);
  background: var(--wp--preset--color--white);
  width: 48px;
  height: 48px;
  border-radius: var(--wp--custom--radius--pill);
  box-shadow: var(--wp--custom--shadow--md);
  transition: all var(--wp--custom--transition--fast);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  box-shadow: var(--wp--custom--shadow--glow);
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 18px;
  font-weight: 700;
}

.swiper-pagination-bullet {
  background: var(--wp--preset--color--rose-gold-light);
  opacity: 0.5;
  width: 10px;
  height: 10px;
}

.swiper-pagination-bullet-active {
  background: var(--wp--preset--color--rose-gold);
  opacity: 1;
}

/* Fix: Storefront sets margin-left: 3em on ul elements - swiper-wrapper is ul. 
   Apply globally to ensure correct alignment on all breakpoints. */
.products-slider .swiper-wrapper {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Force nav buttons visible even when Swiper locks them */
.products-slider .swiper-button-lock {
  display: flex !important;
}

/* ============================================
   MOBILE SINGLE PRODUCT VIEW
   One product centered, no peek effect
   ============================================ */
@media (max-width: 639px) {
  /* Remove container padding for slider sections to get true edge-to-edge */
  .kosmetix-new-arrivals > .container,
  .kosmetix-bestsellers > .container,
  .kosmetix-wishlist-showcase > .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .products-slider .swiper {
    overflow: hidden;
    padding: 0;
  }

  .products-slider .swiper-slide {
    transition: opacity 0.3s ease;
  }

  /* Hide inactive slides completely */
  .products-slider .swiper-slide:not(.swiper-slide-active) {
    opacity: 0;
  }

  .products-slider .swiper-slide-active {
    opacity: 1;
  }

  /* Hide nav arrows on small mobile - use swipe */
  .products-slider .swiper-button-next,
  .products-slider .swiper-button-prev {
    display: none !important;
  }
}

/* Ultra-small phones (iPhone SE, etc) */
@media (max-width: 375px) {
  .hero-slide__content {
    padding: var(--wp--preset--spacing--md) 10px;
  }

  .kosmetix-homepage > section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--wp--preset--color--warm-alabaster);
  border-left: 1px solid rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background-color: var(--wp--preset--color--mist);
  border-radius: 5px;
  border: 2px solid var(--wp--preset--color--warm-alabaster);
  transition: background-color 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--wp--preset--color--rose-gold);
}

/* ============================================
   SOCIAL PROOF SECTION (Testimonials + Instagram)
   ============================================ */

.kosmetix-social-proof {
  padding: var(--wp--preset--spacing--xl) 0;
  background: var(--wp--preset--color--white);
  border-top: 1px solid var(--wp--preset--color--mist);
  border-bottom: 1px solid var(--wp--preset--color--mist);
}

.social-proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wp--preset--spacing--xl);
}

@media (min-width: 768px) {
  .social-proof-grid {
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
  }
}

.section-title--left {
  text-align: left;
  margin-bottom: var(--wp--preset--spacing--lg);
}

/* Testimonials */
.testimonials-section {
  padding-right: var(--wp--preset--spacing--lg);
  overflow: hidden;
  min-width: 0;
}

.testimonials-carousel {
  padding-bottom: var(--wp--preset--spacing--lg);
  overflow: hidden;
}

.testimonial-card {
  background: var(--wp--preset--color--white);
  padding: var(--wp--preset--spacing--lg);
  border-radius: var(--wp--custom--radius--xl);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.testimonial-rating {
  display: flex;
  gap: 4px;
  margin-bottom: var(--wp--preset--spacing--sm);
}

.testimonial-text {
  font-family: var(--wp--preset--font-family--accent);
  font-size: var(--wp--preset--font-size--lg);
  font-style: italic;
  color: var(--wp--preset--color--charcoal);
  line-height: var(--wp--custom--line-height--relaxed);
  margin: 0 0 var(--wp--preset--spacing--md) 0;
  padding: 0;
  border: none;
}

.testimonial-author {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--sm);
  font-style: normal;
  color: var(--wp--preset--color--slate);
  font-weight: 500;
}

.testimonial-product {
  display: block;
  margin-top: var(--wp--preset--spacing--sm);
  font-size: var(--wp--preset--font-size--xs);
  color: var(--wp--preset--color--rose-gold);
  text-decoration: none;
  transition: color var(--wp--custom--transition--fast);
}

.testimonial-product:hover {
  color: var(--wp--preset--color--rose-gold-dark);
  text-decoration: underline;
}

/* Instagram CTA */
.instagram-cta {
  display: flex;
  justify-content: center;
}

.instagram-cta__content {
  background: linear-gradient(
    135deg,
    var(--wp--preset--color--rose-gold) 0%,
    var(--wp--preset--color--rose-gold-dark) 100%
  );
  color: var(--wp--preset--color--white);
  padding: var(--wp--preset--spacing--xl);
  border-radius: var(--wp--custom--radius--2xl);
  text-align: center;
  max-width: 320px;
  box-shadow: var(--wp--custom--shadow--lg);
}

.instagram-cta__icon {
  margin-bottom: var(--wp--preset--spacing--md);
  opacity: 0.9;
}

.instagram-cta__title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--xl);
  font-weight: 600;
  margin: 0 0 var(--wp--preset--spacing--sm) 0;
}

.instagram-cta__text {
  font-size: var(--wp--preset--font-size--sm);
  color: rgba(255, 255, 255, 0.95);
  line-height: var(--wp--custom--line-height--relaxed);
  margin: 0 0 var(--wp--preset--spacing--lg) 0;
}

.instagram-cta__button {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--xs);
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--rose-gold-dark);
  font-weight: 600;
  padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--lg);
  border-radius: var(--wp--custom--radius--pill);
  text-decoration: none;
  transition: all var(--wp--custom--transition--fast);
}

.instagram-cta__button:hover {
  transform: translateY(-2px);
  box-shadow: var(--wp--custom--shadow--md);
  color: var(--wp--preset--color--rose-gold-dark);
}

.instagram-cta__stats {
  display: flex;
  justify-content: center;
  gap: var(--wp--preset--spacing--lg);
  margin-top: var(--wp--preset--spacing--lg);
  padding-top: var(--wp--preset--spacing--md);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.instagram-stat {
  text-align: center;
}

.instagram-stat__number {
  display: block;
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--xl);
  font-weight: 600;
}

.instagram-stat__label {
  font-size: var(--wp--preset--font-size--xs);
  opacity: 0.8;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.kosmetix-newsletter {
  padding: var(--wp--preset--spacing--xl) 0;
  background: var(--wp--preset--color--white);
}

.newsletter-card {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--wp--preset--spacing--2xl);
  background: var(--wp--preset--color--white);
  border-radius: var(--wp--custom--radius--2xl);
  border: 1px solid rgba(0, 0, 0, 0.08); /* Spójne z testimonial-card */
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06); /* Spójne z testimonial-card */
  text-align: center;
}

.newsletter-content {
  max-width: 100%;
}

.newsletter-content h2 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: var(--wp--preset--spacing--sm);
  color: var(--wp--preset--color--charcoal); /* Ciemny tekst */
}

.newsletter-content > p {
  font-size: var(--wp--preset--font-size--lg);
  margin-bottom: var(--wp--preset--spacing--lg);
  color: var(--wp--preset--color--slate);
  line-height: var(--wp--custom--line-height--relaxed);
}

.newsletter-form {
  margin-bottom: var(--wp--preset--spacing--md);
}

.newsletter-form__inner {
  display: flex;
  gap: var(--wp--preset--spacing--sm);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0 1.5rem;
  border: 1px solid var(--wp--preset--color--mist);
  border-radius: var(--wp--custom--radius--md);
  font-size: var(--wp--preset--font-size--base);
  font-family: var(--wp--preset--font-family--body);
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--charcoal);
  transition: all var(--wp--custom--transition--fast);
  height: 44px; /* Default button height */
}

.newsletter-input::placeholder {
  color: var(--wp--preset--color--slate-light);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--wp--preset--color--rose-gold);
  box-shadow: 0 0 0 3px var(--wp--preset--color--rose-gold-light);
}

.newsletter-message {
  padding: var(--wp--preset--spacing--sm);
  border-radius: var(--wp--custom--radius--md);
  margin-bottom: var(--wp--preset--spacing--sm);
}

.newsletter-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.newsletter-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.newsletter-disclaimer {
  font-size: var(--wp--preset--font-size--xs);
  color: var(--wp--preset--color--slate-light);
  margin: 0;
}

.newsletter-disclaimer a {
  color: var(--wp--preset--color--slate);
  text-decoration: underline;
}

.newsletter-disclaimer a:hover {
  color: var(--wp--preset--color--rose-gold);
}

@media (max-width: 767px) {
  .newsletter-form__inner {
    flex-direction: column;
  }
}

/* ============================================
   CARDS WITH GLASS EFFECT
   ============================================ */

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--wp--custom--radius--xl);
  box-shadow: var(--wp--custom--shadow--glass);
}

/* ============================================
   PREMIUM BADGES
   ============================================ */

.badge-premium {
  background: linear-gradient(
    135deg,
    var(--wp--preset--color--champagne-gold) 0%,
    var(--wp--preset--color--champagne) 100%
  );
  color: var(--wp--preset--color--charcoal);
}

.badge-bestseller {
  background: var(--wp--preset--color--rose-gold);
  color: var(--wp--preset--color--white);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.875rem;
  }

  .section-header {
    flex-direction: column;
    text-align: center;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--wp--preset--spacing--sm);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--wp--preset--spacing--sm);
  }

  .newsletter-form {
    flex-direction: column;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--md);
  }

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

  /* Edge-to-edge sliders on mobile/tablet */
  .kosmetix-new-arrivals,
  .kosmetix-bestsellers,
  .kosmetix-wishlist-showcase {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .kosmetix-new-arrivals > .container,
  .kosmetix-bestsellers > .container,
  .kosmetix-wishlist-showcase > .container {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .btn {
    padding: 0.75rem 1.75rem;
    font-size: 0.9375rem;
  }

  .categories-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

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

  .category-info h3 {
    font-size: var(--wp--preset--font-size--lg);
  }

  /* Edge-to-edge sliders on mobile */
  .kosmetix-new-arrivals,
  .kosmetix-bestsellers,
  .kosmetix-wishlist-showcase {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .kosmetix-new-arrivals > .container,
  .kosmetix-bestsellers > .container,
  .kosmetix-wishlist-showcase > .container {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.skeleton-loader {
  background: linear-gradient(
    90deg,
    var(--wp--preset--color--mist) 25%,
    var(--wp--preset--color--blush-light) 50%,
    var(--wp--preset--color--mist) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================
   ICON-ONLY ADD TO CART BUTTON (< 960px)
   ============================================ */
@media (max-width: 959px) {
  /* Target loop add to cart buttons only */
  li.product .add_to_cart_button.button {
    font-size: 0 !important;
    padding: 0 !important;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-top: 0.5rem; /* Ensure some spacing if needed */
    position: relative;
  }

  /* Use ::before for the icon to overwrite any existing theme icon and leave ::after for loading spinner */
  li.product .add_to_cart_button.button::before {
    content: 'shopping_cart';
    font-family: 'Material Symbols Outlined';
    font-size: 20px;
    line-height: 1;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    color: inherit;
    margin-right: 0;
    display: block !important;
  }

  /* Ensure ::after is hidden unless it's the loading spinner */
  li.product .add_to_cart_button.button:not(.loading)::after {
    content: none !important;
    display: none !important;
  }
}
