/* ============================================
   MOBILE & TABLET RESPONSIVE FIXES
   iPhone, iPad, and Mobile Device Optimizations
   ============================================ */

/* === VIEWPORT & SAFE AREA FIXES === */
:root {
  /* Safe area insets for notched devices (iPhone X+) */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
}

/* Ensure proper touch behavior */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Prevent zoom on input focus (iOS) */
input, select, textarea {
  font-size: 16px !important;
}

/* === GPU ACCELERATION FOR FIXED ELEMENTS === */
/* Prevent flickering on scroll for fixed/sticky elements */
.nav-wrapper,
.navbar,
.user-dropdown,
.user-dropdown-menu,
.cart-drawer,
.wishlist-drawer,
.nav-menu {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

/* Smooth scrolling for main content */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

/* === NAVBAR RESPONSIVE FIXES === */

/* iPhone SE, iPhone 8 (375px) */
@media (max-width: 375px) {
  .navbar {
    padding: 0 var(--spacing-sm) !important;
    height: 60px !important;
  }
  
  .nav-brand img {
    width: 36px !important;
    height: 36px !important;
  }
  
  .nav-brand span {
    font-size: 1rem !important;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .nav-icon-btn {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }
  
  .nav-icon-btn .badge {
    min-width: 16px !important;
    height: 16px !important;
    font-size: 0.6rem !important;
    top: -2px !important;
    right: -2px !important;
  }
  
  .nav-actions {
    gap: var(--spacing-xs) !important;
  }
  
  .nav-mobile-toggle {
    padding: 8px !important;
  }
  
  .nav-mobile-toggle span {
    width: 20px !important;
  }
}

/* iPhone 12/13/14, most Android phones (390px-430px) */
@media (min-width: 376px) and (max-width: 430px) {
  .navbar {
    padding: 0 var(--spacing-md) !important;
    height: 64px !important;
  }
  
  .nav-brand img {
    width: 40px !important;
    height: 40px !important;
  }
  
  .nav-brand span {
    font-size: 1.1rem !important;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .nav-icon-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.1rem !important;
  }
  
  .nav-actions {
    gap: var(--spacing-sm) !important;
  }
}

/* Larger phones / Phablets (431px-576px) */
@media (min-width: 431px) and (max-width: 576px) {
  .navbar {
    padding: 0 var(--spacing-lg) !important;
    height: 68px !important;
  }
  
  .nav-brand img {
    width: 44px !important;
    height: 44px !important;
  }
  
  .nav-brand span {
    font-size: 1.2rem !important;
  }
}

/* Hide close button on desktop */
.nav-menu-close {
  display: none !important;
}

/* All mobile and tablet devices - Slide-in menu from right */
@media (max-width: 1024px) {
  /* Show close button on mobile/tablet */
  .nav-menu-close {
    display: flex !important;
  }
  
  .navbar {
    position: relative !important;
  }
  
  /* Show hamburger menu on tablets */
  .nav-mobile-toggle {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }
  
  .nav-mobile-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--text-primary, #202023);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  /* Hamburger to X animation when active */
  .nav-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Menu overlay - dark background when menu is open */
  .nav-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    z-index: 998 !important;
  }
  
  .nav-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    width: 320px !important;
    max-width: 80% !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for mobile browsers */
    flex-direction: column !important;
    background: #ffffff !important;
    padding: 100px 24px 30px !important;
    gap: 8px !important;
    transform: translateX(100%) !important;
    opacity: 1 !important;
    visibility: hidden !important;
    transition: transform 0.3s ease, visibility 0.3s ease !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
  }
  
  .nav-menu.open {
    transform: translateX(0) !important;
    visibility: visible !important;
  }
  
  /* Close button for mobile/tablet menu */
  .nav-menu-close {
    position: absolute !important;
    top: 24px !important;
    right: 24px !important;
    width: 44px !important;
    height: 44px !important;
    background: #f5f5f5 !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    color: #333 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease !important;
    z-index: 1000 !important;
  }
  
  .nav-menu-close:hover {
    background: #e0e0e0 !important;
  }
  
  .nav-menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .nav-link {
    display: block !important;
    width: 100% !important;
    padding: 16px 20px !important;
    text-align: left !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: background 0.15s ease !important;
  }
  
  .nav-link:hover {
    background: #FCE4EC !important;
  }
  
  .nav-link.active {
    background: #FCE4EC !important;
    font-weight: 600 !important;
  }
  
  .nav-link::after {
    display: none !important;
  }
  
  /* Prevent body scroll when menu is open */
  body.nav-menu-open {
    overflow: hidden !important;
  }
}

/* Smaller phones (max-width: 576px) - smaller menu width */
@media (max-width: 576px) {
  .nav-menu {
    width: 280px !important;
    max-width: 85% !important;
    padding: 90px 20px 30px !important;
  }
  
  .nav-link {
    padding: 14px 16px !important;
    font-size: 1rem !important;
  }
  
  .nav-menu-close {
    top: 20px !important;
    right: 20px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
  }
}

