/* css/equipment-item.css */

/* Essential Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header adjustments for equipment item page */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* Equipment Item specific styles */
.equipment-item-section {
    margin-top: 80px; /* Account for fixed header */
    padding: 2rem 0;
}

/* Error handling */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
}

.error-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-content i {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.error-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Equipment Detail Container */
.equipment-detail-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 3rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Equipment Header */
.equipment-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.equipment-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.equipment-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Equipment Content */
.equipment-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem 2rem;
}

/* Gallery Section */
.gallery-section {
    position: relative;
}

.gallery-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.gallery-main-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    -webkit-transition: -webkit-transform 0.3s ease;
    -moz-transition: -moz-transform 0.3s ease;
    -o-transition: -o-transform 0.3s ease;
    transition: transform 0.3s ease;
}

.gallery-main-img:hover {
    -webkit-transform: scale(1.02);
    -ms-transform: scale(1.02);
    transform: scale(1.02);
}

.gallery-main-img.loading {
    opacity: 0.7;
    -webkit-filter: blur(2px);
    filter: blur(2px);
}

/* Gallery Thumbnails */
.gallery-thumbs {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 3px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.gallery-thumb.active {
    border: 3px solid #3498db;
    opacity: 1;
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
}

.gallery-thumb:hover {
    opacity: 1;
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
}

/* Gallery Navigation */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    color: #3498db;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: #3498db;
    color: white;
    -webkit-transform: translateY(-50%) scale(1.1);
    -ms-transform: translateY(-50%) scale(1.1);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn:active {
    -webkit-transform: translateY(-50%) scale(0.95);
    -ms-transform: translateY(-50%) scale(0.95);
    transform: translateY(-50%) scale(0.95);
}

#galleryPrev {
    left: 10px;
}

#galleryNext {
    right: 10px;
}

/* Details Section */
.details-section {
    padding: 20px;
}

.details-header {
    margin-bottom: 30px;
}

.details-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-header h2:before {
    content: "🔧";
    font-size: 1.5rem;
}

/* Equipment Details Grid */
.equipment-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.detail-card:hover {
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.detail-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* Price Card */
.price-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.price-card .detail-label,
.price-card .detail-value {
    color: white;
}

/* Description Section */
.description-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.description-section h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.description-section h3:before {
    content: "📝";
    font-size: 1.2rem;
}

.description-text {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

/* Contact Section */
.contact-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.contact-section h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.contact-section h3:before {
    content: "📞";
    font-size: 1.2rem;
}

/* Contact Info Grid */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #e9ecef;
    -webkit-transform: translateX(5px);
    -ms-transform: translateX(5px);
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.2rem;
    color: #3498db;
    width: 20px;
    text-align: center;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-enhanced {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.btn-primary-enhanced {
    background: #3498db;
    color: white;
}

.btn-primary-enhanced:hover {
    background: #2980b9;
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
}

.btn-secondary-enhanced {
    background: #95a5a6;
    color: white;
}

.btn-secondary-enhanced:hover {
    background: #7f8c8d;
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
}

.btn-success-enhanced {
    background: #2ecc71;
    color: white;
}

.btn-success-enhanced:hover {
    background: #27ae60;
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
}

/* Detail Icons */
.detail-label[data-type="model"]:before { content: "🔧"; margin-right: 5px; }
.detail-label[data-type="year"]:before { content: "📅"; margin-right: 5px; }
.detail-label[data-type="condition"]:before { content: "⭐"; margin-right: 5px; }
.detail-label[data-type="location"]:before { content: "📍"; margin-right: 5px; }
.detail-label[data-type="phone"]:before { content: "📞"; margin-right: 5px; }
.detail-label[data-type="email"]:before { content: "✉️"; margin-right: 5px; }

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
    }
    
    .equipment-detail-container {
        margin: 1rem;
    }
}

@media (max-width: 768px) {
    .equipment-item-section {
        margin-top: 60px;
        padding: 1rem 0;
    }
    
    .equipment-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .equipment-header h1 {
        font-size: 2rem;
    }
    
    .gallery-main-img {
        max-height: 300px;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .equipment-details-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-enhanced {
        justify-content: center;
    }
    
    .equipment-detail-container {
        margin: 0.5rem;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .equipment-header {
        padding: 2rem 1rem;
    }
    
    .equipment-header h1 {
        font-size: 1.8rem;
    }
    
    .equipment-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    .gallery-container {
        border-radius: 8px;
    }
    
    .detail-card {
        padding: 1rem;
    }
    
    .details-header h2 {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .header,
    .gallery-nav-btn,
    .action-buttons {
        display: none !important;
    }
    
    .equipment-item-section {
        margin-top: 0;
    }
    
    .equipment-detail-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .equipment-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}
