/* Custom styles for Mathis Steel */

/* Gallery page enhancements */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive gallery grid */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Image hover effect */
.image-container {
  position: relative;
  overflow: hidden;
}

.image-container img {
  transition: transform 0.3s ease;
}

.image-container:hover img {
  transform: scale(1.05);
}

/* Category badges */
.category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(37, 99, 235, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Value tags */
.value-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Card hover effect */
.gallery-card {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Empty state icons */
.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg {
  width: 40px;
  height: 40px;
  color: #9ca3af;
}

/* Mobile menu toggle */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Product cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Discount badge */
.discount-badge {
    background: linear-gradient(45deg, #ef4444, #f97316);
}

/* New and Trending badges */
.new-badge {
    background: linear-gradient(45deg, #ef4444, #f97316);
}

.trending-badge {
    background: linear-gradient(45deg, #f59e0b, #eab308);
}

/* Payment method selection */
.payment-method {
    transition: all 0.2s ease;
}

.payment-method:hover {
    background-color: #f1f5f9;
}

.payment-method input:checked + span {
    background-color: #3b82f6;
    color: white;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: linear-gradient(45deg, #16a34a, #22c55e);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

/* Form inputs */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Service cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Quote form */
.quote-form {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

/* Contact form */
.contact-form {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

/* Footer */
.footer {
    background: linear-gradient(45deg, #1e40af, #2563eb);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile menu improvements */
    #mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1e40af;
        padding: 1rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    #mobile-menu a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #mobile-menu a:last-child {
        border-bottom: none;
    }
    
    /* Adjust main content padding for mobile */
    main {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Adjust product cards for mobile */
    .product-card, .gallery-card, .service-card {
        margin-bottom: 1rem;
    }
    
    /* Adjust form elements for mobile */
    .form-input, .form-select, .form-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Adjust button sizes for mobile */
    .btn-primary, .btn-secondary {
        padding: 0.75rem 1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Adjust navigation buttons */
    .flex.justify-center.space-x-4 {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .flex.justify-center.space-x-4 a {
        width: 80%;
    }
}

/* Animation for new products */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.new-product {
    animation: pulse 2s infinite;
}

/* Loading spinner */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert messages */
.alert-success {
    background-color: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Improve table responsiveness */
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

/* Improve form responsiveness */
.form-group {
    margin-bottom: 1rem;
}

/* Ensure proper spacing on mobile */
.py-12 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .py-12 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    .text-3xl {
        font-size: 1.875rem;
    }
}