/* iPad and Tablets (768px - 1024px) - Larger buttons for touch */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Larger mobile menu for tablets */
  .nav-menu {
    width: 380px !important;
    max-width: 70% !important;
    padding: 100px 28px 40px !important;
  }
  
  /* Bigger menu links for iPad */
  .nav-menu .nav-link {
    padding: 20px 24px !important;
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    border-radius: 12px !important;
    margin-bottom: 4px !important;
  }
  
  /* Larger close button for tablets */
  .nav-menu-close {
    top: 28px !important;
    right: 28px !important;
    width: 52px !important;
    height: 52px !important;
    font-size: 28px !important;
  }
  
  /* Larger hamburger button */
  .nav-mobile-toggle {
    padding: 12px !important;
  }
  
  .nav-mobile-toggle span {
    width: 28px !important;
    height: 3px !important;
  }
  
  /* Larger navbar action buttons for tablets */
  .nav-icon-btn {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.4rem !important;
  }
  
  .nav-actions {
    gap: 12px !important;
  }
}

/* === iPad Mini (768px) === */
@media (min-width: 768px) and (max-width: 834px) {
  .navbar {
    padding: 0 var(--spacing-lg) !important;
  }
  
  .nav-brand img {
    width: 44px !important;
    height: 44px !important;
  }
  
  .nav-brand span {
    font-size: 1.25rem !important;
  }
  
  .nav-menu {
    gap: var(--spacing-sm) !important;
  }
  
  .nav-link {
    padding: var(--spacing-xs) var(--spacing-sm) !important;
    font-size: 0.85rem !important;
  }
  
  .nav-icon-btn {
    width: 40px !important;
    height: 40px !important;
  }
}

/* === iPad Air / iPad Pro 11" (820px-1024px) === */
@media (min-width: 835px) and (max-width: 1024px) {
  .navbar {
    padding: 0 var(--spacing-xl) !important;
  }
  
  .nav-brand img {
    width: 46px !important;
    height: 46px !important;
  }
  
  .nav-brand span {
    font-size: 1.35rem !important;
  }
  
  .nav-menu {
    gap: var(--spacing-md) !important;
  }
  
  .nav-link {
    padding: var(--spacing-sm) var(--spacing-md) !important;
    font-size: 0.9rem !important;
  }
}

