/* ====================================
   CUSTOM SHOP PAGE STYLES
   ==================================== */

/* Shop Header */
.shop-header {
    background: linear-gradient(135deg, #0066CC 0%, #1A1F2E 100%);
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.shop-header .page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: white;
}

.shop-header .shop-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Filters Section */
.shop-filters-section {
    background: #f8f9fa;
    padding: 20px 0;
    border-bottom: 2px solid #e9ecef;
}

.custom-filters {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-item label {
    font-weight: 600;
    color: #2C3E50;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 180px;
}

.filter-select:focus {
    outline: none;
    border-color: #0066CC;
}

/* Products Section */
.products-section {
    padding: 40px 0;
}

/* Products Grid - CUSTOM LAYOUT */
.custom-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* Product Card */
.custom-product-card {
    background: white;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.custom-product-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

/* Image Wrapper */
.product-image-wrapper {
    position: relative;
    background: #fafafa;
    padding: 20px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
}

/* Discount Badge - TOP LEFT */
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #FF6B00;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
}

/* New Badge - TOP RIGHT */
.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
}

/* Image Navigation Arrows */
.image-navigation {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.custom-product-card:hover .image-navigation {
    opacity: 1;
}

.nav-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #0066CC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #0066CC;
    color: white;
    transform: scale(1.1);
}

/* Quick Actions */
.quick-actions {
    position: absolute;
    top: 60px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.custom-product-card:hover .quick-actions {
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e3e3e3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #f8f9fa;
    border-color: #0066CC;
    transform: scale(1.1);
}

.action-btn.active {
    background: #ffe6e6;
    border-color: #ff4444;
}

/* Product Info Wrapper */
.product-info-wrapper {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Product Title */
.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    min-height: 45px;
    line-height: 1.4;
}

.product-title a {
    color: #2C3E50;
    text-decoration: none;
}

.product-title a:hover {
    color: #0066CC;
}

/* Product Price */
.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #388e3c;
    margin: 5px 0;
}

.product-price del {
    color: #8a8a8a;
    font-size: 0.95rem;
    margin-right: 8px;
}

.product-price ins {
    text-decoration: none;
}

/* Stock Status */
.stock-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 0;
}

.stock-status.in-stock {
    color: #28a745;
}

.stock-status.out-of-stock {
    color: #dc3545;
}

/* Product Actions - BUTTONS ALWAYS BELOW */
.product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
}

.btn-add-cart,
.btn-buy-now,
.btn-view-product {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-add-cart {
    background: #ff9f00;
    color: white;
}

.btn-add-cart:hover {
    background: #e58100;
}

.btn-buy-now {
    background: #fb641b;
    color: white;
}

.btn-buy-now:hover {
    background: #d44f12;
}

.btn-view-product {
    background: #0066CC;
    color: white;
}

.btn-view-product:hover {
    background: #004a99;
}

/* Quick View Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: white;
    border: 2px solid #e3e3e3;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #ff4444;
    color: white;
    border-color: #ff4444;
}

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

.shop-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    color: #2C3E50;
    text-decoration: none;
    transition: all 0.3s;
}

.shop-pagination .page-numbers:hover,
.shop-pagination .page-numbers.current {
    background: #0066CC;
    color: white;
    border-color: #0066CC;
}

/* Notification */
.action-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    border: 2px solid #28a745;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .custom-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .custom-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .shop-header .page-title {
        font-size: 1.8rem;
    }

    .custom-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-item {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .custom-products-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }
}

/* Products Section - Desktop padding */
.products-section .container,
.products-section {
    padding-left: 60px;
    padding-right: 60px;
}

/* Remove extra padding on mobile */
@media (max-width: 768px) {
    .products-section .container,
    .products-section {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ==========================================
   FORCE CATEGORY PAGES TO MATCH OUR PRODUCTS
   ========================================== */

/* Apply to both custom shop page AND category archives */
body.custom-shop-page .site,
body.category-archive-page .site,
body.custom-shop-page #page,
body.category-archive-page #page,
body.custom-shop-page .site-content,
body.category-archive-page .site-content,
body.custom-shop-page #content,
body.category-archive-page #content,
body.custom-shop-page #primary,
body.category-archive-page #primary,
body.custom-shop-page .ast-container,
body.category-archive-page .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.custom-shop-page .entry-content,
body.category-archive-page .entry-content {
    margin: 0 !important;
}

/* Force sections full width for category pages */
body.category-archive-page .shop-header,
body.category-archive-page .shop-filters-section,
body.category-archive-page .products-section {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* No products message styling */
.no-products-message {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
    background: white;
    border-radius: 12px;
    margin: 40px;
}

.no-products-message h2 {
    font-size: 2rem;
    color: #2C3E50;
    margin-bottom: 20px;
}

.no-products-message a {
    color: #0066CC;
    text-decoration: none;
    font-weight: 600;
}

.no-products-message a:hover {
    text-decoration: underline;
}

/* Category Breadcrumb Styling */
.category-breadcrumb {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
    text-align: center;
}

.category-breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 500;
}

.category-breadcrumb a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.category-breadcrumb span {
    color: white;
    font-weight: 600;
}