/* =============================================
   Pinbex Theme - Homepage Styles
   ============================================= */

/* Hero Banner Carousel */
.pinbex-hero {
    position: relative;
}

.pinbex-hero .splide__slide {
    padding: 0;
}

.pinbex-hero-slide {
    position: relative;
}

.pinbex-hero .splide__slide {
    padding: 0;
}

.pinbex-hero-slide {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    aspect-ratio: 16/6;
}

.pinbex-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.pinbex-hero-slide:hover img {
    transform: scale(1.03);
}

.pinbex-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 60px;
}

.pinbex-hero-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.2;
}

.pinbex-hero-subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
}

.pinbex-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--gradient-brand);
    color: #ffffff;
    border-radius: var(--element-radius);
    font-weight: 600;
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
    width: fit-content;
}

.pinbex-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30,136,255,0.4);
    color: #ffffff;
}

.pinbex-hero .splide__pagination {
    bottom: 20px;
}

.pinbex-hero .splide__pagination__page {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.5);
    transition: all var(--transition-base);
}

.pinbex-hero .splide__pagination__page.is-active {
    width: 24px;
    background: var(--color-blue);
}

/* Splide Container Padding for Arrows */
@media (max-width: 767px) {
    .splide {
        padding: 0 20px;
    }
}

/* Category Carousel */
.pinbex-categories {
    padding: 40px 0;
    background: white;
}


.pinbex-category-img-wrapper {
    position: relative;
    overflow: hidden;
}

.pinbex-category-img {
  width: 100%;
}




.pinbex-category-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-blue);
    margin-bottom: 4px;
    text-align: center;
    margin-top: 15px;
}

.pinbex-category-count {
    font-size: var(--font-size-xs);
    color: rgba(255,255,255,0.7);
}

/* Sale Products Section */
.pinbex-sale-section {
    padding: 60px 0;
}

.pinbex-sale-section .pinbex-container {
    background: linear-gradient(120deg, #fff5f5 0%, #fff 45%);
    border: 1px solid rgba(255, 71, 87, 0.15);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 12px 32px rgba(255, 71, 87, 0.08);
}

/* Sale Header (title + countdown, side by side) */
.pinbex-sale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}

.pinbex-sale-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pinbex-sale-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--color-sale), #ff8a5c);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.35);
}

.pinbex-sale-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-text-primary);
    margin: 0;
    line-height: 1.3;
}

.pinbex-sale-subtitle {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-top: 2px;
}

/* Countdown Timer - compact badge beside the title */
.pinbex-countdown {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-dark);
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(13, 17, 23, 0.25);
}

.pinbex-countdown-label {
    position: relative;
    padding-right: 16px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

.pinbex-countdown-label::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-sale);
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.6);
    animation: pinbex-countdown-pulse 1.4s infinite;
}

.pinbex-countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #ffffff;
}

.pinbex-countdown-value {
    font-size: var(--font-size-base);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff, #ffd7d7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pinbex-countdown-unit {
    font-size: 9px;
    color: rgba(255,255,255,0.55);
    margin-top: 2px;
}

.pinbex-countdown-separator {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-sale);
    animation: pulse 1s infinite;
}

@keyframes pinbex-countdown-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

@media (max-width: 575px) {
    .pinbex-sale-section .pinbex-container {
        padding: 20px;
        border-radius: 18px;
    }

    .pinbex-sale-header {
        justify-content: center;
        text-align: center;
    }

    .pinbex-sale-header-title {
        flex-direction: column;
        text-align: center;
    }
}

/* Banner Grid (4 per row) */
.pinbex-banner-grid {
    padding: 40px 0;
    display: flex;
    gap: 20px;
}

.pinbex-banner-card {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    display: block;
}

.pinbex-banner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.pinbex-banner-card:hover img {
    transform: scale(1.05);
}

.pinbex-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.pinbex-banner-card:hover .pinbex-banner-overlay {
    opacity: 1;
}

.pinbex-banner-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: #ffffff;
}

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

/* High Sale Products Section */
.pinbex-highsale-section {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    padding: 60px 0;
}

.pinbex-highsale-section .pinbex-section-title {
    color: #ffffff;
}

.pinbex-highsale-section .pinbex-section-title::before,
.pinbex-highsale-section .pinbex-section-title::after {
    background: var(--gradient-brand);
}

.pinbex-highsale-section .pinbex-section-subtitle {
    color: rgba(255,255,255,0.6);
}

/* View All Button */
.pinbex-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--color-blue);
    border-radius: var(--element-radius);
    color: var(--color-blue);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.pinbex-view-all:hover {
    background: var(--gradient-brand);
    border-color: transparent;
    color: #ffffff;
}

/* =============================================
   Splide.js Arrow Styles - Absolute Positioning
   ============================================= */

/* Splide Base */
.splide {
    position: relative;
}

/* Arrow Buttons - Inside carousel */
.splide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    opacity: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    padding: 0;
    margin: 0;
}

.splide__arrow--prev {
    left: 0;
}

.splide__arrow--prev svg {
    transform: rotate(180deg);
}

.splide__arrow--next {
    right: 0;
}

.splide__arrow:hover {
    background: var(--gradient-brand);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.splide__arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--color-text-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.splide__arrow:hover svg {
    stroke: #ffffff;
}

/* Hide default Splide arrow text */
.splide__arrow::before {
    display: none;
}

/* Hero specific - show on hover */
.pinbex-hero .splide__arrow {
    background: rgba(255,255,255,0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pinbex-hero:hover .splide__arrow {
    opacity: 1;
}

.pinbex-hero .splide__arrow:hover {
    background: #ffffff;
}

.pinbex-hero .splide__arrow svg {
    stroke: var(--color-dark);
}

.pinbex-hero .splide__arrow:hover svg {
    stroke: var(--color-blue);
}

/* Responsive arrows */
@media (max-width: 767px) {
    .splide__arrow {
        width: 32px;
        height: 32px;
    }

    .splide__arrow--prev {
        left: 8px;
    }

    .splide__arrow--next {
        right: 8px;
    }

    .splide__arrow svg {
        width: 14px;
        height: 14px;
    }
}

/* Splide Pagination */
.splide__pagination {
    position: relative;
    bottom: auto;
    margin-top: 20px;
}

.splide__pagination__page {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: var(--color-border);
    transition: all var(--transition-base);
}

.splide__pagination__page.is-active {
    width: 24px;
    background: var(--color-blue);
}