/* === HERO SLIDER RESPONSIVE === */
@media (max-width: 576px) {
  .hero-slider {
    height: 400px !important;
  }
  
  .slide-content {
    padding: 0 var(--spacing-md) !important;
  }
  
  .slide-content h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }
  
  .slide-content p {
    font-size: 0.95rem !important;
    margin-bottom: var(--spacing-md) !important;
  }
  
  .slider-arrow {
    width: 40px !important;
    height: 40px !important;
    font-size: 1rem !important;
  }
  
  .slider-arrows {
    padding: 0 var(--spacing-sm) !important;
  }
  
  .slider-nav {
    bottom: var(--spacing-md) !important;
  }
  
  .slider-dot {
    width: 10px !important;
    height: 10px !important;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .hero-slider {
    height: 450px !important;
  }
  
  .slide-content h1 {
    font-size: 2.25rem !important;
  }
  
  .slide-content p {
    font-size: 1rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-slider {
    height: 500px !important;
  }
  
  .slide-content h1 {
    font-size: 2.75rem !important;
  }
}

/* === SECTION & CONTAINER RESPONSIVE === */
@media (max-width: 576px) {
  .section {
    padding: var(--spacing-xl) 0 !important;
    overflow-x: hidden !important;
  }
  
  .container {
    padding: 0 var(--spacing-md) !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  .section-title {
    font-size: 1.5rem !important;
  }
  
  .section-subtitle {
    font-size: 0.9rem !important;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .section {
    padding: var(--spacing-xl) 0 !important;
    overflow-x: hidden !important;
  }
  
  .container {
    padding: 0 var(--spacing-lg) !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  .section-title {
    font-size: 1.75rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 var(--spacing-xl) !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .section-title {
    font-size: 2rem !important;
  }
}

/* === PRODUCT GRID RESPONSIVE === */
@media (max-width: 480px) {
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  .product-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
  }
  
  .product-card img,
  .product-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .product-image {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    background: #ffffff !important;
    aspect-ratio: 1 / 1 !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .product-info {
    padding: var(--spacing-sm) !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .product-footer {
    margin-top: auto !important;
  }
  
  .product-name {
    font-size: 0.8rem !important;
    word-break: break-word !important;
    hyphens: auto !important;
    overflow-wrap: break-word !important;
  }
  
  .product-price {
    font-size: 1rem !important;
  }
  
  .product-badge {
    font-size: 0.65rem !important;
    padding: 2px 8px !important;
  }
  
  .product-actions .btn {
    font-size: 0.75rem !important;
    padding: var(--spacing-xs) var(--spacing-sm) !important;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  .product-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .product-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .product-footer {
    margin-top: auto !important;
  }
  
  .product-image {
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    aspect-ratio: 1 / 1 !important;
  }
  
  .product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  
  .product-name {
    font-size: 0.9rem !important;
    word-break: break-word !important;
    hyphens: auto !important;
    overflow-wrap: break-word !important;
  }

  .product-price {
    font-size: 1.1rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  .product-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .product-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .product-footer {
    margin-top: auto !important;
  }
  
  .product-image {
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    aspect-ratio: 1 / 1 !important;
  }
  
  .product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}

/* === CART & WISHLIST DRAWER RESPONSIVE === */
@media (max-width: 576px) {
  .cart-drawer,
  .wishlist-drawer {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .cart-header,
  .wishlist-header {
    padding: var(--spacing-md) !important;
  }
  
  .cart-header h2,
  .wishlist-header h2 {
    font-size: 1.25rem !important;
  }
  
  .cart-items,
  .wishlist-items {
    padding: var(--spacing-sm) !important;
  }
  
  .cart-item,
  .wishlist-item {
    padding: var(--spacing-sm) !important;
    gap: var(--spacing-sm) !important;
  }
  
  .cart-item-image,
  .wishlist-item-image {
    width: 70px !important;
    height: 70px !important;
  }
  
  .cart-item-name,
  .wishlist-item-name {
    font-size: 0.9rem !important;
  }
  
  .cart-item-price,
  .wishlist-item-price {
    font-size: 0.95rem !important;
  }
  
  .cart-footer {
    padding: var(--spacing-md) !important;
  }
  
  .cart-total {
    font-size: 1.1rem !important;
  }
}

/* === PAGE HEADER & SHOP MOBILE FIX === */
@media (max-width: 992px) {
  /* Reduce gap between navbar and content on mobile */
  .page-content {
    padding-top: 60px !important;
  }
  
  /* Compact page header */
  .page-header {
    padding: 12px 0 10px !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    text-align: center !important;
  }
  
  .page-header .container {
    padding: 0 16px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }
  
  .page-header h1 {
    font-size: 1.3rem !important;
    margin-bottom: 2px !important;
    text-align: center !important;
  }
  
  .page-header p {
    font-size: 0.78rem !important;
    margin-bottom: 4px !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Center everything in page header container */
  .page-header .container,
  .about-hero .container,
  .contact-hero .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Breadcrumb INLINE - All breadcrumbs on same line */
  .breadcrumb,
  .page-header .breadcrumb,
  .about-hero .breadcrumb,
  .contact-hero .breadcrumb {
    display: block !important;
    width: auto !important;
    text-align: center !important;
    margin: 6px auto 0 auto !important;
    padding: 0 !important;
    background: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }
  
  .breadcrumb *,
  .breadcrumb > *,
  .page-header .breadcrumb *,
  .page-header .breadcrumb > *,
  .about-hero .breadcrumb *,
  .about-hero .breadcrumb > *,
  .contact-hero .breadcrumb *,
  .contact-hero .breadcrumb > * {
    display: inline !important;
    white-space: nowrap !important;
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: baseline !important;
    flex: none !important;
    flex-shrink: 0 !important;
    float: none !important;
    position: static !important;
  }
  
  .breadcrumb a,
  .page-header .breadcrumb a,
  .about-hero .breadcrumb a,
  .contact-hero .breadcrumb a {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
  }
  
  .breadcrumb span,
  .page-header .breadcrumb span,
  .about-hero .breadcrumb span,
  .contact-hero .breadcrumb span {
    color: var(--text-light) !important;
  }
  
  /* Page breadcrumbs - centered on mobile for hero sections */
  .page-header .breadcrumb,
  .about-hero .breadcrumb,
  .contact-hero .breadcrumb {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 6px auto 0 auto !important;
  }
  
  /* Minimal section spacing */
  .section {
    padding: 8px 0 20px !important;
  }
}

/* === EXTRA SMALL SCREENS - More compact breadcrumb === */
@media (max-width: 375px) {
  .breadcrumb,
  .page-header .breadcrumb,
  .about-hero .breadcrumb,
  .contact-hero .breadcrumb {
    font-size: 0.8rem !important;
  }
  
  .breadcrumb > *,
  .page-header .breadcrumb > *,
  .about-hero .breadcrumb > *,
  .contact-hero .breadcrumb > * {
    font-size: 0.8rem !important;
  }
  
  .breadcrumb span,
  .page-header .breadcrumb span,
  .about-hero .breadcrumb span,
  .contact-hero .breadcrumb span {
    padding: 0 2px !important;
  }
}

@media (min-width: 376px) and (max-width: 992px) {
  .breadcrumb span,
  .page-header .breadcrumb span,
  .about-hero .breadcrumb span,
  .contact-hero .breadcrumb span {
    padding: 0 3px !important;
  }
}

@media (max-width: 992px) {
  /* === SHOP LAYOUT === */
  .shop-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Shop main content area - prevent overflow */
  .shop-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Products grid - ensure it fits within container */
  .shop-main .products-grid,
  .shop-layout .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Sidebar - stacked layout for mobile */
  .shop-sidebar {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
    box-sizing: border-box !important;
  }
  
  /* Search card - FULL WIDTH, first row */
  .shop-sidebar .filter-card:first-child {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-bottom: 2px !important;
    background: transparent !important;
    box-shadow: none !important;
    order: 1 !important;
  }
  
  .shop-sidebar .filter-card:first-child .filter-title {
    display: none !important;
  }
  
  .shop-sidebar .filter-card:first-child .filter-options {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    position: static !important;
    box-shadow: none !important;
    max-height: none !important;
  }
  
  /* FILTER CHIPS - Same row, auto width */
  .shop-sidebar .filter-card:nth-child(2),
  .shop-sidebar .filter-card:nth-child(3),
  .shop-sidebar .filter-card:nth-child(4),
  .shop-sidebar details.filter-dropdown {
    flex: 0 0 auto !important;
    width: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 4px 0 0 !important;
    padding: 0 !important;
    order: 2 !important;
    position: relative !important;
  }

  /* ===== DETAILS/SUMMARY DROPDOWN STYLES ===== */
  
  /* Hide default marker */
  details.filter-dropdown > summary {
    list-style: none !important;
  }
  details.filter-dropdown > summary::-webkit-details-marker {
    display: none !important;
  }
  
  /* Summary button styling */
  details.filter-dropdown > summary.filter-title {
    display: inline-flex !important;
    visibility: visible !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    background: #ffffff !important;
    border: 2px solid #d0d0d0 !important;
    border-radius: 8px !important;
    color: #333 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    white-space: nowrap !important;
    min-height: 44px !important;
    user-select: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
  }
  
  details.filter-dropdown > summary.filter-title:active {
    background: #f0f0f0 !important;
    transform: scale(0.98) !important;
  }
  
  details.filter-dropdown[open] > summary.filter-title {
    background: #fff !important;
    border-color: #f8c8dc !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
  }
  
  /* Dropdown CLOSED - hide options */
  details.filter-dropdown:not([open]) > .filter-options {
    display: none !important;
  }
  
  /* Dropdown OPEN - show options */
  details.filter-dropdown[open] > .filter-options {
    display: block !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    z-index: 9999 !important;
    min-width: 200px !important;
    width: max-content !important;
    max-width: 280px !important;
    padding: 12px !important;
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important;
  }
  
  /* Filter option items */
  details.filter-dropdown .filter-option {
    display: flex !important;
    align-items: center !important;
    padding: 10px 8px !important;
    border-bottom: 1px solid #eee !important;
    gap: 8px !important;
  }
  details.filter-dropdown .filter-option:last-child {
    border-bottom: none !important;
  }

  /* Shop main section */
  .shop-header {
    margin-bottom: 10px !important;
  }
}

/* === FOOTER RESPONSIVE === */
@media (max-width: 576px) {
  .footer {
    padding: var(--spacing-xl) var(--spacing-md) !important;
  }
  
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-lg) !important;
    text-align: center !important;
  }
  
  .footer-brand img {
    width: 50px !important;
    height: 50px !important;
    margin: 0 auto var(--spacing-sm) !important;
  }
  
  .footer-brand span {
    font-size: 1.25rem !important;
  }
  
  .footer h4 {
    font-size: 1rem !important;
    margin-bottom: var(--spacing-sm) !important;
  }
  
  .footer-links {
    gap: var(--spacing-xs) !important;
  }
  
  .footer-links a {
    font-size: 0.9rem !important;
  }
  
  .footer-bottom {
    flex-direction: column !important;
    gap: var(--spacing-md) !important;
    text-align: center !important;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* === BUTTONS RESPONSIVE === */
@media (max-width: 576px) {
  .btn {
    padding: var(--spacing-sm) var(--spacing-md) !important;
    font-size: 0.9rem !important;
  }
  
  .btn-lg {
    padding: var(--spacing-md) var(--spacing-lg) !important;
    font-size: 1rem !important;
  }
}

/* === FORM ELEMENTS RESPONSIVE === */
@media (max-width: 576px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    padding: var(--spacing-sm) var(--spacing-md) !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    border-radius: var(--radius-md) !important;
  }
  
  .form-group {
    margin-bottom: var(--spacing-md) !important;
  }
  
  label {
    font-size: 0.9rem !important;
    margin-bottom: var(--spacing-xs) !important;
  }
}

/* === BLOG GRID RESPONSIVE === */
@media (max-width: 576px) {
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-md) !important;
  }
  
  .blog-card-info h3 {
    font-size: 1rem !important;
  }
  
  .blog-card-info p {
    font-size: 0.85rem !important;
  }
}

@media (min-width: 577px) and (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* === PORTFOLIO GRID RESPONSIVE === */
@media (max-width: 576px) {
  .portfolio-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-md) !important;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* === CONTACT PAGE RESPONSIVE === */
@media (max-width: 768px) {
  .contact-layout {
    flex-direction: column !important;
  }
  
  .contact-info,
  .contact-form {
    width: 100% !important;
  }
}

/* === ABOUT PAGE & POLICY PAGES - WIDER CONTENT === */
/* Reduce side margins for about and policy pages on all screen sizes */
.about-content-wrapper .container,
.about-hero .container,
.policy-container {
  padding-left: 12px !important;
  padding-right: 12px !important;
  max-width: 100% !important;
}

/* Dynamic content section - even wider */
.about-dynamic-content {
  padding: 0 15px !important;
}

/* Make policy container wider */
.policy-container {
  max-width: 1000px !important;
}

/* === ABOUT PAGE RESPONSIVE === */
@media (max-width: 768px) {
  .about-content {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--spacing-lg) !important;
    padding: var(--spacing-md) !important;
  }
  
  .about-text,
  .about-image {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .about-text {
    text-align: left !important;
    padding: 0 !important;
  }
  
  .about-content-wrapper .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .about-hero .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .policy-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .about-dynamic-content {
    padding: 0 10px !important;
  }
  
  /* Remove extra space above cat logo */
  .about-dynamic-content .about-cat-logo,
  .about-dynamic-content img.about-cat-logo {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Remove top padding from container as well */
  .about-dynamic-content #aboutTextContent {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  
  .about-text h2 {
    font-size: 1.5rem !important;
  }
  
  .about-text p,
  #aboutDescription p {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
  }
  
  .about-image img {
    width: 100% !important;
    max-width: 300px !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
  }
  
  #about-preview {
    padding: var(--spacing-lg) 0 !important;
    overflow-x: hidden !important;
  }
  
  #about-preview .container {
    padding: 0 var(--spacing-md) !important;
    overflow: hidden !important;
  }
}

/* === PRODUCT DETAIL PAGE RESPONSIVE === */
@media (max-width: 768px) {
  .product-detail-layout {
    flex-direction: column !important;
    gap: var(--spacing-lg) !important;
  }
  
  .product-gallery,
  .product-details {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .product-gallery-main {
    max-height: 350px !important;
  }
  
  .product-title {
    font-size: 1.5rem !important;
  }
  
  .product-price-main {
    font-size: 1.5rem !important;
  }
  
  /* Product detail container fixes */
  .product-detail {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: var(--spacing-md) 0 !important;
    box-sizing: border-box !important;
  }
  
  .product-detail .product-gallery {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: var(--spacing-lg) !important;
  }
  
  .product-detail .main-image {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    overflow: hidden !important;
    border-radius: var(--radius-lg) !important;
  }
  
  .product-detail .main-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  
  .product-detail .thumbnail-gallery {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }
  
  .product-detail .product-details {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .product-detail h1,
  .product-detail #productName {
    font-size: 1.4rem !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
}

/* === LANDSCAPE MODE FIXES (Mobile) === */
@media (max-width: 896px) and (orientation: landscape) {
  .hero-slider {
    height: 300px !important;
  }
  
  .slide-content h1 {
    font-size: 1.5rem !important;
  }
  
  .slide-content p {
    display: none !important;
  }
  
  .nav-wrapper {
    position: fixed !important;
  }
  
  .page-content {
    padding-top: 60px !important;
  }
}

/* === iOS SPECIFIC FIXES === */
@supports (-webkit-touch-callout: none) {
  /* Safari-only styles */
  body {
    /* Fix for iOS momentum scrolling */
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix 100vh issue on iOS Safari */
  .nav-menu.open,
  .mobile-menu,
  .cart-drawer,
  .wishlist-drawer {
    height: 100vh;
    height: -webkit-fill-available;
  }
  
  /* Fix for fixed positioning on iOS */
  .nav-wrapper {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus states for touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn:active,
  .nav-link:active,
  .product-card:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
  
  /* Remove hover effects on touch devices */
  .product-card:hover {
    transform: none;
  }
  
  .product-card:active {
    transform: scale(0.98);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #000000;
    --text-secondary: #333333;
    --border-light: #000000;
  }
  
  .btn-outline {
    border-width: 3px;
  }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
  /* Ready for dark mode implementation */
}

/* Print optimizations */
@media print {
  .nav-wrapper,
  .nav-mobile-toggle,
  .cart-drawer,
  .wishlist-drawer,
  .cart-overlay,
  .wishlist-overlay {
    display: none !important;
  }
  
  .page-content {
    padding-top: 0 !important;
  }
  
  .section {
    break-inside: avoid;
  }
}

/* ============================================
   HERO SLIDER TEXT & BUTTON FIXES (MOBILE/TABLET)
   Make text and buttons smaller to fit within white box
   ============================================ */

/* iPhone SE and smaller phones */
@media (max-width: 375px) {
  .slide.has-image .slide-content {
    padding: var(--spacing-sm) var(--spacing-md) !important;
    max-width: calc(100% - 24px) !important;
    margin: 0 12px !important;
  }
  
  .slide-content h1 {
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
    margin-bottom: var(--spacing-xs) !important;
  }
  
  .slide-content p {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    margin-bottom: var(--spacing-sm) !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .slide-content .btn {
    padding: 8px 16px !important;
    font-size: 0.75rem !important;
  }
}

/* iPhone 12/13/14 and similar phones */
@media (min-width: 376px) and (max-width: 430px) {
  .slide.has-image .slide-content {
    padding: var(--spacing-md) !important;
    max-width: calc(100% - 32px) !important;
    margin: 0 16px !important;
  }
  
  .slide-content h1 {
    font-size: 1.4rem !important;
    line-height: 1.3 !important;
    margin-bottom: var(--spacing-xs) !important;
  }
  
  .slide-content p {
    font-size: 0.85rem !important;
    line-height: 1.45 !important;
    margin-bottom: var(--spacing-sm) !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .slide-content .btn {
    padding: 10px 18px !important;
    font-size: 0.8rem !important;
  }
}

/* Phablets and small tablets */
@media (min-width: 431px) and (max-width: 576px) {
  .slide.has-image .slide-content {
    padding: var(--spacing-md) var(--spacing-lg) !important;
    max-width: calc(100% - 48px) !important;
    margin: 0 24px !important;
  }
  
  .slide-content h1 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    margin-bottom: var(--spacing-sm) !important;
  }
  
  .slide-content p {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-bottom: var(--spacing-sm) !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .slide-content .btn {
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
  }
}

/* Tablets (iPad Mini, iPad) */
@media (min-width: 577px) and (max-width: 834px) {
  .slide.has-image .slide-content {
    padding: var(--spacing-lg) !important;
    max-width: 80% !important;
    margin: 0 auto !important;
  }
  
  .slide-content h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: var(--spacing-sm) !important;
  }
  
  .slide-content p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: var(--spacing-md) !important;
  }
  
  .slide-content .btn {
    padding: 12px 24px !important;
    font-size: 0.9rem !important;
  }
}

/* iPad Air and iPad Pro */
@media (min-width: 835px) and (max-width: 1024px) {
  .slide.has-image .slide-content {
    padding: var(--spacing-lg) var(--spacing-xl) !important;
    max-width: 550px !important;
  }
  
  .slide-content h1 {
    font-size: 2rem !important;
    line-height: 1.25 !important;
  }
  
  .slide-content p {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }
  
  .slide-content .btn {
    padding: 12px 28px !important;
    font-size: 0.95rem !important;
  }
}

/* ============================================
   HAMBURGER MOBILE MENU - MODERN SLEEK DESIGN
   ============================================ */

/* Modern Hamburger Button - Right Side */
@media (max-width: 992px) {
  .nav-actions {
    order: 3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .nav-mobile-toggle {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding: 10px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 1001 !important;
    margin-left: 8px !important;
    order: 99 !important;
  }

  .nav-mobile-toggle span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: var(--text-primary) !important;
    transition: all 0.3s ease !important;
  }
}

/* ============================================
   FOOTER MOBILE LAYOUT
   Quick Links (left), Customer Service (right), Contact (below)
   ============================================ */
@media (max-width: 576px) {
  .footer-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: var(--spacing-lg) var(--spacing-md) !important;
    text-align: left !important;
  }
  
  /* Footer about section - full width on top */
  .footer-about {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    margin-bottom: var(--spacing-sm);
  }
  
  .footer-brand {
    justify-content: center !important;
  }
  
  .footer-about p {
    max-width: 320px;
    margin: 0 auto var(--spacing-md);
    font-size: 0.85rem !important;
  }
  
  .footer-social {
    justify-content: center !important;
  }
  
  /* Quick Links - left column */
  .footer-column:nth-of-type(1) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
  
  /* Customer Service - right column */
  .footer-column:nth-of-type(2) {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }
  
  /* Contact Us - full width below */
  .footer-column:nth-of-type(3) {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    text-align: center !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
  }
  
  .footer-column:nth-of-type(3) .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
  }
  
  .footer-column h4 {
    font-size: 0.9rem !important;
    margin-bottom: var(--spacing-sm) !important;
  }
  
  .footer-links a,
  .footer-links li {
    font-size: 0.85rem !important;
  }
  
  .footer-bottom {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
  }
}

/* Tablet footer layout */
@media (min-width: 577px) and (max-width: 768px) {
  .footer-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: var(--spacing-lg) !important;
  }
  
  .footer-about {
    grid-column: 1 / -1 !important;
  }
  
  .footer-column:nth-of-type(1),
  .footer-column:nth-of-type(2) {
    grid-column: auto !important;
  }
  
  .footer-column:nth-of-type(3) {
    grid-column: 1 / -1 !important;
    text-align: center;
  }
  
  .footer-column:nth-of-type(3) .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm) var(--spacing-lg);
  }
}
/* === BLOG BOOK LAYOUT MOBILE RESPONSIVE === */
/* Mobile devices - Stack book pages vertically */
@media (max-width: 992px) {
  .blog-book-container {
    max-width: 100% !important;
    padding: var(--spacing-sm) !important;
  }
  
  .blog-book {
    flex-direction: column !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
  }
  
  .blog-book-page {
    flex: none !important;
    min-height: auto !important;
    padding: var(--spacing-lg) !important;
    width: 100% !important;
  }
  
  .blog-book-left,
  .blog-book-right {
    min-height: 400px !important;
  }
  
  .blog-book-spine {
    width: 100% !important;
    height: 20px !important;
    order: 1 !important;
  }
  
  .blog-book-left {
    order: 2 !important;
  }
  
  .blog-book-right {
    order: 0 !important;
    overflow: visible !important;
  }
  
  .blog-book-right .book-page-inner {
    overflow-y: visible !important;
    max-height: none !important;
  }
  
  .book-title {
    font-size: 1.5rem !important;
    word-wrap: break-word !important;
  }
  
  .book-content-body {
    font-size: 1rem !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
  }
  
  .book-featured-image {
    aspect-ratio: 16/9 !important;
  }
  
  .book-page-number {
    position: relative !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin-top: var(--spacing-md) !important;
    text-align: center !important;
  }
}

/* Small mobile devices */
@media (max-width: 576px) {
  .blog-book-container {
    padding: var(--spacing-xs) !important;
  }
  
  .blog-book {
    border-radius: 4px !important;
  }
  
  .blog-book-page {
    padding: var(--spacing-md) !important;
  }
  
  .book-page-header {
    font-size: 0.9rem !important;
    margin-bottom: var(--spacing-md) !important;
  }
  
  .book-title {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
  }
  
  .book-content-body {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
  }
  
  .book-content-body p {
    text-indent: 0 !important;
    margin-bottom: var(--spacing-md) !important;
  }
  
  .book-content-body p:first-child::first-letter {
    font-size: 2.5rem !important;
  }
  
  .book-featured-image {
    border-width: 2px !important;
  }
  
  .book-stacked-image {
    border-width: 2px !important;
  }
  
  .book-video-container iframe,
  .book-video-container video {
    height: 200px !important;
  }
}

/* Ensure text wraps properly in all content areas */
.blog-book-page,
.book-page-inner,
.book-content-body,
.book-content-body p,
.book-content-body h1,
.book-content-body h2,
.book-content-body h3,
.book-title {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
}

/* Prevent horizontal overflow on mobile */
@media (max-width: 992px) {
  .blog-book-container,
  .blog-book,
  .blog-book-page,
  .book-page-inner,
  .book-content-body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .book-content-body img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .book-content-body iframe,
  .book-content-body video {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* === PORTFOLIO BOOK LAYOUT MOBILE RESPONSIVE === */
/* Mobile devices - Stack portfolio book pages vertically */
@media (max-width: 992px) {
  .portfolio-book-container {
    max-width: 100% !important;
    padding: var(--spacing-sm) !important;
  }
  
  .portfolio-book {
    flex-direction: column !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
  }
  
  .portfolio-book-page {
    flex: none !important;
    min-height: auto !important;
    padding: var(--spacing-lg) !important;
    width: 100% !important;
  }
  
  .portfolio-book-left,
  .portfolio-book-right {
    min-height: 400px !important;
  }
  
  .portfolio-book-spine {
    width: 100% !important;
    height: 20px !important;
    order: 1 !important;
  }
  
  .portfolio-book-left {
    order: 2 !important;
  }
  
  .portfolio-book-right {
    order: 0 !important;
    overflow: visible !important;
  }
  
  .portfolio-book-right .book-page-inner {
    overflow-y: visible !important;
    max-height: none !important;
  }
  
  .book-title {
    font-size: 1.5rem !important;
    word-wrap: break-word !important;
  }
  
  .book-content-body {
    font-size: 1rem !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
  }
  
  .book-stacked-image {
    aspect-ratio: 16/9 !important;
  }
  
  .book-page-number {
    position: relative !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin-top: var(--spacing-md) !important;
    text-align: center !important;
  }
}

/* Small mobile devices - Portfolio */
@media (max-width: 576px) {
  .portfolio-book-container {
    padding: var(--spacing-xs) !important;
  }
  
  .portfolio-book {
    border-radius: 4px !important;
  }
  
  .portfolio-book-page {
    padding: var(--spacing-md) !important;
  }
  
  .book-page-header {
    font-size: 0.9rem !important;
    margin-bottom: var(--spacing-md) !important;
  }
  
  .book-title {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
  }
  
  .book-content-body {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
  }
  
  .book-content-body p {
    text-indent: 0 !important;
    margin-bottom: var(--spacing-md) !important;
  }
  
  .book-content-body p:first-child::first-letter {
    font-size: 2.5rem !important;
  }
  
  .book-stacked-image {
    border-width: 2px !important;
  }
}

/* Ensure text wraps properly in portfolio content areas */
.portfolio-book-page,
.book-page-inner,
.book-content-body,
.book-content-body p,
.book-content-body h1,
.book-content-body h2,
.book-content-body h3,
.book-title {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
}

/* Prevent horizontal overflow on mobile - Portfolio */
@media (max-width: 992px) {
  .portfolio-book-container,
  .portfolio-book,
  .portfolio-book-page,
  .book-page-inner,
  .book-content-body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .book-content-body img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .book-stacked-image img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* === CUSTOMER SERVICE PAGES MOBILE === */
/* Shipping, Returns, Privacy Policy pages */
@media (max-width: 768px) {
  .policy-container {
    max-width: 100% !important;
    margin: var(--spacing-md) !important;
    padding: var(--spacing-lg) var(--spacing-md) !important;
    border-radius: var(--radius-md) !important;
  }
  
  .policy-container h2 {
    font-size: 1.5rem !important;
    margin-top: var(--spacing-lg) !important;
  }
  
  .policy-container p,
  .policy-container ul,
  .policy-container ol {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
  }
  
  .policy-container ul,
  .policy-container ol {
    padding-left: var(--spacing-lg) !important;
  }
}

@media (max-width: 576px) {
  .policy-container {
    margin: var(--spacing-sm) !important;
    padding: var(--spacing-md) var(--spacing-sm) !important;
  }
  
  .policy-container h2 {
    font-size: 1.3rem !important;
  }
  
  .policy-container p,
  .policy-container ul,
  .policy-container ol {
    font-size: 0.9rem !important;
  }
}

/* === PRODUCT PAGE RECOMMENDATIONS - HORIZONTAL SCROLL === */
@media (max-width: 992px) {
  /* Related products section container */
  #relatedProducts.products-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 12px !important;
    padding: 8px 0 16px 0 !important;
    margin: 0 -12px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Hide scrollbar for cleaner look but keep functionality */
  #relatedProducts.products-grid::-webkit-scrollbar {
    height: 6px !important;
  }
  
  #relatedProducts.products-grid::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 10px !important;
  }
  
  #relatedProducts.products-grid::-webkit-scrollbar-thumb {
    background: var(--primary-pink-dark, #fcb1d8) !important;
    border-radius: 10px !important;
  }
  
  #relatedProducts.products-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-pink, #ffd0d0) !important;
  }
  
  /* Each product card in the horizontal scroll */
  #relatedProducts.products-grid .product-card {
    flex: 0 0 auto !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    scroll-snap-align: start !important;
  }
  
  #relatedProducts.products-grid .product-card .product-name {
    font-size: 0.8rem !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }
  
  #relatedProducts.products-grid .product-card .product-price {
    font-size: 0.95rem !important;
  }
}

@media (max-width: 480px) {
  #relatedProducts.products-grid .product-card {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
  }
  
  #relatedProducts.products-grid .product-card .product-name {
    font-size: 0.75rem !important;
  }
  
  #relatedProducts.products-grid .product-card .product-price {
    font-size: 0.9rem !important;
  }
}

