/*
Theme Name: LadyCakery
Theme URI: https://ladycakery.nl
Author: Codeoptimist
Author URI: https://www.shahiemseymor.com
Description: A custom WordPress theme for LadyCakery bakery in Almere. Features American bakery items, gelato, espresso bar, and custom cakes with modern animations and responsive design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ladycakery
Tags: one-column, custom-menu, custom-logo, translation-ready, bakery, cafe, food

LadyCakery is a custom WordPress theme designed for a bakery in Almere.
It features a modern design with animations, custom fonts, and responsive layout.
Built with Tailwind CSS for modern styling and smooth interactions.
*/

/* Font definitions */
body {
  font-family: "Poppins", sans-serif;
}

.display-font {
  font-family: "Archivo Black", sans-serif;
}

.chubby-font {
  font-family: "Titan One", cursive;
}

.titan-font {
  font-family: "Titan One", cursive;
}

/* Cart icon swing animation */
@keyframes cartSwing {
  0%,
  100% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(15deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  60% {
    transform: rotate(5deg);
  }
  80% {
    transform: rotate(-5deg);
  }
}

.cart-swing {
  animation: cartSwing 0.8s ease-in-out;
  transform-origin: center top;
}

/* Sticky header padding adjustments */
@media (max-width: 768px) {
  /* Remove default body padding to eliminate white space */
  body {
    padding-top: 0 !important;
    margin: 0 !important;
  }

  /* Fix mobile navigation */
  nav {
    padding: 0 !important;
  }

  /* Mobile logo adjustments */
  nav img.h-20 {
    height: 60px !important;
    margin-top: 0 !important;
  }

  /* Mobile button adjustments */
  nav a[href="/assortiment/"] {
    padding: 8px 12px !important;
    font-size: 14px !important;
  }

  /* Mobile cart button */
  nav a[href="/winkelwagen/"] {
    width: 36px !important;
    height: 36px !important;
  }

  /* Mobile cart count */
  .cart-count {
    width: 18px !important;
    height: 18px !important;
    font-size: 10px !important;
    top: -8px !important;
    right: -8px !important;
  }

  /* Mobile notice banner */
  [class*="bg-[#d78bb3]"]:not(button) {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* Remove extra spacing */
  section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Prevent horizontal scroll globally */
html {
  overflow-x: hidden;
}

/* Ensure sections account for sticky header */
section {
  scroll-margin-top: 120px;
}

@media (max-width: 768px) {
  section {
    scroll-margin-top: 140px;
  }
}

/* Hero text animations */
.hero-title {
  animation: elegantSlide 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 0;
}

.hero-subtitle {
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  animation: fadeInUp 0.5s ease-out 0.4s forwards;
  opacity: 0;
}

@keyframes elegantSlide {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Split text animation for title */
.split-text {
  display: inline-block;
}

.split-text span {
  display: inline-block;
  animation: smoothChar 0.4s ease-out forwards;
  opacity: 0;
}

@keyframes smoothChar {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing effect for subtitle */
.typing-text {
  overflow: hidden;
  white-space: nowrap;
  animation: typing 2.5s steps(40, end) forwards;
  border-right: 3px solid #5a3b2d;
  animation:
    typing 2.5s steps(40, end) forwards,
    blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #5a3b2d;
  }
}

/* Cookie Notice Styles */
#cookie-notice {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(215, 139, 179, 0.2);
  transition: transform 0.5s ease-out;
}

#cookie-notice.translate-y-0 {
  transform: translateY(0);
}

#cookie-notice.translate-y-full {
  transform: translateY(100%);
}

/* Navigation Styles */
.site-header {
  background: rgba(245, 230, 224, 0.95);
  backdrop-filter: blur(10px);
}

/* Order Notice Banner */
.order-notice {
  background: #d78bb3;
  color: white;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid;
}

/* Button Hover Effects */
.btn-hover-group {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-hover-group .btn-bg-overlay {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-out;
}

.btn-hover-group:hover .btn-bg-overlay {
  transform: scaleX(1);
}

/* Product Card Hover Effects */
.product-card-hover {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.product-card-hover:hover {
  transform: translateX(-8px) translateY(-8px);
}

.product-card-hover .product-image-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card-hover:hover .product-image-overlay {
  opacity: 1;
  position: relative;
}

/* Popover Menu Styles */
#popover-menu {
  position: absolute;
  top: 3rem;
  right: 0;
  z-index: 50;
}

#popover-content {
  background: #5a3b2d;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(90, 75, 61, 0.2);
  overflow: hidden;
  min-width: 16rem;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.2s ease;
}

#popover-content.scale-100 {
  transform: scale(1);
  opacity: 1;
}

#popover-content.scale-95 {
  transform: scale(0.95);
  opacity: 0;
}

/* Menu Items */
.popover-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #5a3b2d;
  color: white;
  transition: all 0.3s ease;
}

.popover-menu-item:hover {
  background: #4a2f1f;
}

.popover-menu-item svg {
  transition: transform 0.3s ease;
}

.popover-menu-item:hover svg {
  transform: translateX(4px);
}

/* Icon Rotation for Menu Toggle */
.rotate-0 {
  transform: rotate(0deg);
}

