/**
 * Open Sky Press - Main Stylesheet
 * Includes Tailwind CSS utilities and custom styles
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
  --background: #faf9f7;
  --background-warm: #fefcf9;
  --foreground: #1a1a1a;
  --accent-warm: #d4a574;
  --accent-warm-light: #e8c9a0;
  --accent-warm-dark: #b8915a;
  --warm-white: #fefcf9;
  --warm-white-soft: #faf9f7;
  --warm-white-border: rgba(212, 165, 116, 0.15);
}

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

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--warm-white-soft);
  color: var(--foreground);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga' 1, 'kern' 1;
  text-rendering: optimizeLegibility;
}

/* Glassmorphism utility classes */
.glass {
  background: rgba(254, 252, 249, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--warm-white-border);
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
}

.glass-strong {
  background: rgba(254, 252, 249, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--warm-white-border);
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
}

.glass-button {
  background: rgba(254, 252, 249, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--warm-white-border);
  border-radius: 16px;
  padding: 12px 24px;
  transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  cursor: pointer;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
}

.glass-button:hover {
  background: rgba(254, 252, 249, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
  border-color: rgba(212, 165, 116, 0.25);
}

.glass-button:active {
  transform: translateY(0);
}

/* Rounded corners */
.rounded-soft {
  border-radius: 20px;
}

.rounded-strong {
  border-radius: 24px;
}

/* Soft glow effect - gentle grey */
.soft-glow {
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

.soft-glow-hover:hover {
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes letterByLetter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Letter by letter animation */
.letter-animate {
  display: inline-block;
  opacity: 0;
  animation: letterByLetter 0.1s ease-out forwards;
}

/* Smooth transitions */
.transition-smooth {
  transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Haptic feedback simulation */
.haptic {
  transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.haptic:active {
  transform: scale(0.98);
}

/* Remove default body padding - handled by layout */
body {
  padding: 0;
  margin: 0;
  background: var(--warm-white-soft);
}

/* Hamburger Menu Button - Round, Soft, Visible */
.hamburger-button {
  background: rgba(254, 252, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(212, 165, 116, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(212, 165, 116, 0.1) inset;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hamburger-button:hover {
  background: rgba(254, 252, 249, 0.95);
  border-color: rgba(212, 165, 116, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(212, 165, 116, 0.15) inset;
  transform: scale(1.05);
}

.hamburger-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(212, 165, 116, 0.2) inset;
}

.hamburger-button .menu-line {
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Cart Icon Button - Round, Soft, Similar to Hamburger */
.cart-icon-button {
  background: rgba(254, 252, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(212, 165, 116, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(212, 165, 116, 0.1) inset;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  text-decoration: none;
  color: inherit;
}

.cart-icon-button:hover {
  background: rgba(254, 252, 249, 0.95);
  border-color: rgba(212, 165, 116, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(212, 165, 116, 0.15) inset;
  transform: scale(1.05);
}

.cart-icon-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(212, 165, 116, 0.2) inset;
}

.cart-count-badge {
  font-size: 0.75rem;
  line-height: 1;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Cart Notification Popup */
.cart-notification {
  position: fixed;
  top: 6rem;
  right: 1.5rem;
  z-index: 1000;
  background: rgba(254, 252, 249, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--warm-white-border);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  max-width: 300px;
}

.cart-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.cart-notification.hide {
  opacity: 0;
  transform: translateX(100%);
}

.cart-notification-message {
  font-size: 0.95rem;
  color: var(--foreground);
  margin: 0;
}

.cart-notification-product {
  font-weight: 600;
  color: var(--accent-warm);
  margin-top: 0.25rem;
}

/* Custom easing for animations */
.ease-custom {
  transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
}

.ease-spring {
  transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Enso circle animation */
.enso-circle {
  animation: ensoDraw 2.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s forwards;
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  opacity: 0;
}

@keyframes ensoDraw {
  to {
    stroke-dashoffset: 0;
    opacity: 0.94;
  }
}

/* Language selector */
.language-selector {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.language-flag {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.language-flag:hover {
  transform: scale(1.05);
}

.language-flag.active {
  ring: 2px;
  ring-color: var(--accent-warm);
  ring-offset: 2px;
}

/* Product card hover effect */
.product-card {
  cursor: pointer;
  border-radius: 0.75rem;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(20px);
  animation: productFadeIn 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.product-card-fade-in {
  animation: productFadeIn 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

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

.product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.product-cover-container {
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-card:hover .product-cover-container {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

.product-hover-info {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Modern search bar */
.modern-search {
  background: var(--warm-white);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--warm-white-border);
}

.modern-search:focus {
  background: var(--warm-white);
  box-shadow: 0 4px 20px rgba(212, 165, 116, 0.15);
  border-color: rgba(212, 165, 116, 0.3);
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--warm-white);
  border-radius: 2rem;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 101;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--warm-white-border);
}

.modal-overlay.active .modal-content {
  transform: translate(-50%, -50%) scale(1);
}

.product-modal-content {
  max-width: 1200px;
  padding: 3rem;
}

.pdf-modal-content {
  max-width: 1000px;
  padding: 2rem;
}

/* Product Tabs */
.product-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--warm-white-border);
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.product-tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  color: var(--foreground);
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  position: relative;
  bottom: -2px;
}

.product-tab:hover {
  color: var(--accent-warm);
}

.product-tab.active {
  color: var(--accent-warm);
  border-bottom-color: var(--accent-warm);
  font-weight: 600;
}

.product-tab-content {
  display: none;
  padding: 1.5rem 0;
}

.product-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.product-info-table {
  width: 100%;
  border-collapse: collapse;
}

.product-info-table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--warm-white-border);
}

.product-info-table td:first-child {
  font-weight: 600;
  width: 40%;
  color: var(--foreground);
}

.product-info-table td:last-child {
  color: var(--foreground);
}

/* Buy Now Modal */
.buy-now-modal-content {
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem;
  background: var(--warm-white);
  border: 1px solid var(--warm-white-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.buy-now-form-section {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: var(--warm-white-soft);
  border-radius: 1.25rem;
  border: 1px solid var(--warm-white-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.buy-now-form-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  color: var(--foreground);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--warm-white-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.buy-now-form-group {
  margin-bottom: 1.75rem;
}

.buy-now-form-group:last-child {
  margin-bottom: 0;
}

.buy-now-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.buy-now-form-group input,
.buy-now-form-group select,
.buy-now-form-group textarea {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 2px solid var(--warm-white-border);
  border-radius: 0.75rem;
  background: var(--warm-white);
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  color: var(--foreground);
  font-family: inherit;
}

.buy-now-form-group input:focus,
.buy-now-form-group select:focus,
.buy-now-form-group textarea:focus {
  outline: none;
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
  background: var(--warm-white);
}

.buy-now-form-group input:hover,
.buy-now-form-group select:hover,
.buy-now-form-group textarea:hover {
  border-color: rgba(212, 165, 116, 0.4);
  background: var(--warm-white);
}

.buy-now-form-group input::placeholder,
.buy-now-form-group textarea::placeholder {
  color: #9ca3af;
}

.buy-now-form-group textarea {
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  line-height: 1.5;
}

.payment-method-option {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  border: 2px solid var(--warm-white-border);
  border-radius: 0.875rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  background: var(--warm-white);
}

.payment-method-option:hover {
  border-color: var(--accent-warm);
  background: rgba(212, 165, 116, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.payment-method-option input[type="radio"] {
  margin-right: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--accent-warm);
}

.payment-method-option.active {
  border-color: var(--accent-warm);
  background: rgba(212, 165, 116, 0.12);
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.2);
}

.payment-method-option label {
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.payment-method-option img {
  height: 1.5rem;
  object-fit: contain;
}

/* Trust Indicators */
.buy-now-trust-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
  background: var(--warm-white-soft);
  border-radius: 0.875rem;
  border: 1px solid var(--warm-white-border);
  font-size: 0.85rem;
  color: #6b7280;
}

.buy-now-trust-indicators svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #10b981;
  margin-right: 0.5rem;
}

.buy-now-trust-indicators span {
  display: flex;
  align-items: center;
}

/* Similar Products */
.similar-products {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--warm-white-border);
}

.similar-products h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

/* Review Content Styling */
.review-content {
  line-height: 1.6;
}

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

.review-content p:last-child {
  margin-bottom: 0;
}

.review-content br {
  line-height: 1.6;
}

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

.review-content li {
  margin-bottom: 0.5rem;
}

.review-content strong,
.review-content em {
  font-weight: 600;
}

.review-content a {
  color: var(--accent-warm);
  text-decoration: underline;
}

.review-content a:hover {
  color: var(--accent-warm-dark);
}

.similar-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
}

@media (max-width: 1024px) {
  .similar-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .similar-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .similar-products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

