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

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  min-height: 100vh;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Header styles */
/* Base Styles & Variables */
  :root {
    --primary: #2a3f65;
    --secondary: #e85a4f;
    --accent: #f3c677;
    --text: #333;
    --text-light: #666;
    --background: #f9f9f9;
    --white: #fff;
    --dark-bg: #1a2639;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --radius: 4px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Montserrat', sans-serif;
  }

  /* Header Structure */
  .header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 100;
  }

  .header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    position: relative;
  }

  /* Logo Styles */
  .logo-container {
    display: flex;
    align-items: center;
  }

  .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
  }

  .logo:hover {
    transform: translateY(-2px);
  }

  .logo-icon {
    font-size: 1.5rem;
    margin-right: var(--spacing-xs);
    display: inline-block;
    transform: rotate(-10deg);
  }

  .logo-text {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  /* Desktop Navigation */
  .desktop-nav {
    justify-self: center;
    margin-left: var(--spacing-xl);
  }

  .nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: var(--spacing-md);
  }

  .nav-item {
    position: relative;
  }

  .nav-link {
    font-family: var(--font-secondary);
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: var(--transition);
    position: relative;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
    transform: translateX(-50%);
  }

  .nav-link:hover {
    color: var(--secondary);
  }

  .nav-link:hover::after {
    width: 70%;
  }

  .nav-link.active {
    color: var(--secondary);
  }

  .nav-link.active::after {
    width: 70%;
  }

  /* Header Actions */
  .header-actions {
    display: flex;
    gap: var(--spacing-md);
  }

  .action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--text);
    transition: var(--transition);
    position: relative;
  }

  .action-button:hover {
    background-color: rgba(42, 63, 101, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
  }

  /* Mobile Toggle Button */
  .mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
  }

  .toggle-line {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    transition: var(--transition);
  }

  /* Mobile Menu */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--dark-bg);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-xl);
    overflow-y: auto;
  }

  .mobile-menu.active {
    transform: translateX(0);
  }

  .close-menu {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: var(--spacing-sm);
  }

  .mobile-nav {
    margin-top: var(--spacing-xl);
  }

  .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-nav-item {
    margin-bottom: var(--spacing-lg);
  }

  .mobile-nav-link {
    color: var(--white);
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    text-decoration: none;
    display: block;
    padding: var(--spacing-sm) 0;
    transition: var(--transition);
  }

  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    color: var(--accent);
    transform: translateX(var(--spacing-sm));
  }

  .mobile-actions {
    margin-top: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .mobile-action-button {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: var(--spacing-md);
    text-align: center;
    text-decoration: none;
    font-family: var(--font-secondary);
    transition: var(--transition);
  }

  .mobile-action-button:hover {
    background-color: var(--secondary);
  }

  /* Responsive Styles */
  @media (max-width: 1024px) {
    .desktop-nav .nav-list {
      gap: var(--spacing-sm);
    }
    
    .nav-link {
      font-size: 0.85rem;
    }
  }

  @media (max-width: 768px) {
    .header-container {
      grid-template-columns: auto auto;
      justify-content: space-between;
    }
    
    .desktop-nav {
      display: none;
    }
    
    .mobile-toggle {
      display: flex;
    }
    
    .header-actions {
      display: none;
    }
  }

/* Footer styles */
/* Base Footer Styles */
  .footer-container {
    width: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f0f0f0;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
  }

  /* Content Layout */
  .footer-content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
  }

  .footer-section-main {
    grid-column: span 3;
  }

  .footer-section-categories {
    grid-column: span 3;
  }

  .footer-section-contact {
    grid-column: span 3;
  }

  .footer-section-newsletter {
    grid-column: span 3;
  }

  /* Section Styling */
  .footer-section {
    position: relative;
  }

  .footer-heading {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    color: #e6e6e6;
  }

  .footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background: #ff6b6b;
    border-radius: 2px;
  }

  /* Links Section */
  .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .footer-links li {
    margin-bottom: 0.8rem;
  }

  .footer-link {
    color: #c8c8c8;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
  }

  .footer-link:hover {
    color: #ff6b6b;
    padding-left: 8px;
  }

  .footer-link::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 0;
    height: 2px;
    background: #ff6b6b;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-50%);
  }

  .footer-link:hover::before {
    width: 10px;
    left: 0;
    opacity: 1;
  }

  /* Categories Grid */
  .footer-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .footer-category-item {
    color: #c8c8c8;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    overflow: hidden;
  }

  .footer-category-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
    transform: scaleX(0.3);
    transform-origin: left;
  }

  .footer-category-item:hover {
    color: #ff6b6b;
  }

  .footer-category-item:hover::after {
    transform: scaleX(1);
    background: rgba(255,107,107,0.3);
  }

  /* Contact Section */
  .footer-contact-info {
    margin-bottom: 1.5rem;
  }

  .footer-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #c8c8c8;
  }

  .footer-contact-item i {
    margin-right: 10px;
    color: #ff6b6b;
    width: 16px;
    text-align: center;
  }

  /* Social Icons */
  .footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .footer-social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .footer-social-item:hover {
    background: #ff6b6b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,107,107,0.3);
  }

  /* Newsletter Section */
  .footer-newsletter-text {
    color: #c8c8c8;
    margin-bottom: 1.2rem;
    line-height: 1.6;
  }

  .footer-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }

  .footer-newsletter-input {
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: #f0f0f0;
    font-family: inherit;
  }

  .footer-newsletter-input::placeholder {
    color: rgba(255,255,255,0.5);
  }

  .footer-newsletter-input:focus {
    outline: none;
    background: rgba(255,255,255,0.15);
  }

  .footer-newsletter-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    background: #ff6b6b;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
  }

  .footer-newsletter-button:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255,107,107,0.3);
  }

  /* Bottom Section */
  .footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
  }

  .footer-legal {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-legal-link {
    color: #c8c8c8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
  }

  .footer-legal-link:hover {
    color: #ff6b6b;
  }

  .footer-copyright {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
  }

  /* Decorative Elements */
  .footer-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
  }

  .footer-decoration-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  }

  .footer-decoration-element:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -50px;
  }

  .footer-decoration-element:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: 10%;
  }

  .footer-decoration-element:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 30%;
    left: 60%;
  }

  /* Responsive Styles */
  @media (max-width: 1024px) {
    .footer-content {
      grid-template-columns: repeat(6, 1fr);
    }
    
    .footer-section-main {
      grid-column: span 3;
    }
    
    .footer-section-categories {
      grid-column: span 3;
    }
    
    .footer-section-contact {
      grid-column: span 3;
      margin-top: 2rem;
    }
    
    .footer-section-newsletter {
      grid-column: span 3;
      margin-top: 2rem;
    }
  }

  @media (max-width: 768px) {
    .footer-content {
      grid-template-columns: 1fr;
    }
    
    .footer-section {
      grid-column: span 1;
      margin-bottom: 2rem;
    }
    
    .footer-section-main,
    .footer-section-categories,
    .footer-section-contact,
    .footer-section-newsletter {
      grid-column: span 1;
      margin-top: 0;
    }
    
    .footer-legal {
      flex-direction: column;
      gap: 1rem;
    }
  }

