/*
 * Pre Product Styles
 * Frontend styling for Pre Product custom post type
 */

/* Archive Page Styles */
.pre-products-archive {
    padding: 40px 0;
    background: #f8f9fa;
}

.pre-products-archive .page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.pre-products-archive .page-title {
    font-size: 3em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Filter Bar */
.products-filter-bar {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.products-filter-bar select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.products-filter-bar select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Product Cards */
.pre-product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.4s ease;
    position: relative;
}

.pre-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 35px rgba(0,0,0,0.15);
}

/* Product Image */
.pre-product-card .product-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.pre-product-card .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pre-product-card:hover .card-image {
    transform: scale(1.1);
}

/* Stock Badges */
.stock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.stock-badge.out-of-stock {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    animation: pulse 2s infinite;
}

.stock-badge.on-backorder {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.stock-badge.in-stock {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

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

/* Product Info */
.pre-product-card .product-info {
    padding: 25px;
}

.pre-product-card .product-title {
    margin-bottom: 12px;
    font-size: 1.3em;
}

.pre-product-card .product-title a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: block;
}

.pre-product-card .product-title a:hover {
    color: #3498db;
}

.pre-product-card .product-sku {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 12px;
    font-weight: 500;
}

.pre-product-card .product-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 18px;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Price Styling */
.pre-product-card .product-price {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-price .original-price {
    color: #95a5a6;
    text-decoration: line-through;
    font-size: 0.8em;
    font-weight: 400;
}

.product-price .sale-price {
    color: #e74c3c;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-price .regular-price {
    color: #2c3e50;
}

.product-price .contact-price {
    color: #3498db;
    font-style: italic;
    font-weight: 500;
}

/* Categories */
.pre-product-card .product-categories {
    margin-bottom: 20px;
}

.category-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    color: #2c3e50;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    margin-right: 8px;
    margin-bottom: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: translateY(-2px);
}

/* Action Buttons */
.pre-product-card .product-actions {
    text-align: center;
}

.pre-product-card .btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.pre-product-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.pre-product-card .btn:hover::before {
    left: 100%;
}

.pre-product-card .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.pre-product-card .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    color: white;
}

/* Single Product Page */
.pre-product-single {
    padding: 60px 0;
    background: #f8f9fa;
}

.pre-product-single .container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.pre-product-single .main-product-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.pre-product-single .main-product-image:hover {
    transform: scale(1.02);
}

.pre-product-single .product-gallery {
    margin-top: 30px;
}

.pre-product-single .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.pre-product-single .gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.pre-product-single .gallery-item:hover {
    transform: scale(1.05);
}

.pre-product-single .gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

/* Product Details Section */
.pre-product-details {
    padding: 40px;
}

.pre-product-single .product-title {
    font-size: 2.8em;
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.2;
}

.pre-product-single .product-price {
    font-size: 2.2em;
    margin-bottom: 30px;
    font-weight: 700;
}

.pre-product-single .product-sku,
.pre-product-single .product-stock {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 500;
}

.pre-product-single .product-sku {
    background: linear-gradient(135deg, #ecf0f1, #d5dbdb);
    color: #2c3e50;
}

.pre-product-single .product-stock.instock {
    background: linear-gradient(135deg, #d5f4e6, #a3e9c6);
    color: #155724;
    border-left: 4px solid #27ae60;
}

.pre-product-single .product-stock.outofstock {
    background: linear-gradient(135deg, #fadbd8, #f1948a);
    color: #721c24;
    border-left: 4px solid #e74c3c;
}

.pre-product-single .product-stock.onbackorder {
    background: linear-gradient(135deg, #fdeaa7, #f7dc6f);
    color: #856404;
    border-left: 4px solid #f39c12;
}

/* Specifications Table */
.pre-product-single .product-specifications {
    margin: 40px 0;
}

.pre-product-single .product-specifications h4 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.pre-product-single .specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.pre-product-single .specs-table th,
.pre-product-single .specs-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.pre-product-single .specs-table th {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    font-weight: 600;
    width: 30%;
}

.pre-product-single .specs-table td {
    background: white;
}

.pre-product-single .specs-table tr:last-child th,
.pre-product-single .specs-table tr:last-child td {
    border-bottom: none;
}

/* Taxonomy Section */
.pre-product-single .product-taxonomy {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.pre-product-single .product-categories,
.pre-product-single .product-tags {
    margin-bottom: 15px;
}

.pre-product-single .product-categories a,
.pre-product-single .product-tags a {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    margin-right: 10px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #ebf3fd, #d6eaff);
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pre-product-single .product-categories a:hover,
.pre-product-single .product-tags a:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: translateY(-2px);
}

/* Shortcode Styles */
.pre-products-shortcode {
    margin: 40px 0;
}

.pre-products-shortcode .pre-product-card-shortcode {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.pre-products-shortcode .pre-product-card-shortcode:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.pre-products-shortcode .card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pre-products-shortcode .pre-product-card-shortcode:hover .card-image {
    transform: scale(1.1);
}

.pre-products-shortcode .product-info {
    padding: 25px;
}

.pre-products-shortcode .product-title a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.pre-products-shortcode .product-title a:hover {
    color: #3498db;
}

.pre-products-shortcode .product-price {
    font-weight: 700;
    margin: 15px 0;
    font-size: 1.3em;
}

.pre-products-shortcode .product-excerpt {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.5;
}

.pre-products-shortcode .btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pre-products-shortcode .btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

/* Pagination */
.pagination-wrapper {
    text-align: center;
    margin-top: 50px;
}

.pagination-wrapper .page-numbers {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 5px;
    background: white;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pagination-wrapper .page-numbers:hover,
.pagination-wrapper .page-numbers.current {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: translateY(-2px);
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.no-products h3 {
    font-size: 2em;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.no-products p {
    color: #95a5a6;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pre-products-archive .page-title {
        font-size: 2em;
    }
    
    .products-filter-bar {
        padding: 20px;
    }
    
    .products-filter-bar .col-md-4 {
        margin-bottom: 15px;
    }
    
    .pre-product-details {
        padding: 20px;
    }
    
    .pre-product-single .product-title {
        font-size: 2em;
    }
    
    .pre-product-single .product-price {
        font-size: 1.6em;
    }
    
    .pre-product-card .product-image {
        height: 220px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .gallery-item img {
        height: 80px;
    }
}

@media (max-width: 480px) {
    .pre-product-single .product-title {
        font-size: 1.6em;
    }
    
    .pre-product-single .product-price {
        font-size: 1.4em;
    }
    
    .pre-product-card .product-image {
        height: 180px;
    }
    
    .products-filter-bar {
        padding: 15px;
    }
    
    .pre-product-details {
        padding: 15px;
    }
}

/* Widget Styles */
.pre-product-widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pre-product-widget-list li {
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
    overflow: hidden;
}

.pre-product-widget-list li:last-child {
    border-bottom: none;
}

.pre-product-widget-list a {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.pre-product-widget-list a:hover {
    color: #3498db;
}

.pre-product-widget-list strong {
    font-size: 0.9em;
    line-height: 1.3;
}

.pre-product-widget-list small {
    color: #7f8c8d;
    font-size: 0.8em;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pre-product-card {
    animation: fadeInUp 0.6s ease;
}

.pre-product-card:nth-child(2) {
    animation-delay: 0.1s;
}

.pre-product-card:nth-child(3) {
    animation-delay: 0.2s;
}

.pre-product-card:nth-child(4) {
    animation-delay: 0.3s;
}
