/* Custom CSS for MMR Lamps E-commerce */

/* Theme Color Variables */
:root {
    --primary-color: #FF6B35;
    --primary-light: #FF8C42;
    --primary-dark: #E55A2B;
    --primary-rgb: 255, 107, 53;
    --accent-color: #FF8C42;
    --accent-light: #FFA366;
    --accent-dark: #E55A2B;
}

/* Neon Effects */
.neon-glow {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5), 0 0 40px rgba(255, 107, 53, 0.3);
}

.neon-text {
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.8), 0 0 20px rgba(255, 107, 53, 0.6);
}

.neon-border {
    border: 2px solid transparent;
    background: linear-gradient(45deg, #FF6B35, #FF8C42, #FF6B35);
    background-size: 200% 200%;
    animation: neon-border-animation 3s ease infinite;
}

@keyframes neon-border-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Lamp-specific styles */
.lamp-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.lamp-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.lamp-image {
    transition: all 0.3s ease;
}

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

/* Color selector */
.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.color-option:hover {
    transform: scale(1.2);
    border-color: #FF6B35;
}

.color-option.selected {
    border-color: #FF6B35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.6);
}

/* Quantity selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #374151;
}

.quantity-btn:hover {
    background: #d1d5db;
    transform: scale(1.05);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.2);
}

/* Mobile responsive for quantity selector */
@media (max-width: 768px) {
    .quantity-selector {
        gap: 8px;
    }
    
    .quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .quantity-input {
        width: 70px;
        height: 36px;
        font-size: 14px;
    }
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    /* Header and Navigation Mobile Styles */
    #header {
        padding: 8px 0;
    }
    
    #header h1 {
        font-size: 1.2rem !important;
        line-height: 1.2;
    }
    
    .header-nav {
        display: none;
    }
    
    .mobile-menu {
        display: block;
        font-size: 1.2rem;
        padding: 4px 8px;
    }
    
    .cart-icon {
        position: relative;
        font-size: 0.9rem;
    }
    
    .cart-count {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #ff4757;
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: bold;
    }
    
    /* Button sizes for mobile */
    .btn-primary, .btn-secondary {
        padding: 8px 16px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    
    /* Main content mobile styles */
    .lamp-card {
        margin-bottom: 20px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    /* Typography adjustments for mobile */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.3;
    }
    
    .text-4xl {
        font-size: 1.8rem !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .text-xl {
        font-size: 1.1rem !important;
    }
    
    .text-lg {
        font-size: 1rem !important;
    }
    
    /* Product card mobile adjustments */
    .lamp-card .p-6 {
        padding: 1rem !important;
    }
    
    .lamp-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem;
    }
    
    .lamp-card .text-2xl {
        font-size: 1.2rem !important;
    }
    
    /* Hero section mobile adjustments */
    .hero-section h1 {
        font-size: 2.5rem !important;
        line-height: 1.1;
    }
    
    .hero-section p {
        font-size: 1.1rem !important;
        line-height: 1.4;
    }
    
    /* Category buttons mobile */
    .category-btn {
        padding: 1rem !important;
    }
    
    .category-btn .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .category-btn .font-medium {
        font-size: 0.9rem !important;
    }
    
    /* Cart and wishlist mobile */
    .cart-item h3 {
        font-size: 1rem !important;
    }
    
    .cart-item p {
        font-size: 0.9rem !important;
    }
    
    /* Modal mobile adjustments */
    .modal-content {
        margin: 2% auto;
        padding: 1rem;
        width: 95%;
    }
    
    .modal-content h2 {
        font-size: 1.5rem !important;
    }
    
    /* Form elements mobile */
    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    /* Footer mobile */
    #footer h3 {
        font-size: 1.1rem !important;
    }
    
    #footer p, #footer li {
        font-size: 0.9rem !important;
    }
    
    /* Quantity selector mobile */
    .quantity-selector {
        gap: 6px;
    }
    
    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .quantity-input {
        width: 60px;
        height: 32px;
        font-size: 13px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    #header h1 {
        font-size: 1rem !important;
    }
    
    .mobile-menu {
        font-size: 1rem;
        padding: 2px 6px;
    }
    
    .cart-icon {
        font-size: 0.8rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    .text-4xl {
        font-size: 1.5rem !important;
    }
    
    .text-3xl {
        font-size: 1.25rem !important;
    }
    
    .text-2xl {
        font-size: 1.1rem !important;
    }
    
    .text-xl {
        font-size: 1rem !important;
    }
    
    .text-lg {
        font-size: 0.9rem !important;
    }
    
    .lamp-card h3 {
        font-size: 1rem !important;
    }
    
    .lamp-card .text-2xl {
        font-size: 1.1rem !important;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-section p {
        font-size: 1rem !important;
    }
    
    .category-btn {
        padding: 0.75rem !important;
    }
    
    .category-btn .text-3xl {
        font-size: 1.25rem !important;
    }
    
    .category-btn .font-medium {
        font-size: 0.8rem !important;
    }
    
    .modal-content {
        margin: 1% auto;
        padding: 0.75rem;
        width: 98%;
    }
    
    .form-control {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .form-group label {
        font-size: 0.8rem;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .quantity-input {
        width: 50px;
        height: 28px;
        font-size: 12px;
    }
}

@media (min-width: 769px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        padding: 0 30px;
    }
    
    .mobile-menu {
        display: none;
    }
}

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

/* Product Card Specific Styles */
.discount-tag {
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

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

.product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    min-height: 2.8em; /* 2 lines * 1.4 line-height */
}

.price-container {
    flex-wrap: nowrap;
    overflow: hidden;
}

.product-price {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.product-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    min-height: 4.2em; /* 3 lines * 1.4 line-height */
}

.product-tag {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
}

.product-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.4);
}

