﻿/* =========================================================
   SIKMART SHOP
   Clean Product Grid / Cards / Image Slider
   ========================================================= */


/* =========================================================
   SHOP CONTAINER
   ========================================================= */

.shop-container {
    width: 100%;
    max-width: 1400px;
    margin: 30px auto 50px;
    padding: 0 18px;
    box-sizing: border-box;
}


/* =========================================================
   SHOP HEADER
   ========================================================= */

.shop-title {
    margin: 0 0 28px;
    text-align: center;
}

    .shop-title h1 {
        margin: 0 0 5px;
        color: #111827;
        font-size: 34px;
        line-height: 1.2;
        font-weight: 800;
    }

    .shop-title p {
        margin: 0;
        color: #6b7280;
        font-size: 14px;
    }


/* =========================================================
   PRODUCT GRID
   ========================================================= */

.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}


/* =========================================================
   PRODUCT CARD
   ========================================================= */

.shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

    .shop-card:hover {
        transform: translateY(-4px);
        border-color: #d1d5db;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.10);
    }


/* =========================================================
   PRODUCT IMAGE AREA
   500 × 500 PRODUCTS = PERFECT 1:1
   ========================================================= */

.shop-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 40px 10px 10px;
    box-sizing: border-box;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}


/* =========================================================
   INNER IMAGE BOX / SLIDER
   ========================================================= */

.shop-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    box-sizing: border-box;
}


/* =========================================================
   PRODUCT IMAGES
   ========================================================= */

.shop-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 0.55s ease, transform 0.55s ease;
}


    /* ACTIVE IMAGE */

    .shop-image.active {
        opacity: 1;
        visibility: visible;
        z-index: 2;
    }


/* SLIGHT HOVER ZOOM */

.shop-card:hover .shop-image.active {
    transform: scale(1.025);
}


/* =========================================================
   IMAGE SLIDER
   ========================================================= */

.shop-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
}


/* Every image occupies exactly the same space */

.shop-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 0.55s ease, transform 0.55s ease;
}


    /* Active image */

    .shop-image.active {
        opacity: 1;
        visibility: visible;
        z-index: 2;
    }


/* Slight zoom when card is hovered */

.shop-card:hover .shop-image.active {
    transform: scale(1.025);
}


/* =========================================================
   SALE BADGE
   ========================================================= */

.shop-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

    .shop-sale-badge span {
        padding-left: 6px;
        border-left: 1px solid rgba(255, 255, 255, 0.55);
        font-size: 10px;
        font-weight: 700;
    }


/* =========================================================
   PRODUCT BODY
   ========================================================= */

.shop-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 13px;
}


/* =========================================================
   PRODUCT NAME
   ========================================================= */

.shop-product-name {
    margin: 0 0 5px;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 750;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.shop-description {
    margin: 0 0 10px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}


/* =========================================================
   PRICE AREA
   ========================================================= */

.shop-price-area {
    margin-top: auto;
    margin-bottom: 11px;
}


/* NORMAL PRICE */

.shop-price {
    color: #111827;
    font-size: 19px;
    line-height: 1.2;
    font-weight: 800;
}


/* OLD PRICE */

.shop-old-price {
    margin-bottom: 2px;
    color: #dc2626;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}


/* DISCOUNTED PRICE */

.shop-sale-price {
    color: #111827;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 850;
}


/* =========================================================
   VIEW PRODUCT BUTTON
   ========================================================= */

.shop-view-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    box-sizing: border-box;
    background: #111827;
    color: #ffffff;
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .shop-view-button:hover {
        background: #2563eb;
        color: #ffffff;
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.20);
    }

    .shop-view-button span {
        font-size: 17px;
        line-height: 1;
    }


/* =========================================================
   NO IMAGE
   ========================================================= */

.shop-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 180px;
    color: #9ca3af;
    font-size: 13px;
}


/* =========================================================
   EMPTY SHOP
   ========================================================= */

