/* Custom Styles for Flip and Strip */

:root {
    --primary-color: #db0335;
    --dark-color: #242629;
    --light-color: #f8f8f8;
    --success-color: #28a745;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
    
    /* Light mode (default) */
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --navbar-bg: #242629;
    --navbar-text: #ffffff;
}

/* Dark mode */
[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --border-color: #404040;
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
    --light-color: #2d2d2d;
}

* {
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Card backgrounds for dark mode */
[data-theme="dark"] .card {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .bg-light {
    background-color: var(--card-bg) !important;
}

[data-theme="dark"] .text-muted {
    color: #999 !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .form-select::placeholder {
    color: #999 !important;
    opacity: 1;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-color);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(219, 3, 53, 0.1);
}

/* Theme toggle button - HIDDEN (navbar toggle only) */
.theme-toggle {
    display: none !important;
}

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

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

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

.navbar-brand img {
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: rotate(5deg) scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

/* Navbar theme toggle button */
#navbarThemeToggle {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    border: none !important;
    background: none !important;
    text-decoration: none !important;
}

#navbarThemeToggle:hover {
    color: var(--primary-color) !important;
}

#navbarThemeToggle i {
    transition: var(--transition);
}

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

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

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Navbar dropdown hover for desktop */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: dropdownSlide 0.3s ease-out;
    }
    
    .dropdown-menu {
        margin-top: 0;
    }
}

