/* Custom CSS for Radio Masters Auto Parts Template */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Irish Registration Plate Styling */
#reg-input {
    letter-spacing: 0.1em;
    font-family: 'Courier New', Courier, monospace;
}

#reg-input::placeholder {
    letter-spacing: normal;
    font-family: inherit;
}

/* Product card hover effects */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Category card hover */
.category-card {
    transition: all 0.3s ease;
}

/* Button hover animations */
.btn-animate {
    transition: all 0.2s ease;
}

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

.btn-animate:active {
    transform: translateY(0);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1E40AF;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background-color: #22C55E;
    color: white;
}

.toast-error {
    background-color: #EF4444;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Dropdown animations */
.dropdown-menu {
    transform-origin: top;
    animation: dropdownOpen 0.2s ease;
}

@keyframes dropdownOpen {
    from {
        opacity: 0;
        transform: scaleY(0.9);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Mobile menu slide */
.mobile-menu-open {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Price tag styling */
.price-tag {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Input focus effects */
input:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Image placeholder */
.img-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Quantity input styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Card shadows */
.card-shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.card-shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Badge pulse animation */
.badge-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Star rating */
.star-rating {
    color: #FBBF24;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .toast {
        left: 20px;
        right: 20px;
        bottom: 10px;
    }
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

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

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #1E40AF;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1E40AF;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

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