/* Custom CSS for T-Shirt E-commerce Website */

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

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

::-webkit-scrollbar-thumb {
    background: #7C2D12;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #92400e;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

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

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

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

.animate-slide-in-right {
    animation: slideInFromRight 0.3s ease-out;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.3s ease-out;
}

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

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

/* Image hover effects */
.image-hover-effect {
    position: relative;
    overflow: hidden;
}

.image-hover-effect img {
    transition: transform 0.5s ease;
}

.image-hover-effect:hover img {
    transform: scale(1.05);
}

/* Button effects */
.btn-primary {
    background: linear-gradient(135deg, #7C2D12 0%, #92400e 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #92400e 0%, #B45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 45, 18, 0.3);
}

.btn-accent {
    background: linear-gradient(135deg, #3E0703 0%, #3B060A 100%);
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #3B060A 0%, #2A0505 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(62, 7, 3, 0.3);
}

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

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

/* Custom checkbox and radio styles */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.custom-checkbox:checked {
    background-color: #7C2D12;
    border-color: #7C2D12;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Size selector styles */
.size-selector {
    width: 48px;
    height: 48px;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-selector:hover {
    border-color: #7C2D12;
    background-color: #FEF3F2;
}

.size-selector.selected {
    border-color: #7C2D12;
    background-color: #7C2D12;
    color: white;
}

/* Quantity selector */
.quantity-selector button {
    width: 32px;
    height: 32px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-selector button:hover {
    background-color: #F3F4F6;
    border-color: #9CA3AF;
}

.quantity-selector button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cart badge */
.cart-badge {
    background: linear-gradient(135deg, #3E0703 0%, #3B060A 100%);
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    top: -8px;
    right: -8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(62, 7, 3, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(62, 7, 3, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(62, 7, 3, 0);
    }
}

/* Notification styles */
.notification {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .cart-sidebar {
        width: 100vw;
        height: 100vh;
    }
    
    .size-selector {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }
    
    .btn-accent {
        border: 2px solid #000;
    }
}

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

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #7C2D12;
    outline-offset: 2px;
}

/* Custom utilities */
.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;
}

.text-gradient {
    background: linear-gradient(135deg, #7C2D12 0%, #5E1219 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* See More Button Styles */
#see-more-btn {
    box-shadow: 0 4px 15px rgba(62, 7, 3, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
}

#see-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 7, 3, 0.4);
}

#see-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(62, 7, 3, 0.3);
}

/* Out of Stock Styles */
.product-image-container.out-of-stock {
    position: relative;
}

.product-image-container.out-of-stock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
    pointer-events: none;
}

.out-of-stock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.product-image-container.out-of-stock .product-image {
    filter: grayscale(100%) opacity(0.7);
}

.out-of-stock-text {
    animation: pulse 2s infinite;
}

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

/* Prevent clicking on out of stock products */
.product-card:has(.out-of-stock-overlay) {
    cursor: not-allowed;
    pointer-events: none;
}

.product-card:has(.out-of-stock-overlay) .product-details {
    opacity: 0.7;
}

/* Size button styling for out of stock */
#modal-sizes button:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    border-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
}

#modal-sizes button:disabled:hover {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
}

#modal-sizes button:disabled::after {
    content: "Out of Stock";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #ef4444;
    white-space: nowrap;
    margin-top: 2px;
    font-weight: 500;
}

/* Filter styles for all-products page */
.filter-option {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.875rem;
    color: #495057;
}

.filter-option:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.filter-option.active {
    background-color: #7C2D12;
    border-color: #7C2D12;
    color: white;
    font-weight: 600;
}

.filter-option.active:hover {
    background-color: #92400e;
    border-color: #92400e;
}

/* Price filter specific styling */
.price-filter {
    text-align: left;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

/* Size filter specific styling */
.size-filter {
    min-width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

/* Clear filters button hover state */
button.w-full.bg-primary:hover {
    background-color: #92400e !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(124, 45, 18, 0.3);
}