/* Cookie Banner styles */
#ksiazki-cookie-consent {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #f8f5f1 !important;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    font-family: 'Roboto', 'Open Sans', sans-serif;
  }

  .cookie-content-container {
    max-width: 1200px !important;
    margin: 0 auto;
    padding: 18px 25px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
  }

  .cookie-info-text {
    color: #333333;
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 15px 0;
    text-align: center;
  }

  .cookie-policy-link {
    color: #5d4037;
    text-decoration: underline;
    font-weight: 600;
  }

  .cookie-policy-link:hover {
    color: #8d6e63;
  }

  .cookie-buttons-wrapper {
    display: flex !important;
    gap: 15px;
    margin-top: 5px;
  }

  .cookie-btn {
    padding: 10px 22px !important;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
  }

  .cookie-reject {
    background-color: #e0e0e0 !important;
    color: #424242;
    border: 1px solid #bdbdbd;
  }

  .cookie-reject:hover {
    background-color: #d5d5d5 !important;
  }

  .cookie-accept {
    background-color: #5d4037 !important;
    color: #ffffff;
    border: 1px solid #5d4037;
  }

  .cookie-accept:hover {
    background-color: #4e342e !important;
  }

  @media (min-width: 768px) {
    .cookie-content-container {
      flex-direction: row !important;
      justify-content: space-between;
      align-items: center;
    }

    .cookie-info-text {
      margin-right: 20px;
      margin-bottom: 0 !important;
      text-align: left;
    }

    .cookie-buttons-wrapper {
      flex-shrink: 0;
      margin-top: 0;
    }
  }

  @media (max-width: 767px) {
    .cookie-btn {
      padding: 8px 16px !important;
      font-size: 14px;
    }
    
    .cookie-info-text {
      font-size: 14px;
    }
  }