/* === MOBILE TOUCH FIXES - ELIMINATE DOUBLE TAP === */
/* Remove hover states on touch devices to prevent double-tap behavior */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects on touch devices */
  .product-card:hover,
  .portfolio-card:hover,
  .blog-card:hover,
  .btn:hover,
  .nav-link:hover,
  .filter-btn:hover,
  .add-to-cart-btn:hover,
  .product-action-btn:hover,
  .view-project:hover,
  .nav-icon-btn:hover,
  .social-link:hover,
  .footer-links a:hover,
  .inspiration-card:hover,
  .featured-post:hover,
  .faq-question:hover,
  .user-btn:hover,
  .back-to-top:hover {
    transform: none !important;
    box-shadow: var(--shadow-md) !important;
    background: initial !important;
    color: initial !important;
  }
  
  /* Specific hover resets for images */
  .product-card:hover .product-image img,
  .portfolio-card:hover .portfolio-card-image img,
  .blog-card:hover .blog-image img,
  .inspiration-card:hover img,
  .featured-post:hover .featured-post-image img,
  .blog-card:hover .blog-card-image img,
  .book-stacked-image:hover img {
    transform: none !important;
    scale: 1 !important;
  }
  
  /* Specific hover resets for overlays */
  .product-card:hover .product-actions,
  .portfolio-card:hover .portfolio-overlay,
  .blog-card:hover .blog-card-overlay,
  .inspiration-card:hover .inspiration-overlay {
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* Force immediate touch responsiveness */
@media (max-width: 1024px) {
  /* Add touch-action for better mobile interaction */
  .product-card,
  .portfolio-card,
  .blog-card,
  .btn,
  .nav-link,
  .filter-btn,
  .add-to-cart-btn,
  .product-action-btn,
  .view-project,
  .nav-icon-btn,
  .social-link,
  .footer-links a,
  .inspiration-card,
  .featured-post,
  .faq-question,
  .user-btn,
  .back-to-top,
  .mobile-link,
  .mobile-close,
  .cart-close,
  .wishlist-close,
  .back-btn,
  .breadcrumb a {
    touch-action: manipulation !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
  }
  
  /* Ensure clickable areas are large enough for touch */
  .nav-icon-btn,
  .product-action-btn,
  .mobile-close,
  .cart-close,
  .wishlist-close,
  .back-btn {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  /* Remove tap highlight on WebKit browsers */
  * {
    -webkit-tap-highlight-color: transparent !important;
  }
  
  /* Force active states instead of hover for immediate feedback */
  .product-card:active,
  .portfolio-card:active,
  .blog-card:active,
  .btn:active,
  .nav-link:active,
  .filter-btn:active,
  .add-to-cart-btn:active,
  .product-action-btn:active,
  .view-project:active,
  .nav-icon-btn:active {
    transform: scale(0.98) !important;
    opacity: 0.9 !important;
  }
}

/* === GLOBAL PRODUCT CARD FIX - Remove pink divider & Align footer === */
.product-card {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
}

.product-info {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

.product-footer {
  margin-top: auto !important;
}

.product-image {
  background: #ffffff !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

.product-image img {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ============================================
   UNIVERSAL IMAGE CONTAINMENT FIXES
   Ensures consistent image sizing across all devices
   ============================================ */

/* === SHOP PAGE: Product Grid Image Standardization === */
/* All product card images - standardized box with aspect ratio */
.products-grid .product-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.products-grid .product-image {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  background: #ffffff !important;
}

.products-grid .product-image img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* === PRODUCT DETAIL PAGE: Main Image Standardization === */
/* Desktop/Large screens */
.product-detail .main-image {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-white, #ffffff) !important;
}

.product-detail .main-image img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Ensure gallery doesn't overflow */
.product-detail .product-gallery {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* === TABLET SPECIFIC (iPad, iPad Air, iPad Pro) === */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Product Detail Page - Tablet */
  .product-detail {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: var(--spacing-xl, 24px) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .product-detail .product-gallery {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .product-detail .main-image {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    aspect-ratio: unset !important;
    overflow: hidden !important;
    border-radius: var(--radius-lg, 12px) !important;
    background: #ffffff !important;
  }
  
  .product-detail .main-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  
  .product-detail .product-details {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
  }
  
  /* Container overflow prevention */
  .container {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
}

/* === SMALL TABLET / Large Phone (600px - 768px) === */
@media (min-width: 600px) and (max-width: 767px) {
  .product-detail {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .product-detail .product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: var(--spacing-lg, 16px) !important;
  }
  
  .product-detail .main-image {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    aspect-ratio: unset !important;
    overflow: hidden !important;
    border-radius: var(--radius-lg, 12px) !important;
  }
  
  .product-detail .main-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

/* === MOBILE (up to 600px) === */
@media (max-width: 599px) {
  .product-detail .main-image {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    aspect-ratio: unset !important;
    overflow: hidden !important;
  }
  
  .product-detail .main-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

/* === LARGE DESKTOP (1025px+) === */
@media (min-width: 1025px) {
  .product-detail .main-image {
    position: relative !important;
    width: 100% !important;
    max-width: 600px !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    border-radius: var(--radius-lg, 12px) !important;
  }
  
  .product-detail .main-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}