/**
 * Hartman Products Styles with Client-Side Pagination
 */

.hartman-products-wrapper {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.hartman-products-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    transition: opacity 0.3s ease;
    opacity: 0;
}

/* Show grid after JS initializes pagination */
.hartman-products-grid.initialized {
    opacity: 1;
}

/* Column layouts */
.hartman-columns-1 .hartman-product-item {
    width: 100%;
}

.hartman-columns-2 .hartman-product-item {
    width: 50%;
}

.hartman-columns-3 .hartman-product-item {
    width: 33.333%;
}

.hartman-columns-4 .hartman-product-item {
    width: 25%;
}

.hartman-columns-5 .hartman-product-item {
    width: 20%;
}

.hartman-columns-6 .hartman-product-item {
    width: 16.666%;
}

/* Product item styles */
.hartman-product-item {
    box-sizing: border-box;
    margin-bottom: 35px;
}

.hartman-product-inner {
    background: #2a353e;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.hartman-product-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

/* Product image styles */
.hartman-product-image {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
}

.hartman-product-image a {
    display: block;
    line-height: 0;
}

.hartman-product-image img {
    width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

/* NEW 2026 RANGE Badge */
.hartman-new-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-color: #2a353e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeInBadge 0.5s ease forwards;*/
}

.hartman-new-badge span {
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    font-weight:700 !important;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hartman-new-badge-date {
    font-size:18px !important;
    font-weight:700 !important;
    line-height:1 !important;
}

@keyframes fadeInBadge {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Product title styles */
.hartman-product-title {
    margin: 10px;
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    font-family:"Segoe UI", Sans-serif !important;
    cursor: pointer;
}

.hartman-product-title a {
    color: #fff;
    text-decoration: none !important;
    transition: color 0.3s ease;
    display: block;
}

.hartman-product-title a:hover {
    color: #fff;
    text-decoration: none !important;
}

/* Product rating styles */
.hartman-product-rating {
    margin-bottom: 10px;
}

.hartman-product-rating .star-rating {
    font-size: 14px;
    color: #ffa500;
}

/* Product price styles */
.hartman-product-price {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.hartman-product-price .price {
    color: inherit;
}

.hartman-product-price .price del {
    color: #999;
    font-weight: normal;
    margin-right: 5px;
}

.hartman-product-price .price ins {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

/* Add to cart button styles */
.hartman-product-add-to-cart {
    margin-top: auto;
}

.hartman-product-add-to-cart .button {
    width: 100%;
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1;
}

.hartman-product-add-to-cart .button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.hartman-product-add-to-cart .button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.hartman-product-add-to-cart .button.added {
    background: #27ae60;
}

.hartman-product-add-to-cart .button.added::after {
    content: "✓";
    margin-left: 5px;
}

/* Sale badge */
.hartman-product-image .onsale {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

/* Out of stock overlay */
.hartman-product-item.out-of-stock .hartman-product-image::after {
    content: "Out of Stock";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #666;
    border-radius: 4px;
}

/* Pagination Styles */
.hartman-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px 0;
    gap: 8px;
    flex-wrap: wrap;
}

.hartman-pagination-top {
    margin-bottom: 20px;
}

.hartman-pagination-bottom {
    margin-top: 40px;
}

.hartman-pagination a,
.hartman-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1;
}

.hartman-pagination a {
    background: #ccc;
    color: #2a353e !important;
    cursor: pointer;
    text-decoration: none !important;
}

.hartman-pagination a:hover {
    background: #2a353e;
    color: #ffffff !important;
    text-decoration: none !important;
}

.hartman-pagination .current {
    background: #2a353e;
    color: #ffffff;
    cursor: default;
}

.hartman-pagination .disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.hartman-pagination .dots {
    background: transparent;
    color: #666;
    cursor: default;
    border: none;
    font-weight: normal;
}

.hartman-pagination .prev,
.hartman-pagination .next {
    padding: 8px 16px;
    font-weight: 500;
}

/* Load More Button */
.hartman-load-more {
    display: block;
    width: auto;
    max-width: 300px;
    margin: 0 auto;
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.hartman-load-more:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

.hartman-load-more.loading {
    opacity: 0.7;
    cursor: not-allowed;
    padding-left: 50px;
}

.hartman-load-more.loading::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Notifications */
.hartman-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    z-index: 9999;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.hartman-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.hartman-notification-success {
    background: #27ae60;
}

.hartman-notification-error {
    background: #e74c3c;
}

.hartman-notification-info {
    background: #3498db;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .hartman-columns-5 .hartman-product-item,
    .hartman-columns-6 .hartman-product-item {
        width: 25%;
    }
    
    .hartman-pagination a,
    .hartman-pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .hartman-new-badge {
        width: 60px;
        height: 60px;
    }
    
    .hartman-new-badge span {
        font-size: 8px;
    }
}

@media (max-width: 768px) {
    /* Add gap to the grid container */
    .hartman-products-grid {
        gap: 10px !important;
    }
    
    .hartman-columns-3 .hartman-product-item,
    .hartman-columns-4 .hartman-product-item,
    .hartman-columns-5 .hartman-product-item,
    .hartman-columns-6 .hartman-product-item {
        width: calc(50% - 5px) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Override the wrapper negative margins */
    .hartman-products-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .hartman-product-inner {
        padding: 15px;
    }
    
   .hartman-pagination {
        gap: 6px;
        margin-top: -15px !important;
        margin-bottom: 15px !important;
    }
    
    /* LARGER PAGINATION BUTTONS ON MOBILE */
    .hartman-pagination a,
    .hartman-pagination span {
        min-width: 44px;
        height: 44px;
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .hartman-pagination .prev,
    .hartman-pagination .next {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .hartman-load-more {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .hartman-new-badge {
        width: 55px;
        height: 55px;
    }
    
    .hartman-new-badge span {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    /* Add gap to the grid container */
    .hartman-products-grid {
        gap: 10px !important;
    }
    
    .hartman-columns-2 .hartman-product-item,
    .hartman-columns-3 .hartman-product-item,
    .hartman-columns-4 .hartman-product-item,
    .hartman-columns-5 .hartman-product-item,
    .hartman-columns-6 .hartman-product-item {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Override the wrapper negative margins */
    .hartman-products-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .hartman-product-inner {
        padding: 12px;
    }
    
    .hartman-product-title {
        font-size: 14px;
    }
    
    .hartman-product-price {
        font-size: 14px;
    }
    
    .hartman-pagination {
        gap: 6px;
        margin-top: -15px !important;
    }
    
    /* EVEN LARGER PAGINATION BUTTONS ON SMALL MOBILE */
    .hartman-pagination a,
    .hartman-pagination span {
        min-width: 48px;
        height: 48px;
        font-size: 15px;
        padding: 12px 14px;
    }
    
    .hartman-pagination .prev,
    .hartman-pagination .next {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    /* Hide some page numbers on very small screens */
    .hartman-pagination a:not(.prev):not(.next):not(.current) {
        display: none;
    }
    
    .hartman-pagination .current,
    .hartman-pagination a.prev,
    .hartman-pagination a.next,
    .hartman-pagination span.prev,
    .hartman-pagination span.next {
        display: inline-flex !important;
    }
    
    .hartman-load-more {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        max-width: none;
    }
    
    .hartman-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 10px;
    }
    
    .hartman-new-badge {
        width: 50px;
        height: 50px;
    }
    
    .hartman-new-badge span {
        font-size: 6.5px;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.hartman-product-add-to-cart .button.loading::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Fade transition for image hover */
.hartman-product-image img {
    opacity: 1;
    transition: opacity 1s ease, transform 1s ease;
}

/* Smooth scroll behavior - DISABLED to prevent mobile jump issues */
html {
    scroll-behavior: auto;
}