.rotate-90 {
  transform: rotate(90deg);
}

/* Footer Styles */
.site-footer {
  background: #969f71;
  border-radius: 1rem;
  overflow: hidden;
}

.footer-image-bg {
  position: relative;
  block-size: cover;
}

.footer-content {
  padding: 6rem 2rem;
}

/* Opening Hours Highlight */
.opening-hours-day {
  transition: all 0.2s ease;
}

.opening-hours-day.current-day {
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

/* Social Links */
.social-links a {
  color: white;
  transition: opacity 0.2s ease;
}

.social-links a:hover {
  opacity: 0.75;
}

/* ── Entry Content (Block Editor / page.php) ─────────────────────────── */
.entry-content {
  line-height: 1.75;
  color: #5a4a42;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: #5a3b2d;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.entry-content h1 {
  font-size: 2rem;
}
.entry-content h2 {
  font-size: 1.5rem;
  padding-bottom: 0.4rem;
}
.entry-content h3 {
  font-size: 1.25rem;
}
.entry-content h4 {
  font-size: 1.1rem;
}

.entry-content p {
  margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.entry-content ul,
.entry-content .wp-block-list {
  list-style-type: disc;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content li {
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}

.entry-content strong,
.entry-content b {
  font-weight: 700;
  color: #5a3b2d;
}

.entry-content em,
.entry-content i {
  font-style: italic;
}

.entry-content a {
  color: #d78bb3;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.entry-content a:hover {
  color: #c77aa2;
}

.entry-content blockquote {
  border-left: 4px solid #d78bb3;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #5a4a42;
}

.entry-content hr {
  border: none;
  border-top: 2px solid #e8d5d0;
  margin: 2rem 0;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1rem 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid #e8d5d0;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.entry-content th {
  background: #f5e6e0;
  font-weight: 600;
  color: #5a3b2d;
}

/* WordPress-specific styles that Tailwind doesn't cover */
.wp-caption,
.wp-caption-text,
.sticky,
.gallery-caption,
.bypostauthor {
  font-size: inherit;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: 1rem;
}

.alignright {
  float: right;
  margin-left: 1rem;
}

/* Screen reader text - WordPress accessibility */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Custom Logo Styles */
.custom-logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  transition:
    max-height 0.3s ease-in-out,
    margin-top 0.3s ease-in-out;
}

/* Smooth transitions for scroll effects */
nav {
  box-shadow: none;
  transition:
    padding 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out,
    border-color 0.3s ease-in-out;
}

nav.border-b {
  border-bottom: 1px solid rgba(90, 59, 45, 0.2);
}

nav.no-shadow {
  box-shadow: none !important;
}

nav > div {
  transition: padding 0.3s ease-in-out;
}

nav img {
  transition:
    height 0.3s ease-in-out,
    margin-top 0.3s ease-in-out;
}

/* WordPress admin bar adjustment */
nav.sticky.admin-bar-active {
  top: 32px !important;
}

body.admin-bar {
  padding-top: 0 !important;
}

body.pt-\[112px\] {
  padding-top: 112px !important;
}

body.pt-\[80px\] {
  padding-top: 80px !important;
}

@media screen and (max-width: 782px) {
  nav.sticky.admin-bar-active {
    top: 46px !important;
  }

  body.pt-\[112px\] {
    padding-top: 126px !important;
  }
}

/* Simple Fade-in Animation */
.fade-in {
  animation: fadeIn 1s ease-out 0.5s forwards;
  opacity: 0;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

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

  .product-card-hover {
    width: 100%;
    max-width: 300px;
  }
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Products desktop grid (Swiper disabled on ≥1024px) */
.products-desktop-grid {
  overflow: visible !important;
  width: 100% !important;
}

.products-desktop-grid .swiper-wrapper {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 250px)) !important;
  justify-content: center !important;
  gap: 2rem !important;
  overflow: visible !important;
  width: 100% !important;
  transform: none !important;
  align-items: start !important;
}

.products-desktop-grid .swiper-slide {
  width: 250px !important;
  max-width: 250px !important;
  min-width: 250px !important;
  margin: 0 !important;
  height: auto !important;
  display: block !important;
}

.products-desktop-grid .product-card {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

.products-desktop-grid .swiper-slide:nth-child(n+5) {
  display: none !important;
}

/* Pagination styling */
.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-numbers li {
  display: flex;
}

.page-numbers a,
.page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  background-color: transparent;
  border: 1px solid transparent;
  text-decoration: none;
}

.page-numbers a {
  color: #5a3b2d;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.page-numbers a:hover {
  background-color: #5a3b2d;
  color: #fff;
}

.page-numbers a:hover svg {
  stroke: #fff;
}

.page-numbers .current {
  background-color: #d78bb3;
  color: #fff;
  border-color: #d78bb3;
}

.page-numbers .dots {
  min-width: 24px;
  color: #5a4a42;
}

.page-numbers .prev,
.page-numbers .next {
  padding: 0 16px;
}

.page-numbers .prev a:hover,
.page-numbers .next a:hover {
  color: #fff;
}

.page-numbers .prev a:hover svg,
.page-numbers .next a:hover svg {
  stroke: #fff;
}
