/* 
 * Shop Styles for NumisHaven
 * File: assets/css/shop.css
 */

/* Shop Container */
.numishaven-shop-container,
.numishaven-shop-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Shop Hero Section */
.shop-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
}

.shop-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.shop-hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Shop Controls */
.shop-controls {
    background: white;
    padding: 30px;
    margin: 40px 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #ecf0f1;
    border-radius: 30px;
    padding: 12px 25px;
    flex: 1;
    max-width: 500px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px #3498db;
}

.search-box input {
    background: transparent;
    border: none;
    padding: 8px 15px;
    width: 100%;
    font-size: 1rem;
    outline: none;
}

.search-box i {
    color: #95a5a6;
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:hover {
    border-color: #3498db;
}

/* Button Styles */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #2c3e50;
}

.btn-secondary {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-secondary:hover {
    background: #3498db;
    color: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.products-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-badge.rare { background: #e74c3c; }
.product-badge.ancient { background: #9b59b6; }
.product-badge.replica { background: #f39c12; }
.product-badge.medieval { background: #d35400; }
.product-badge.modern { background: #3498db; }
.product-badge.bullion { background: #f1c40f; color: #2c3e50; }
.product-badge.default { background: #95a5a6; }

.product-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #2c3e50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-actions button:hover {
    background: #3498db;
    color: white;
}

.product-content {
    padding: 20px;
}

.product-category {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: #3498db;
}

.product-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.product-rating {
    color: #f39c12;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
}

.original-price {
    font-size: 1rem;
    color: #95a5a6;
    text-decoration: line-through;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-product {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-product:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination Styles */
.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px 0 30px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 12px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.pagination-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: #3498db;
    color: white;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn.disabled:hover {
    background: white;
    color: #3498db;
}

.pagination-info {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Results Info */
.results-info {
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eaeaea;
}

.showing-results {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

/* No Products Found */
.no-products-found {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-products-content i {
    color: #bdc3c7;
    margin-bottom: 20px;
}

.no-products-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.no-products-content p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.quick-view-content {
    position: relative;
    background: white;
    margin: 5% auto;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.quick-view-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-loader {
    text-align: center;
    padding: 60px 20px;
}

.quick-view-product-content {
    padding: 30px;
    max-height: 80vh;
    overflow-y: auto;
}

/* WooCommerce Pagination */
.page-numbers {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.page-numbers li {
    margin: 0;
}

.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 12px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    transition: all 0.3s ease;
}

.page-numbers a:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

.page-numbers .current {
    background: #3498db;
    color: white;
}

.page-numbers .dots {
    border-color: transparent;
    background: transparent;
}

/* Notifications */
.shop-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.shop-notification.error {
    background: #e74c3c;
}

.shop-notification.info {
    background: #3498db;
}

.shop-notification.warning {
    background: #f39c12;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 1024px) {
    .shop-hero h1 {
        font-size: 2.5rem;
    }
    
    .controls-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .numishaven-shop-container,
    .numishaven-shop-wrapper {
        padding: 0 15px 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .shop-hero {
        padding: 60px 0;
    }
    
    .shop-hero h1 {
        font-size: 2rem;
    }
    
    .shop-controls {
        padding: 20px;
    }
    
    .filter-controls {
        justify-content: center;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .shop-pagination {
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 10px 15px;
        min-width: 40px;
        font-size: 0.9rem;
    }
    
    .page-numbers a,
    .page-numbers span {
        padding: 10px 15px;
        min-width: 40px;
        font-size: 0.9rem;
    }
    
    .quick-view-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .numishaven-shop-container,
    .numishaven-shop-wrapper {
        padding: 0 10px 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-hero {
        padding: 40px 0;
    }
    
    .shop-hero h1 {
        font-size: 1.8rem;
    }
    
    .shop-hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 200px;
    }
    
    .filter-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .shop-pagination {
        gap: 3px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        min-width: 35px;
        font-size: 0.8rem;
    }
    
    .page-numbers a,
    .page-numbers span {
        padding: 8px 12px;
        min-width: 35px;
        font-size: 0.8rem;
    }
    
    .quick-view-content {
        margin: 5% auto;
        width: 98%;
    }
    
    .product-actions {
        opacity: 1; /* Always show on mobile */
    }
}

/* Print Styles */
@media print {
    .shop-controls,
    .product-actions,
    .btn-group {
        display: none;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}