/* Custom styles for the website */

/* Logo theme colors - Orange and modern styling */
:root {
    --primary-orange: #f97316;
    --primary-orange-light: #fb923c;
    --primary-orange-dark: #ea580c;
    --secondary-gray: #374151;
    --light-gray: #f9fafb;
}

/* Navigation styles */
.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    color: #374151;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-block;
}

.nav-link:hover {
    color: #ea580c;
    background-color: #fff7ed;
    border-color: #fed7aa;
}

.nav-link.active {
    color: #ea580c;
    background-color: #fff7ed;
    border-color: #fed7aa;
}

.mobile-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    color: #374151;
    border: 1px solid transparent;
    text-decoration: none;
    margin: 0.25rem 0;
}

.mobile-nav-link:hover {
    color: #ea580c;
    background-color: #fff7ed;
    border-color: #fed7aa;
}

.mobile-nav-link.active {
    color: #ea580c;
    background-color: #fff7ed;
    border-color: #fed7aa;
}

/* Product card styles - designed to work with Tailwind grid */
.product-card {
    @apply bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1 border border-gray-100;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards fill grid cells */
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Product image styling */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0; /* Remove border radius to work with card overflow hidden */
    display: block;
}

/* Override any conflicting image styles */
.product-card img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Product info section */
.product-info {
    flex-grow: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-price {
    font-weight: 700;
    color: #ea580c !important;
    font-size: 1.125rem;
}

/* Product buttons container */
.product-buttons {
    margin-top: auto; /* Push buttons to bottom */
    padding: 0 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-buttons button {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-buttons button.add-to-cart {
    background-color: #ea580c !important;
    color: white !important;
}

.product-buttons button.add-to-cart:hover {
    background-color: #c44d0b !important;
    transform: translateY(-1px);
}

.product-buttons button.view-details {
    background-color: #6b7280 !important;
    color: white !important;
}

.product-buttons button.view-details:hover {
    background-color: #4b5563 !important;
    transform: translateY(-1px);
}

/* Ensure grid container works properly */
#products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #products-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .product-card {
        margin-bottom: 0 !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1025px) {
    #products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Category card styles */
.category-card {
    @apply relative overflow-hidden rounded-lg cursor-pointer transform transition-all duration-300 hover:scale-105 hover:shadow-xl shadow-md border-2 border-transparent hover:border-orange-300;
}

.category-card.selected {
    @apply ring-4 ring-orange-500 shadow-xl scale-105 border-orange-500;
}

.category-card h3 {
    @apply text-xl font-bold mb-2 text-white drop-shadow-lg;
}

.category-card p {
    @apply text-sm opacity-90 mb-1 text-white drop-shadow-md;
}

/* Form styles */
.form-input {
    @apply w-full px-4 py-3 border-2 border-gray-300 rounded-lg focus:ring-2 focus:ring-orange-500 focus:border-orange-500 transition-all duration-200 bg-gray-50 hover:bg-white focus:bg-white shadow-sm;
}

.form-input:focus {
    @apply ring-orange-500 border-orange-500 bg-white shadow-md;
}

.form-textarea {
    @apply w-full px-4 py-3 border-2 border-gray-300 rounded-lg focus:ring-2 focus:ring-orange-500 focus:border-orange-500 transition-all duration-200 bg-gray-50 hover:bg-white focus:bg-white shadow-sm resize-vertical;
}

.form-textarea:focus {
    @apply ring-orange-500 border-orange-500 bg-white shadow-md;
}

/* Form validation styles */
.field-error {
    @apply text-red-600 text-sm mt-1 font-medium;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Input validation states */
input.border-red-500, textarea.border-red-500 {
    @apply border-red-500 bg-red-50 ring-2 ring-red-200;
    animation: pulse-error 0.5s ease-in-out;
}

@keyframes pulse-error {
    0% { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1); }
    50% { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2); }
    100% { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1); }
}

/* Valid input styling */
input.border-green-500, textarea.border-green-500 {
    @apply border-green-500 bg-green-50 ring-2 ring-green-200;
}

/* Input focus states with validation */
input:focus.border-red-500, textarea:focus.border-red-500 {
    @apply ring-red-500 border-red-500 bg-red-50 shadow-lg;
}

input:focus.border-green-500, textarea:focus.border-green-500 {
    @apply ring-green-500 border-green-500 bg-green-50 shadow-lg;
}

/* Success icon for valid fields */
.field-success::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-weight: bold;
    font-size: 16px;
}

