/**
 * FeedManager Frontend Styles
 * Shop page styling with responsive product grid
 *
 * @author    SamuraiPizzaCat
 * @copyright 2025 SamuraiPizzaCat
 */

/* ===== Shop Page Title ===== */
.shop-page-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.shop-logo-title {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

/* ===== Shop Header Section ===== */
.shop-header-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.shop-marketing-text {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
}

.shop-delivery-conditions h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.shop-delivery-conditions {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/* ===== Products Header ===== */
.shop-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 2px solid #e1e1e1;
}

.shop-products-count p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.shop-products-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-products-per-page label {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.shop-products-per-page select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ===== Products Grid ===== */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.shop-product-item {
    position: relative;
}

.shop-product-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.shop-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ===== Product Image ===== */
.shop-product-image {
    position: relative;
    padding-top: 100%; /* Square aspect ratio */
    background: #f8f9fa;
    overflow: hidden;
}

.shop-product-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.shop-product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.shop-product-badge.best-deal {
    background: #ff6b6b;
}

/* ===== Product Info ===== */
.shop-product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.shop-product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.shop-product-name a {
    color: #333;
    text-decoration: none;
}

.shop-product-name a:hover {
    color: #007bff;
}

.shop-product-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* ===== Product Prices ===== */
.shop-product-prices {
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
}

.shop-product-shop-price {
    margin-bottom: 5px;
}

.shop-price-label {
    font-size: 13px;
    color: #666;
    margin-right: 5px;
}

.shop-price-value {
    font-size: 20px;
    font-weight: 700;
    color: #28a745;
}

.shop-product-our-price {
    margin-top: 5px;
}

.our-price-label {
    font-size: 12px;
    color: #999;
    margin-right: 5px;
}

.our-price-value {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

/* ===== Product Actions ===== */
.shop-product-actions {
    margin-top: auto;
}

.shop-product-actions .btn {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
}

/* ===== Pagination ===== */
.shop-pagination {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.shop-pagination .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.shop-pagination .page-item {
    list-style: none;
}

.shop-pagination .page-link {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.shop-pagination .page-link:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.shop-pagination .page-item.active .page-link {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.shop-pagination .page-item.disabled .page-link {
    color: #999;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* ===== Responsive Design ===== */

/* Tablets (3 columns) */
@media (max-width: 1200px) {
    .shop-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small tablets (2 columns) */
@media (max-width: 768px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .shop-products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .shop-product-name {
        font-size: 14px;
    }
    
    .shop-price-value {
        font-size: 18px;
    }
}

/* Mobile (1 column) */
@media (max-width: 480px) {
    .shop-products-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-page-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .shop-logo-title {
        max-height: 40px;
    }
    
    .shop-header-section {
        padding: 15px;
    }
    
    .shop-product-card {
        max-width: 100%;
    }
}

/* ===== Empty State ===== */
.shop-page-wrapper .alert-info {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 40px 0;
}

/* ===== Override Theme Capitalize on Shop Pages ===== */
/* Override shop title capitalize */
#js-product-list-header .block-category h1 {
    text-transform: none !important;
}

/* Override breadcrumb capitalize */
.breadcrumb ol {
    text-transform: none !important;
}

/* ===== Shops Overview Page ===== */
#shops-overview .page-header {
    margin-bottom: 30px;
    text-align: center;
}

#shops-overview .page-header h1 {
    text-transform: none !important;
}

#shops-overview .page-header p {
    color: #666;
    font-size: 16px;
}

.shops-count {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

.shops-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.shop-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.shop-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.shop-card-header {
    background: #f8f9fa;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.shop-logo-wrapper {
    max-width: 100%;
}

.shop-logo {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}

.shop-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-initial {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
}

.shop-card-body {
    padding: 20px;
}

.shop-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    text-transform: none !important;
}

.shop-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.shop-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.shop-product-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.shop-product-count .material-icons {
    font-size: 18px;
}

.shop-card-footer {
    margin-top: 15px;
}

.shop-card-footer .btn {
    width: 100%;
}

/* Responsive for shops grid */
@media (max-width: 1200px) {
    .shops-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .shops-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .shops-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Shop Product Miniature - Simple Text Link Styling ===== */

/* Clickable price link (added by JavaScript) */
.shop-price-link {
    text-decoration: none !important;
    color: inherit !important;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-price-link:hover {
    transform: scale(1.05);
    color: #2fb5d2 !important;
}

.shop-price-link .price {
    transition: all 0.2s ease;
}

/* Simple "Lees meer" text link (added by JavaScript) */
.shop-read-more-link {
    margin-top: 8px;
    text-align: center;
    padding: 5px 0;
}

.read-more-text-link {
    color: #666 !important;
    font-size: 13px;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-block;
}

.read-more-text-link:hover {
    color: #2fb5d2 !important;
    border-bottom-color: #2fb5d2;
    text-decoration: none !important;
}

/* Hide unnecessary action buttons on shop pages */
.controller-feedmanager-shop .product-miniature .product-actions-main {
    display: none !important;
}

.controller-feedmanager-shop .product-miniature .quick-view,
.controller-feedmanager-shop .product-miniature .st-compare-button,
.controller-feedmanager-shop .product-miniature .st-wishlist-button,
.controller-feedmanager-shop .product-miniature .compare,
.controller-feedmanager-shop .product-miniature .wishlist {
    display: none !important;
}

/* Override theme hover effects on shop pages */
.controller-feedmanager-shop .product-miniature:hover .product-actions-main {
    display: none !important;
}

/* External links should not show underline */
.controller-feedmanager-shop .product-miniature a[target="_blank"] {
    text-decoration: none !important;
}

/* Clean product miniature on shop pages */
.controller-feedmanager-shop .product-miniature {
    position: relative;
}

.controller-feedmanager-shop .product-miniature .thumbnail-container {
    position: relative;
}

/* Hide action buttons on shop pages */
.products .thumbnail-container .product-actions,
.products .thumbnail-container .product-actions-main {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .read-more-text-link {
        font-size: 12px;
    }
}