/* Mobile navbar - cart, socials, and theme toggle on same row */
@media (max-width: 991px) {
    /* Use flex-wrap to allow inline items */
    .navbar-collapse .navbar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    /* Regular nav items take full width */
    .navbar-collapse .navbar-nav > li:not(.navbar-inline-mobile) {
        flex: 0 0 100%;
        width: 100%;
    }
    
    /* Inline items stay on same row */
    .navbar-collapse .navbar-nav > li.navbar-inline-mobile {
        flex: 0 0 auto;
        width: auto;
    }
    
    /* Ensure these items stay on same line with appropriate spacing */
    .navbar-collapse .navbar-nav > li.navbar-inline-mobile .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Hero Section */
.hero-section {
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* True Parallax effect - background scrolls at different rate */
.parallax-section {
    background: linear-gradient(rgba(219, 3, 53, 0.85), rgba(36, 38, 41, 0.85)), url('../../gallery/aaron-huber-KxeFuXta4SE-unsplash-ts1669126250.jpg') center/cover no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 700px;
}

/* Dark mode overlay for hero */
[data-theme="dark"] .parallax-section {
    background: linear-gradient(rgba(219, 3, 53, 0.7), rgba(10, 10, 10, 0.9)), url('../../gallery/aaron-huber-KxeFuXta4SE-unsplash-ts1669126250.jpg') center/cover no-repeat;
    background-attachment: fixed;
}

.parallax-section > * {
    position: relative;
    z-index: 1;
}

/* Fallback for mobile devices that don't support fixed backgrounds */
@media (max-width: 768px) {
    .parallax-section,
    [data-theme="dark"] .parallax-section {
        background-attachment: scroll;
    }
}

/* Category Cards */
.category-card {
    transition: var(--transition);
    cursor: pointer;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.category-card-featured {
    background: linear-gradient(135deg, rgba(219, 3, 53, 0.05) 0%, rgba(36, 38, 41, 0.05) 100%);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(219, 3, 53, 0.2) !important;
}

.category-card .fas,
.category-card .bi {
    transition: var(--transition);
}

.category-card:hover .fas,
.category-card:hover .bi {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-color) !important;
}

.category-card:hover .btn {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Product Cards */
.product-card {
    transition: var(--transition);
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.card-title a {
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: var(--primary-color) !important;
}

/* Fix product name readability in dark mode */
[data-theme="dark"] .card-title a.text-dark {
    color: var(--text-color) !important;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-danger:hover {
    background-color: #c10230;
    border-color: #c10230;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(219, 3, 53, 0.3);
}

.btn-outline-danger {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* Cart Badge */
#cart-count {
    font-size: 0.7rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Footer */
footer {
    background-color: #000 !important;
}

footer h5, footer h6 {
    color: var(--primary-color);
    font-weight: 700;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay.show {
    display: flex;
}

/* Product Detail */
.product-detail-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.product-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
}

.product-thumbnails img:hover,
.product-thumbnails img.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(219, 3, 53, 0.15);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    margin: 0 4px;
    transition: var(--transition);
    min-width: 40px;
    text-align: center;
}

/* Responsive pagination for mobile */
@media (max-width: 576px) {
    .pagination .page-link {
        margin: 2px;
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
        min-width: 35px;
    }
    
    .pagination {
        gap: 2px;
    }
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(219, 3, 53, 0.3);
}

/* Dark mode pagination - fix red on red issue */
[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

[data-theme="dark"] .pagination .page-link {
    color: var(--primary-color);
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination .page-link:hover {
    background-color: rgba(219, 3, 53, 0.2);
    color: #ffffff;
}

.pagination .page-link:hover {
    background-color: rgba(219, 3, 53, 0.1);
    color: var(--dark-color);
    transform: translateY(-2px);
}

/* Fix border radius on first and last pagination items (Previous/Next) */
.pagination .page-item:first-child .page-link {
    border-top-left-radius: var(--border-radius-sm);
    border-bottom-left-radius: var(--border-radius-sm);
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
}

/* Alert animations */
.alert {
    animation: slideDown 0.3s ease;
    border-radius: var(--border-radius);
}

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

/* Responsive adjustments */

/* Desktop button group improvements - applies to all screen sizes */
.btn-group-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-group-responsive .btn {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
    }
    
    .product-price {
        font-size: 1.3rem;
    }
    
    .btn-group-responsive .btn {
        flex: 0 1 auto;
    }
}

/* Discount badge */
.badge.bg-danger {
    background-color: var(--primary-color) !important;
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

/* Feature icons */
.feature-icon-wrapper {
    display: inline-block;
}

.feature-icon-wrapper .fas,
.display-5 {
    transition: var(--transition);
}

.feature-icon-wrapper:hover .fas,
.bg-light:hover .display-5 {
    transform: scale(1.1) rotate(5deg);
}

/* Card animations on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sale price styling */
.text-decoration-line-through {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* ======================================
   ENHANCED UX & ANIMATIONS
   ====================================== */

/* Page load animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to page elements */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-scale {
    animation: scaleIn 0.5s ease-out;
}

/* Staggered animation delays for cards */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

/* Smooth entrance for cards */
.card-entrance {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Enhanced hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Ripple effect for buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Skeleton loader for images */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        background-color: hsl(200, 20%, 80%);
    }
    100% {
        background-color: hsl(200, 20%, 95%);
    }
}

/* ======================================
   CART QUANTITY INPUT STYLING
   ====================================== */

/* Remove default number input spinners from cart quantity inputs */
.cart-item-quantity input[type="number"]::-webkit-outer-spin-button,
.cart-item-quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-quantity input[type="number"] {
    -moz-appearance: textfield;
    min-width: 50px;
    flex: 1 1 auto;
}

/* Desktop: wider quantity input */
@media (min-width: 769px) {
    .cart-item-quantity input[type="number"] {
        width: 80px;
    }
}

/* Prevent input-group from wrapping on all screen sizes */
.cart-item-quantity .input-group {
    flex-wrap: nowrap;
}

/* ======================================
   MOBILE CART OPTIMIZATIONS
   ====================================== */

@media (max-width: 768px) {
    /* Hide cart images on mobile */
    .cart-item-image {
        display: none !important;
    }
    
    /* Optimize cart item layout for mobile */
    .cart-item-mobile {
        flex-direction: column;
        padding: 1rem;
    }
    
    .cart-item-details {
        width: 100% !important;
        margin-bottom: 0.75rem;
    }
    
    .cart-item-price {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: 0.5rem;
    }
    
    .cart-item-quantity {
        width: 100% !important;
        margin-bottom: 0.75rem;
    }
    
    .cart-item-quantity .input-group {
        max-width: 150px;
    }
    
    .cart-item-total {
        display: flex;
        justify-content: space-between;
        width: 100%;
        align-items: center;
    }
    
    /* Sticky cart summary on mobile */
    .cart-summary-mobile {
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 2px solid var(--primary-color);
        box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 1rem;
    }
    
    /* Compact buttons on mobile */
    .cart-actions-mobile {
        display: flex;
        gap: 0.5rem;
    }
    
    .cart-actions-mobile .btn {
        flex: 1;
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Optimized order summary on mobile */
    .order-summary-mobile {
        padding: 1rem;
    }
    
    .order-summary-mobile .btn {
        font-size: 1rem;
        padding: 0.85rem;
    }
    
    /* Better spacing on mobile */
    .cart-item-card {
        margin-bottom: 0.75rem;
    }
    
    /* Larger touch targets */
    .mobile-touch-target {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ======================================
   ENHANCED SEO ELEMENTS
   ====================================== */

/* Breadcrumb schema-friendly markup */
.breadcrumb-seo {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    list-style: none;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

/* Product rating stars */
.star-rating {
    display: inline-flex;
    font-size: 1.2rem;
    color: #ffc107;
}

.star-rating .bi-star-fill {
    margin-right: 2px;
}

/* Price display optimization */
.price-display {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.price-currency {
    font-size: 1.2rem;
    vertical-align: super;
}

/* Availability badge */
.availability-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--border-radius-sm);
}

.in-stock {
    background-color: #28a745;
    color: white;
}

.low-stock {
    background-color: #ffc107;
    color: #212529;
}

.out-of-stock {
    background-color: #dc3545;
    color: white;
}

/* ======================================
   SCROLL ANIMATIONS
   ====================================== */

/* Scroll reveal effect */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ======================================
   LOADING STATES
   ====================================== */

.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-dots::after {
    content: '.';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ======================================
   IMPROVED MICROINTERACTIONS
   ====================================== */

/* Checkbox and radio custom styling */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(219, 3, 53, 0.25);
}

/* Select dropdown enhancement */
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(219, 3, 53, 0.25);
}

/* Input focus glow */
.input-glow:focus {
    box-shadow: 0 0 0 3px rgba(219, 3, 53, 0.1),
                0 0 20px rgba(219, 3, 53, 0.2);
}

/* Toast notification */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 250px;
    animation: slideInRight 0.3s ease-out;
}

/* ======================================
   ACCESSIBILITY IMPROVEMENTS
   ====================================== */

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* ======================================
   PERFORMANCE OPTIMIZATIONS
   ====================================== */

/* GPU acceleration for animations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Reduce motion for users who prefer it */
@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;
    }
    
    /* Specifically disable problematic infinite animations */
    .badge {
        animation: none;
    }
    
    .skeleton {
        animation: none;
        background: #f0f0f0;
    }
    
    body {
        animation: none;
    }
    
    .dropdown-menu {
        animation: none;
    }
}

/* ======================================
   CUSTOM SCROLLBAR
   ====================================== */

/* Custom scrollbar for Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, #a00228 100%);
    border-radius: var(--border-radius);
    border: 2px solid #f1f1f1;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff0040 0%, var(--primary-color) 100%);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

/* ======================================
   Z-INDEX FIX FOR CART PAGE
   ====================================== */

/* Ensure navbar is always on top */
.navbar.sticky-top {
    z-index: 1030 !important;
}

/* Order summary should be below navbar */
.order-summary-mobile,
.sticky-top.order-summary-mobile {
    z-index: 1020 !important;
    top: 100px;
}

/* Cart summary container */
.cart-summary-mobile {
    z-index: 1020 !important;
}

/* ======================================
   ENHANCED PROFESSIONAL TOUCHES
   ====================================== */

/* Glass morphism effect for cards */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff4d6d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced shadow on hover for specific cards */
.product-card.card:hover,
.category-card.card:hover {
    box-shadow: 0 15px 40px rgba(219, 3, 53, 0.15) !important;
}

/* Smooth image transitions - scoped to specific contexts */
.product-card img,
.category-card img,
.product-detail-img,
.gallery-image {
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Only apply hover effects on devices that support hover */
@media (hover: hover) {
    .product-card img:hover,
    .category-card img:hover,
    .product-detail-img:hover,
    .gallery-image:hover {
        transform: scale(1.02);
    }
}

/* Improved focus states for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: var(--border-radius-sm);
}

/* Smooth page transitions */
body {
    animation: fadeIn 0.3s ease-in;
}

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

/* Enhanced dropdown animations */
.dropdown-menu {
    animation: dropdownSlide 0.3s ease-out;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge pulse animation */
.badge {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(219, 3, 53, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(219, 3, 53, 0);
    }
}

/* Loading skeleton shimmer effect */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Tooltip enhancement */
.tooltip {
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Enhanced form elements */
.form-control:focus,
.form-select:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(219, 3, 53, 0.15);
}

/* Sticky elements smooth transition */
.sticky-top {
    transition: all 0.3s ease;
}

/* Product card image container */
.product-card .card-img-top {
    overflow: hidden;
    border-bottom: 2px solid var(--light-color);
}

/* Enhanced button states */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 400%;
    height: 400%;
}

/* Improved navbar transition */
.navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Enhanced category card effects */
.category-card {
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(219, 3, 53, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.category-card:hover::before {
    opacity: 1;
}

/* Breadcrumb enhancement */
.breadcrumb-item a {
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    transform: translateX(3px);
}

/* Footer link enhancements */
footer a {
    display: inline-block;
    transition: all 0.3s ease;
}

footer a:hover {
    padding-left: 8px;
}

/* Call to Action Section - Light/Dark Mode Compatible */
.cta-section {
    background-color: #f8f9fa;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .cta-section {
    background-color: #2d2d2d;
    color: var(--text-color);
}

/* Ensure outline button works in both modes */
.cta-section .btn-outline-danger {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cta-section .btn-outline-danger:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Product details table dark mode */
[data-theme-card] {
    background-color: #f8f9fa;
}

[data-theme="dark"] [data-theme-card] {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
}

[data-theme="dark"] [data-theme-table] {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] [data-theme-table] td {
    color: #e0e0e0 !important;
    border-color: #444 !important;
    background-color: transparent !important;
}

[data-theme="dark"] [data-theme-table] .text-muted {
    color: #999 !important;
}

/* Override Bootstrap table defaults in dark mode */
[data-theme="dark"] .table {
    --bs-table-bg: transparent !important;
    --bs-table-color: #e0e0e0 !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .card .table {
    background-color: transparent !important;
}

/* Product quantity selector custom styling */
.quantity-selector {
    max-width: 180px;
    flex-wrap: nowrap !important;
}

.quantity-selector .quantity-input {
    width: 3.5em;
    min-width: 3.5em;
    border-left: 2px solid var(--primary-color) !important;
    border-right: 2px solid var(--primary-color) !important;
    border-top: 2px solid var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    font-weight: 600;
    font-size: 1.1rem;
}

.quantity-selector .quantity-input::-webkit-outer-spin-button,
.quantity-selector .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-selector .quantity-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-selector .quantity-btn {
    border-width: 2px;
    font-weight: bold;
    min-width: 42px;
}

.quantity-selector .quantity-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(219, 3, 53, 0.25);
}

/* Category sidebar styling - Light mode */
.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.list-group-item-action:hover {
    background-color: rgba(219, 3, 53, 0.1);
}

/* Dark mode support for category sidebar */
[data-theme="dark"] .list-group-item {
    background-color: #2a2d31;
    border-color: #3a3d41;
    color: #e0e0e0;
}

[data-theme="dark"] .list-group-item:hover {
    background-color: #3a3d41;
    color: #ffffff;
}

[data-theme="dark"] .list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

[data-theme="dark"] .list-group-item-action {
    color: #e0e0e0;
}

[data-theme="dark"] .list-group-item-action:hover {
    color: #ffffff;
    background-color: #3a3d41;
}

[data-theme="dark"] .card-header.bg-danger {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color);
}

[data-theme="dark"] .text-muted {
    color: #9ca3af !important;
}
