:root {
    --primary: #ef4444;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.9);
    --border: rgba(0, 0, 0, 0.05);
}

body { 
    font-family: 'Outfit', sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-main); 
}

.md-btn { 
    position: relative; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}
.md-btn:hover { 
    color: var(--primary); 
}
.md-btn i { 
    transition: transform 0.3s ease; 
}
.md-btn:hover i { 
    transform: scale(1.2) translateX(4px); 
}

.swiper-button-prev,
.swiper-button-next {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  align-items: center; 
  justify-content: center;
  width: 46px; 
  height: 46px;
  background: var(--bg-card); 
  color: var(--text-main);
  border-radius: 50%; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid var(--border) !important; 
  outline: none; 
  cursor: pointer;
  position: absolute; 
  top: 50%; 
  z-index: 50; 
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.swiper-button-prev:hover, 
.swiper-button-next:hover { 
    background: var(--primary); 
    color: #fff;
    border-color: var(--primary) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.swiper-button-disabled { 
    opacity: 0 !important; 
    pointer-events: none; 
}

.swiper-button-prev::after, 
.swiper-button-next::after { 
    display: none !important; 
}

.light-layered-fade-box {
  width: 100%; 
  height: 100%; 
  position: absolute; 
  left: 0; 
  top: 0; 
  pointer-events: none;
  background: linear-gradient(to top, var(--bg-main) 0%, rgba(248, 250, 252, 0.7) 40%, transparent 100%);
  z-index: 10;
}

.swiper-pagination-bullet { 
    background: rgba(0,0,0,0.1); 
    opacity: 1; 
}

.swiper-pagination-bullet-active { 
    background: var(--primary); 
    width: 28px; 
    border-radius: 6px; 
    transition: width 0.3s ease; 
}

.fade-mask { 
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); 
}

::-webkit-scrollbar { 
    width: 8px; 
}
::-webkit-scrollbar-track { 
    background: var(--bg-main); 
}
::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
    border-radius: 10px; 
    border: 2px solid var(--bg-main); 
}
::-webkit-scrollbar-thumb:hover { 
    background: var(--primary); 
}

.line-clamp-2 { 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}
.line-clamp-3 { 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    line-clamp: 3;
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

/* Book Floating Animation */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
.animate-float { 
    animation: float 6s ease-in-out infinite; 
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}
.animate-pulse-soft { 
    animation: pulse-soft 4s ease-in-out infinite; 
}

/* Custom Fade Transition */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Download Gate SVG Support */
#gate-circle {
    stroke-dasharray: 276.46;
    stroke-dashoffset: 276.46;
}

/* List View Mode Styling */
.collection-item.list-view {
    grid-column: 1 / -1 !important;
}
.collection-item.list-view .group\/card {
    height: auto !important;
}
.collection-item.list-view .group\/card > div {
    display: flex !important;
    flex-direction: row !important;
    height: 180px !important;
    width: 100% !important;
}
.collection-item.list-view .aspect-\[2\/3\] {
    width: 120px !important;
    height: 100% !important;
    flex-shrink: 0 !important;
}
.collection-item.list-view .p-4 {
    padding: 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
.collection-item.list-view .text-sm {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
}

/* Category Grid Safeties */
.group\/cat {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.group\/cat h4 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Universal Selection & Scrollbar */
::selection {
    background-color: rgba(220, 38, 38, 0.1);
    color: #ef4444;
}
html {
    scroll-behavior: smooth;
}
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ef4444;
}

/* Enhanced Glassmorphism & Modernity */
.backdrop-blur-xl {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.shadow-premium {
    box-shadow: 0 50px 100px -20px rgba(50, 50, 93, 0.15), 0 30px 60px -30px rgba(0, 0, 0, 0.2);
}

.group\/card:hover .aspect-\[2\/3\] img {
    transform: scale(1.08) rotate(1deg);
}

.group\/cat:hover {
    box-shadow: 0 40px 80px -15px rgba(220, 38, 38, 0.12);
    transform: translateY(-8px);
}

/* Modal Open state body lock */
body.modal-open {
    overflow: hidden;
}
