/**
 * Slick Slider Custom Styles for Agritrend Theme
 * Custom arrow and dot navigation styling
 *
 * @category  Panth
 * @package   Panth_Homepage
 */

/* ===================================
   Slick Loading Fix - Override ajax-loader.gif
   =================================== */
.slick-loading .slick-list {
    background: #fff !important;
}

.slick-loading .slick-list:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1F2E44;
    border-radius: 50%;
    animation: slick-spinner 1s linear infinite;
}

@keyframes slick-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   Product Slider Container
   =================================== */
.product-slider-section {
    width: 100%;
    padding: 15px 0;
    background: #fff;
}

.product-slider-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.product-slider-header {
    text-align: center;
    margin-bottom: 0;
}

.product-slider-title {
    font-size: 32px;
    font-weight: 700;
    font-family: Poppins, sans-serif;
    color: #1F2E44;
    margin: 0 0 10px;
}

.product-slider-subtitle {
    font-size: 16px;
    font-family: Poppins, sans-serif;
    color: #666666;
    margin: 0;
}

/* ===================================
   Slick Slider Items Container
   =================================== */
.product-slider-items {
    position: relative;
    margin: 0 -15px !important;
}

.product-slider-item {
    padding: 15px 5px;
    outline: none;
}

/* ===================================
   Product Card Styling
   =================================== */
.product-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.product-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    min-height: 280px;
    max-height: 280px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-category {
    font-size: 12px;
    font-family: Poppins, sans-serif;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.product-card-name {
    font-size: 16px;
    font-weight: 600;
    font-family: Poppins, sans-serif;
    color: #1e1e1e;
    margin: 0 0 8px;
    line-height: 1.4;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-link:hover .product-card-name {
    color: #1F2E44;
}

.product-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.product-card-features li {
    font-size: 13px;
    font-family: Poppins, sans-serif;
    color: #666666;
    line-height: 1.6;
    padding: 4px 0 4px 20px;
    position: relative;
}

.product-card-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #1F2E44;
    font-weight: bold;
}

.product-card-price {
    font-size: 18px;
    font-weight: 700;
    font-family: Poppins, sans-serif;
    color: #1F2E44;
    margin: 0 0 10px;
}

.product-card-description {
    font-size: 14px;
    font-family: Poppins, sans-serif;
    color: #666666;
    line-height: 1.5;
    margin: 0 0 15px;
    flex-grow: 1;
}

.product-card-action {
    margin-top: auto;
}

.product-card-button {
    display: inline-block;
    padding: 10px 20px;
    background: #1F2E44;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-family: Poppins, sans-serif;
    transition: background 0.3s ease;
    text-align: center;
}

.product-card-link:hover .product-card-button {
    background: #2B3F5C;
}

.product-slider-view-more {
    text-align: center;
    margin-top: 0;
}

.btn-view-more {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid #1F2E44;
    color: #1F2E44;
    text-decoration: none;
    font-weight: 600;
    font-family: Poppins, sans-serif;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-view-more:hover {
    background: #1F2E44;
    color: #ffffff;
}

/* ===================================
   Slick Arrows - Custom Styling
   =================================== */
.product-slider-items .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(31, 46, 68, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 0;
}

.product-slider-items .slick-arrow:before {
    font-family: Arial, sans-serif;
    font-size: 20px;
    color: #fff;
    line-height: 50px;
    display: block;
}

.product-slider-items .slick-arrow:hover {
    background: rgba(31, 46, 68, 1);
    transform: translateY(-50%) scale(1.1);
}

.product-slider-items .slick-prev {
    left: -25px;
}

.product-slider-items .slick-prev:before {
    content: '‹';
}

.product-slider-items .slick-next {
    right: -25px;
}

.product-slider-items .slick-next:before {
    content: '›';
}

/* Arrow hover effects */
.product-slider-items .slick-arrow.slick-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===================================
   Slick Dots - Custom Styling
   =================================== */
.product-slider-items .slick-dots {
    position: relative;
    bottom: 0;
    display: flex;
    justify-content: center;
    padding: 15px 0 0;
    margin: 0;
    list-style: none;
}

.product-slider-items .slick-dots li {
    margin: 0 6px;
}

.product-slider-items .slick-dots li button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid #1F2E44;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 0;
    transition: all 0.3s ease;
}

.product-slider-items .slick-dots li button:hover {
    background: rgba(31, 46, 68, 0.3);
    transform: scale(1.2);
}

.product-slider-items .slick-dots li.slick-active button {
    background: #1F2E44;
    transform: scale(1.3);
}

/* ===================================
   Responsive Styles
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .product-slider-section {
        padding: 40px 0;
    }

    .product-slider-title {
        font-size: 28px;
    }

    .product-card-image-wrapper {
        min-height: 240px;
        max-height: 240px;
    }

    .product-slider-items .slick-arrow {
        width: 45px;
        height: 45px;
    }

    .product-slider-items .slick-arrow:before {
        line-height: 45px;
        font-size: 18px;
    }

    .product-slider-items .slick-prev {
        left: -22px;
    }

    .product-slider-items .slick-next {
        right: -22px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .product-slider-section {
        padding: 30px 0;
    }

    .product-slider-header {
        margin-bottom: 15px;
    }

    .product-slider-title {
        font-size: 24px;
    }

    .product-slider-subtitle {
        font-size: 14px;
    }

    /* Hide arrows on mobile, use dots only */
    .product-slider-items .slick-arrow {
        display: none !important;
    }

    .product-slider-items {
        margin: 0;
    }

    .product-slider-item {
        padding: 0;
    }

    .product-card-image-wrapper {
        min-height: 200px;
        max-height: 200px;
    }

    .product-card-content {
        padding: 15px;
    }

    .product-card-name {
        font-size: 15px;
    }

    .product-card-price {
        font-size: 16px;
    }

    .product-card-description {
        font-size: 13px;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .product-slider-section .container {
        padding: 0 10px;
    }

    .product-slider-title {
        font-size: 20px;
    }

    .product-card-image-wrapper {
        min-height: 180px;
        max-height: 180px;
    }

    .product-card-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* ===================================
   Loading State
   =================================== */
.product-slider-items.slick-initialized {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.product-slider-items:not(.slick-initialized) {
    opacity: 0;
}

/* Accessibility improvements */
.product-slider-items .slick-arrow:focus {
    outline: 2px solid #1F2E44;
    outline-offset: 2px;
}

.product-slider-items .slick-dots li button:focus {
    outline: 2px solid #1F2E44;
    outline-offset: 2px;
}