.btn-primary {
    @apply bg-orange-500 text-white px-6 py-3 rounded-md hover:bg-orange-600 transition-all duration-200 font-medium shadow-lg hover:shadow-xl transform hover:-translate-y-1;
}

.btn-secondary {
    @apply border-2 border-orange-500 text-orange-500 px-6 py-3 rounded-md hover:bg-orange-50 hover:border-orange-600 transition-all duration-200 font-medium shadow-lg hover:shadow-xl transform hover:-translate-y-1;
}

/* Button improvements */
button, .btn, a[class*="bg-orange"] {
    @apply transition-all duration-200 font-medium shadow-lg;
}

button:hover, .btn:hover, a[class*="bg-orange"]:hover {
    @apply transform -translate-y-1 shadow-xl;
}

/* Enhanced button visibility */
.bg-orange-500, .bg-orange-600 {
    background-color: #f97316 !important;
    color: white !important;
    border: 2px solid #ea580c !important;
}

.bg-orange-500:hover, .bg-orange-600:hover {
    background-color: #ea580c !important;
    border-color: #c2410c !important;
}

.text-orange-500, .text-orange-600 {
    color: #f97316 !important;
}

.border-orange-500, .border-orange-600 {
    border-color: #f97316 !important;
}

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

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

.slide-in {
    animation: slideIn 0.4s ease-out;
}

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

/* Smooth popup animation */
.popup-enter {
    animation: popupEnter 0.3s ease-out;
}

@keyframes popupEnter {
    from { 
        opacity: 0; 
        transform: scale(0.9) translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

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

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

/* Quote cart styles */
.quote-cart {
    @apply bg-orange-50 border-2 border-orange-200 rounded-lg p-6 mb-8 shadow-md;
}

/* Admin table styles */
.admin-table {
    @apply min-w-full divide-y divide-gray-200;
}

.admin-table th {
    @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.admin-table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

/* Testimonial styles */
.testimonial-card {
    @apply bg-white rounded-lg shadow-xl p-8 md:p-12 border border-gray-100;
}

.star-rating {
    @apply h-5 w-5 text-yellow-400 fill-current;
}

/* Service card styles */
.service-card {
    @apply text-center p-6 rounded-lg border border-gray-200 hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1 hover:border-orange-200;
}

.service-icon {
    @apply inline-flex items-center justify-center w-16 h-16 bg-orange-100 rounded-full mb-4;
}

/* Legal page styles */
.legal-content {
    @apply prose max-w-none;
}

.legal-content h2 {
    @apply text-2xl font-semibold text-gray-900 mb-4;
}

.legal-content p {
    @apply text-gray-600 mb-4;
}

.legal-content ul {
    @apply list-disc list-inside text-gray-600 space-y-2;
}

.legal-content ol {
    @apply list-decimal list-inside text-gray-600 space-y-2;
}

/* Package card styles */
.package-card {
    @apply bg-white rounded-lg shadow-md overflow-hidden hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1 border border-gray-100;
}

/* Contact info styles */
.contact-info-item {
    @apply flex items-start space-x-4;
}

.contact-icon {
    @apply bg-orange-100 p-3 rounded-lg shadow-sm;
}

/* Corporate service styles */
.corporate-service {
    @apply text-center p-6 rounded-lg border border-gray-200 hover:shadow-xl transition-all duration-300 transform hover:-translate-y-1 hover:border-orange-200;
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, #ea580c, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Enhanced shadows and effects */
.shadow-orange {
    box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.1), 0 10px 10px -5px rgba(234, 88, 12, 0.04);
}

.border-gradient {
    border-image: linear-gradient(135deg, #ea580c, #f97316) 1;
}

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