/**
 * Product Downloads Module - Professional CSS
 * PrestaShop 1.6.1.10
 * Author: Hotmark e-Commerce
 * Color Scheme: Primary Blue #2196F3, Success Green #4CAF50
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */

/* Consistent Button Styles */
.btn-download,
.search-btn,
.btn-view-product,
.clear-btn {
    border-radius: 25px !important; /* All buttons rounded */
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    /* padding: 12px 30px !important; */
    font-size: 12px !important;
}

/* Primary Download Button - Green */
.btn-download {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    color: #fff !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-download:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%) !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

/* Secondary Button - Blue */
.search-btn,
.btn-view-product {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%) !important;
    color: #fff !important;
    border-color: #2196F3 !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.search-btn:hover,
.btn-view-product:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%) !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
}

/* Clear/Cancel Button - Gray */
.clear-btn,
.btn-default {
    background: linear-gradient(135deg, #757575 0%, #616161 100%) !important;
    color: #fff !important;
    border-color: #757575 !important;
    border-radius: 25px !important;
}

.clear-btn:hover,
.btn-default:hover {
    background: linear-gradient(135deg, #616161 0%, #424242 100%) !important;
}

/* ============================================
   SOFTWARE DOWNLOADS PAGE
   ============================================ */

.software-downloads-container {
    margin: 30px 0;
    padding: 0 15px;
}

/* Page Header */
.page-heading {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2196F3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search Box */
.downloads-search-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border: 2px solid #e0e0e0;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.search-input-wrapper {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input-wrapper input.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    font-size: 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.search-input-wrapper input.search-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    outline: none;
}

.downloads-count {
    color: #555;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 20px;
    background: #e3f2fd;
    border-radius: 25px;
    display: inline-block;
}

.downloads-count i {
    margin-right: 8px;
    color: #2196F3;
    font-size: 18px;
}

/* Search Results Info */
.search-results-info {
    margin-bottom: 25px;
    padding: 15px 25px;
    background: #e3f2fd;
    border-left: 5px solid #2196F3;
    border-radius: 8px;
}

.search-results-info p {
    margin: 0;
    color: #1565C0;
    font-weight: 600;
}

/* Downloads Grid */
.downloads-grid {
    margin: 0 -15px;
}

.download-card {
    margin-bottom: 30px;
    padding: 0 15px;
}

.download-card-inner {
    background: #fff;
    border: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.download-card-inner:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #2196F3;
    transform: translateY(-8px);
}

/* Product Image */
.download-image {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    overflow: hidden;
}

.download-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.download-card-inner:hover .download-image img {
    transform: scale(1.1);
}

/* Download Info */
.download-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    margin-bottom: 12px;
}

.product-link {
    color: #757575;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-link:hover {
    color: #2196F3;
}

.download-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #2c3e50;
    line-height: 1.4;
}

.download-title i {
    color: #4CAF50;
    margin-right: 8px;
}

.download-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 15px 0;
    flex: 1;
}

.download-meta {
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    font-size: 13px;
    color: #757575;
}

.download-meta > div {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.download-meta i {
    margin-right: 8px;
    color: #2196F3;
    font-size: 14px;
    width: 16px;
}

/* Download Actions */
.download-actions {
    padding: 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-actions .btn {
    flex: 1;
    min-width: 120px;
}

.download-actions .btn i {
    margin-right: 6px;
}

/* No Downloads Found */
.no-downloads-found {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px dashed #ccc;
    border-radius: 15px;
}

.no-downloads-icon i {
    font-size: 80px;
    color: #bbb;
    margin-bottom: 25px;
    display: block;
}

.no-downloads-found h3 {
    font-size: 24px;
    color: #555;
    margin-bottom: 15px;
    font-weight: 700;
}

.no-downloads-found p {
    color: #777;
    font-size: 16px;
    margin-bottom: 15px;
}

.no-downloads-found a {
    color: #2196F3;
    font-weight: 600;
    text-decoration: underline;
}

.no-downloads-found a:hover {
    color: #1976D2;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .page-heading {
        font-size: 26px;
    }
    
    .downloads-search-box {
        padding: 20px;
    }
    
    .search-input-wrapper {
        flex-direction: column;
    }
    
    .search-input-wrapper input.search-input {
        width: 100%;
        min-width: auto;
    }
    
    .search-input-wrapper .btn {
        width: 100%;
    }
    
    .download-actions {
        flex-direction: column;
    }
    
    .download-actions .btn {
        width: 100%;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .page-heading {
        font-size: 22px;
        padding-bottom: 15px;
    }
    
    .downloads-search-box {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .downloads-count {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .download-info {
        padding: 20px;
    }
    
    .download-title {
        font-size: 16px;
    }
    
    .download-description {
        font-size: 13px;
    }
    
    .no-downloads-found {
        padding: 50px 15px;
    }
    
    .no-downloads-icon i {
        font-size: 60px;
    }
    
    .no-downloads-found h3 {
        font-size: 20px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.download-card {
    animation: fadeInUp 0.5s ease;
    animation-fill-mode: both;
}

.download-card:nth-child(1) { animation-delay: 0.1s; }
.download-card:nth-child(2) { animation-delay: 0.2s; }
.download-card:nth-child(3) { animation-delay: 0.3s; }
.download-card:nth-child(4) { animation-delay: 0.4s; }
.download-card:nth-child(5) { animation-delay: 0.5s; }
.download-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .download-actions,
    .downloads-search-box,
    .search-btn,
    .clear-btn {
        display: none !important;
    }
    
    .download-card-inner {
        break-inside: avoid;
        border: 1px solid #000;
    }
}