.product-btn {
    padding: 8px 16px !important;
    font-size: 0.7rem !important;
    text-wrap: nowrap;
    height: auto !important;
    min-height: 36px;
}

/* Single product layout fix */
.product-grid.justify-center {
    justify-content: center;
}

.product-grid.justify-center .lamp-card {
    max-width: 400px;
    width: 100%;
}

/* Mobile responsive adjustments for product cards */
@media (max-width: 768px) {
    .product-name {
        font-size: 1rem !important;
        min-height: 2.4em;
    }
    
    .product-price {
        font-size: 1.1rem !important;
    }
    
    .product-description {
        font-size: 0.9rem !important;
        min-height: 3.6em;
    }
    
    .product-btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
        min-height: 32px;
    }
    
    .product-tag {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .product-name {
        font-size: 0.9rem !important;
        min-height: 2.2em;
    }
    
    .product-price {
        font-size: 1rem !important;
    }
    
    .product-description {
        font-size: 0.8rem !important;
        min-height: 3.2em;
    }
    
    .product-btn {
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
        min-height: 28px;
    }
    
    .product-tag {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

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

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

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

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

/* Loading animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Button styles */
.btn-primary {
    background: linear-gradient(45deg, #FF6B35, #FF8C42);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #FF6B35;
    color: #FF6B35;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.2);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* Product details */
.product-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .product-gallery {
        grid-template-columns: 1fr 1fr;
    }
}

/* Shopping cart */
.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

/* Wishlist */
.wishlist-item {
    position: relative;
    transition: all 0.3s ease;
}

.wishlist-item:hover {
    transform: scale(1.02);
}

.wishlist-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success message */
.success-message {
    background: linear-gradient(45deg, #FF6B35, #FF8C42);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    animation: slideIn 0.5s ease;
}

/* Category buttons */
.category-btn {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-btn:hover svg {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.category-btn.active {
    border-color: #FF6B35;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.category-btn.active .font-medium {
    color: white;
}

.category-btn.active svg {
    filter: brightness(0) invert(1);
}

/* SVG icon styling */
.category-btn svg {
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
}

.category-btn svg path {
    transition: all 0.3s ease;
}

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

/* Message Toast Styles */
.message-toast {
    transform: translateX(100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-toast:hover {
    transform: translateX(0) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Ensure message toast is always visible */
.message-toast {
    z-index: 99999 !important;
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    max-width: 24rem !important;
    min-width: 20rem !important;
}

/* Animation for message appearance */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.message-toast.slide-in {
    animation: slideInRight 0.3s ease-out;
}

.message-toast.slide-out {
    animation: slideOutRight 0.3s ease-in;
}
