/**
 * Shop Page Styles (Figma-based)
 */

/* Custom shop page container */
#kursai-shop.shop-page {
    background: #ffffff;
    padding: 140px 0 80px;
    min-height: 100vh;
    display: block !important;
}

.shop-page {
    background: #ffffff;
    padding: 140px 0 80px;
    min-height: 100vh;
}

.shop-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 44px;
}

/* Shop Header */
.shop-header {
    margin-bottom: 40px;
}

.shop-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: #252a36;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.shop-description {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 31px;
    color: #777e90;
    max-width: 620px;
    margin: 0;
}

/* Hide default WooCommerce elements */
.shop-products .woocommerce-result-count,
.shop-products .woocommerce-ordering,
.woocommerce-notices-wrapper:empty {
    display: none;
}

.shop-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.shop-tabs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.shop-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 49px;
    padding: 0 22px;
    border-radius: 15px;
    border: 1px solid #e6e8ec;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #777e90;
    text-decoration: none;
    background: #ffffff;
    transition: all 0.2s ease;
}

.shop-tab.is-active {
    background: #2d2f3a;
    color: #f8f9fb;
    border-color: #2d2f3a;
}

.shop-tab:hover {
    color: #252a36;
}

.shop-tag-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e6e8ec;
    border-radius: 15px;
    padding: 0 14px;
    height: 49px;
    min-width: 260px;
    background: #ffffff;
}

.shop-tag-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #252a36;
    white-space: nowrap;
}

.shop-tag-select {
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #252a36;
    outline: none;
    flex: 1;
    cursor: pointer;
}

/* Product Grid */
.shop-products .products,
.shop-products .kursai-products,
ul.kursai-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

/* Limit max columns on large screens for better layout */
@media (min-width: 1400px) {
    .shop-products .products,
    .shop-products .kursai-products,
    ul.kursai-products {
        grid-template-columns: repeat(4, 300px);
    }
}

.shop-card {
    list-style: none;
}

.shop-card__inner {
    background: linear-gradient(180deg, rgba(243, 243, 243, 0.5) 0%, #ffffff 100%);
    border-radius: 15px;
    border: none;
    padding: 8px 10px;
    width: 100%;
    max-width: 300px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    margin: 0 auto;
}

/* Featured/popular products get blue border */
.shop-card.featured .shop-card__inner,
.shop-card.is-featured .shop-card__inner {
    border: 2px solid #287eef;
}

.shop-card__inner:hover {
    box-shadow: 0 6px 20px rgba(37, 42, 54, 0.08);
    transform: translateY(-2px);
}

.shop-card__image {
    position: relative;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    background: #eef4ff;
}

.shop-card__image-link {
    display: block;
    height: 100%;
}

.shop-card__image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-card__image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e6e8ec;
    border-radius: 15px;
    pointer-events: none;
}

.shop-card__badge {
    position: absolute;
    top: -19px;
    right: 12px;
    background: linear-gradient(60deg, #287eef 35%, #5a9ef8 126%);
    color: #f8f9fb;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(40, 126, 239, 0.25);
}

.shop-card__code {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 5px;
    padding: 6px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #287eef;
    box-shadow: 0 2px 4px rgba(51, 53, 64, 0.1);
    z-index: 1;
}

.shop-card__content {
    padding: 16px 8px 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-card__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #252a36;
    line-height: 30px;
    margin: 0 0 8px 0;
}

.shop-card__title a {
    color: inherit;
    text-decoration: none;
}

.shop-card__desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    line-height: 30px;
    color: #777e90;
    margin: 0 0 12px 0;
}

.shop-card__price {
    font-family: 'DM Sans', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #287eef;
    margin-bottom: 18px;
}

.shop-card__price del {
    color: #777e90;
    margin-right: 8px;
    font-weight: 600;
}

.shop-card__price ins {
    text-decoration: none;
}

.shop-card__actions {
    margin-top: auto;
    display: flex;
    justify-content: center;
}

.shop-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 49px;
    width: 100%;
    max-width: 277px;
    border-radius: 15px;
    border: 1px solid #e6e8ec;
    background: #ffffff;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #252a36;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.shop-card__button:hover {
    background: #2d2f3a;
    color: #ffffff;
}

@media (max-width: 1200px) {
    .shop-products .products,
    .shop-products .kursai-products,
    ul.kursai-products {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 900px) {
    .shop-products .products,
    .shop-products .kursai-products,
    ul.kursai-products {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .shop-card__badge {
        top: -12px;
    }
}

@media (max-width: 640px) {
    .shop-page {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .shop-container {
        padding: 0 20px;
    }

    .shop-header {
        margin-bottom: 24px;
    }

    .shop-title {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .shop-description {
        font-size: 14px;
        line-height: 24px;
    }

    .shop-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .shop-tag-filter {
        width: 100%;
    }

    .shop-products .products,
    .shop-products .kursai-products,
    ul.kursai-products {
        grid-template-columns: 1fr;
        gap: 24px 16px;
    }

    .shop-card__inner {
        max-width: 100%;
        min-height: auto;
    }

    .shop-card__button {
        max-width: 100%;
    }
}

/* WooCommerce default elements override */
.woocommerce-products-header__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: #252a36;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .woocommerce-products-header__title {
        font-size: 28px;
    }
}
