/* Custom Styles for Metroknight Men's Fashion */

/* Font Family */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Navigation Styles */
.nav-link {
    color: #374151;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #111827;
}

.nav-link.active {
    color: #111827;
    border-bottom: 2px solid #111827;
}

/* Icon Button Styles */
.icon-btn {
    position: relative;
    padding: 0.5rem;
    color: #374151;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: #111827;
}

.count-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    border-radius: 9999px;
    height: 1.25rem;
    width: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button Styles */
.btn-primary {
    background-color: #111827;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    transform: scale(1);
}

.btn-primary:hover {
    background-color: #1f2937;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: white;
    color: #111827;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

.btn-outline {
    border: 1px solid #111827;
    color: #111827;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: #111827;
    color: white;
}

/* Product Card Styles */
.product-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    transform: translateY(0);
}

/* Desktop hover effects only */
@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        transform: translateY(-0.25rem);
    }
}

.product-image {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Removed product overlay and hover effects */

.wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: white;
    border-radius: 9999px;
    padding: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.wishlist-btn:hover {
    background-color: #fef2f2;
}

.wishlist-btn.active {
    color: #ef4444;
    background-color: #fef2f2;
}

.wishlist-btn.active:hover {
    background-color: #fee2e2;
}

/* Modal Styles */
.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 28rem;
    width: 100%;
    margin: 0 1rem;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #374151;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

/* Cart Styles */
.cart-item {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background-color: #e5e7eb;
    color: #374151;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background-color: #d1d5db;
}

.quantity-input {
    width: 4rem;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
}

/* Breadcrumb Styles */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: #111827;
}

.breadcrumb-separator {
    color: #9ca3af;
}

/* Size Selector Styles */
.size-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.size-option {
    border: 1px solid #d1d5db;
    text-align: center;
    padding: 0.5rem 0;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.size-option:hover {
    border-color: #111827;
}

.size-option.selected {
    border-color: #111827;
    background-color: #111827;
    color: white;
}

/* Color Selector Styles */
.color-selector {
    display: flex;
    gap: 0.5rem;
}

.color-option {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 2px solid #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
}

.color-option.selected {
    border-color: #111827;
    transform: scale(1.1);
}

/* Rating Styles */
.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.star {
    color: #fbbf24;
}

.star.empty {
    color: #d1d5db;
}

/* Price Styles */
.price-original {
    color: #6b7280;
    text-decoration: line-through;
}

.price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.discount-badge {
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-in-out;
}

.scale-in {
    animation: scaleIn 0.2s ease-in-out;
}

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

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

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

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

/* Loading Styles */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    animation: spin 1s linear infinite;
    border-radius: 9999px;
    height: 2rem;
    width: 2rem;
    border-bottom: 2px solid #111827;
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state-icon {
    font-size: 3.75rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #6b7280;
    margin-bottom: 15px;
}
#agreeTerms, #agreePrivacy{
    width: 10px;
}
#registerPhone{
    padding-left: 50px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .mobile-hide {
        display: none;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-stack {
        flex-direction: column;
    }
}

/* Drawer Animation */
.drawer-open {
    transform: translateX(0) !important;
}

/* Sticky Elements */
.sticky-size-selector {
    position: sticky;
    bottom: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    box-shadow: 0 -10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Image Lazy Loading */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s;
    /* Ensure images have proper dimensions on mobile */
    width: 100%;
    height: auto;
    display: block;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Mobile-specific lazy image fixes */
@media (max-width: 768px) {
    .lazy-image {
        /* Force immediate loading on mobile */
        opacity: 1;
        transition: none;
    }
    
    .product-image.lazy-image {
        /* Ensure product images display properly on mobile */
        min-height: 200px;
        object-fit: cover;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #111827;
        color: white;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .high-contrast {
        border: 2px solid black;
    }
}

/* Terms and Privacy Modal Styles */
.modal-content.max-w-4xl {
    max-width: 56rem;
}

.modal-content.max-h-\[80vh\] {
    max-height: 80vh;
}

.modal-content.overflow-y-auto {
    overflow-y: auto;
}

/* Custom scrollbar for modals */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Terms and Privacy content styling */
.terms-content h3,
.privacy-content h3 {
    color: #111827;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.terms-content p,
.privacy-content p {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Modal button layout */
.modal .border-t {
    border-top: 1px solid #e5e7eb;
}

.modal .pt-4 {
    padding-top: 1rem;
}

.modal .mt-6 {
    margin-top: 1.5rem;
}

/* Responsive design for terms and privacy modals */
@media (max-width: 768px) {
    .modal-content.max-w-4xl {
        max-width: 95vw;
        margin: 0 0.5rem;
    }
    
    .modal-content .p-6 {
        padding: 1rem;
    }
    
    .modal-content h3 {
        font-size: 1.125rem;
    }
    
    .modal-content .space-y-4 > div {
        margin-bottom: 1rem;
    }
    
    .modal-content .mt-6 .btn-primary,
    .modal-content .mt-6 .btn-secondary {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-content .mt-6 .btn-primary {
        margin-right: 0;
    }
}

/* Mobile Filter Drawer Styles */
.drawer-open {
    transform: translateX(0) !important;
}

#filterDrawerContent {
    transition: transform 0.3s ease-in-out;
}

#filterDrawerContent.drawer-open {
    transform: translateX(0);
}

/* Mobile filter drawer input fixes */
#filterDrawerContent .form-group.input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#filterDrawerContent .flex.items-center.space-x-2 {
    width: 100%;
    overflow: hidden;
}

#filterDrawerContent .flex.items-center.space-x-2 input {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 0.5rem);
}

/* Ensure mobile filter drawer content doesn't overflow */
#filterDrawerContent {
    overflow-x: hidden;
    overflow-y: auto;
}

#filterDrawerContent .p-6 {
    padding: 1.5rem;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile-specific input constraints */
@media (max-width: 640px) {
    #filterDrawerContent {
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    #filterDrawerContent .flex.items-center.space-x-2 input {
        max-width: calc(50% - 0.25rem);
        font-size: 0.875rem;
        padding: 0.5rem;
    }
}

/* Mobile filter button styles */
#mobileFilterBtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    color: #374151;
    font-size: 0.875rem;
    transition: all 0.2s;
}

#mobileFilterBtn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

@media (min-width: 1024px) {
    #mobileFilterBtn {
        display: none;
    }
}

/* Coupon Code Section Styles */
#couponInput {
    min-height: 2.5rem;
    font-size: 0.875rem;
}

#applyCoupon {
    min-height: 2.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Ensure proper alignment on desktop */
@media (min-width: 640px) {
    .coupon-container {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    #couponInput {
        flex: 1;
    }
    
    #applyCoupon {
        flex-shrink: 0;
    }
}

/* Cart page mobile optimizations */
@media (max-width: 1024px) {
    .cart-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .quantity-selector {
        gap: 0.25rem;
    }
    
    .quantity-btn {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
    
    .quantity-input {
        width: 3rem;
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 640px) {
    .cart-item {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .quantity-selector {
        gap: 0.125rem;
    }
    
    .quantity-btn {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.625rem;
    }
    
    .quantity-input {
        width: 2.5rem;
        font-size: 0.75rem;
        padding: 0.125rem 0.25rem;
    }
    
    /* Mobile sticky checkout button */
    .mobile-sticky-checkout {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem;
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 40;
    }
    
    /* Add bottom padding to main content to account for sticky checkout */
    .cart-main-content {
        padding-bottom: 5rem;
    }
}