.shop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 30px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
}

    .shop-empty h3 {
        margin: 0 0 6px;
        color: #374151;
        font-size: 20px;
    }

    .shop-empty p {
        margin: 0;
        font-size: 14px;
    }


/* =========================================================
   TABLET / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1100px) {

    .shop-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .shop-container {
        padding: 0 14px;
    }

    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .shop-title h1 {
        font-size: 30px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .shop-container {
        margin: 22px auto 35px;
        padding: 0 11px;
    }

    .shop-title {
        margin-bottom: 20px;
    }

        .shop-title h1 {
            font-size: 27px;
        }

        .shop-title p {
            font-size: 13px;
        }

    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /*
       Keep images square.
       Do NOT use a fixed height here.
    */

    .shop-image-wrapper {
        aspect-ratio: 1 / 1;
    }

    .shop-card {
        border-radius: 9px;
    }

    .shop-card-body {
        padding: 10px;
    }

    .shop-product-name {
        font-size: 14px;
        line-height: 1.3;
    }

    .shop-description {
        margin-bottom: 8px;
        font-size: 11px;
        line-height: 1.35;
    }

    .shop-price {
        font-size: 16px;
    }

    .shop-sale-price {
        font-size: 17px;
    }

    .shop-old-price {
        font-size: 11px;
    }

    .shop-price-area {
        margin-bottom: 8px;
    }

    .shop-view-button {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 11px;
    }

        .shop-view-button span {
            font-size: 15px;
        }

    .shop-sale-badge {
        top: 7px;
        left: 7px;
        padding: 5px 7px;
        font-size: 9px;
    }

        .shop-sale-badge span {
            font-size: 9px;
        }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .shop-container {
        padding: 0 9px;
    }

    .shop-grid {
        gap: 8px;
    }

    .shop-card-body {
        padding: 9px;
    }

    .shop-product-name {
        font-size: 13px;
    }

    .shop-description {
        font-size: 10px;
    }

    .shop-price {
        font-size: 15px;
    }

    .shop-sale-price {
        font-size: 16px;
    }

    .shop-view-button {
        font-size: 10px;
    }
}


/* =========================================================
   AFFILIATE SECTION
   ========================================================= */

.affiliate-section {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 30px;
    padding: 22px;
    box-sizing: border-box;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

    .affiliate-section h3 {
        margin: 0 0 7px;
        color: #1f2937;
        font-size: 22px;
        font-weight: 800;
    }

    .affiliate-section p {
        margin: 0 0 16px;
        color: #6b7280;
        font-size: 14px;
    }


/* =========================================================
   AFFILIATE FORM
   ========================================================= */

.affiliate-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

    .affiliate-form input {
        flex: 1;
        width: 100%;
        max-width: 400px;
        padding: 10px 13px;
        box-sizing: border-box;
        background: #ffffff;
        border: 1px solid #d1d5db;
        border-radius: 7px;
        color: #111827;
        font-size: 14px;
        outline: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .affiliate-form input:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
        }

    .affiliate-form button {
        padding: 10px 17px;
        border: 0;
        border-radius: 7px;
        background: #111827;
        color: #ffffff;
        cursor: pointer;
        font-size: 13px;
        font-weight: 700;
        transition: background 0.2s ease, transform 0.2s ease;
    }

        .affiliate-form button:hover {
            background: #2563eb;
            transform: translateY(-1px);
        }


/* =========================================================
   AFFILIATE MESSAGE
   ========================================================= */

.affiliate-message {
    margin-top: 13px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.affiliate-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.affiliate-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}


/* =========================================================
   AFFILIATE MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .affiliate-section {
        padding: 18px 13px;
    }

        .affiliate-section h3 {
            font-size: 19px;
        }

        .affiliate-section p {
            font-size: 13px;
        }

    .affiliate-form {
        flex-direction: column;
        width: 100%;
    }

        .affiliate-form input {
            max-width: none;
        }

        .affiliate-form button {
            width: 100%;
        }
}
