@import url(fontiran.css);
body {
    direction: rtl;
    font-family: IRANSans !important;
    position: relative;
    background: linear-gradient(
        120deg,
        #f7f4f1 0%,
        #ffffff 40%,
        #f3ede7 60%,
        #ffffff 100%
    );
    background-size: 300% 300%;
    animation: bgLightMove 12s ease-in-out infinite;
}

@keyframes bgLightMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at 20% 30%,
        rgba(205,132,84,0.12),
        transparent 60%
    );
    pointer-events: none;
    z-index: -1;
    animation: glowMove 10s ease-in-out infinite;
}

@keyframes glowMove {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 80% 80%;
    }
    100% {
        background-position: 0% 0%;
    }
}

a {
    text-decoration: none;
    color: #141414;
}

h4, h5 {
    margin-bottom: 0;
}

main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Logo ===== */
.logo {
    width: 100px;
    height: auto;
}

/* ===== Article / Card ===== */
article {
    width: 200px;
    height: 300px;
    margin: 10px;
    text-align: center;
    background-color: #fff;
    border: 1px dotted #ccc;
    border-radius: 7px;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.img {
    width: 100%;
    height: 200px;
    position: relative;
    background-color: #fff;
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.img.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f1f1f1;
    border-top-color: #cd8454;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

article h5 {
    font-size: 12px;
    margin: 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

article p {
    margin: 3px 0;
    font-size: 12px;
}

/* ===== Swiper ===== */
.product-swiper {
    width: 100%;
    height: 100%;
}

.product-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-pagination-bullet {
    background: #cd8454;
}

/* ===== Buttons / Effects ===== */
#printBtn {
    font-family: IRANSans !important;
    position: relative;
    height: 2.5rem;
    padding: 8px 16px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    background: #cd8454;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    font-weight: 600;
    z-index: 0;
}

#printBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.5) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-20deg);
    animation: shine 2s linear infinite;
}

@keyframes shine {
    0% { left: -75%; }
    100% { left: 125%; }
}

/* ===== Phone Highlight ===== */
#phone {
    position: relative;
    display: inline-block;
    border: 1px dotted #00bbff;
    padding: 3px 5px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    overflow: hidden;
    margin-right: 5px;
}

#phone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(205,132,84,0) 0%,
        rgba(205,132,84,0.5) 50%,
        rgba(205,132,84,0) 100%
    );
    transform: skewX(-20deg);
    animation: shines 2s linear infinite;
}

@keyframes shines {
    0% { left: -75%; }
    100% { left: 125%; }
}

#phone-point {
    position: relative;
    display: flex;
    align-items: center;
}

#phone-point::after {
    content: '👉';
    position: absolute;
    top: 36%;
    left: -40px;
    transform: translateY(-50%);
    font-size: 20px;
    animation: point 2s ease-in-out infinite;
}

@keyframes point {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(10px); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

    article {
        width: 96px;
        height: 200px;
        margin: 5px;
        padding: 2px;
    }

    .img {
        height: 150px;
    }

    article h5 {
        font-size: 8px;
        margin: 0;
    }

    article p {
        font-size: 9px;
        margin: 0;
    }
}

/* ===== Print ===== */
@media print {
    #printBtn,
    #phone::before,
    #phone-point::after,
    .swiper-pagination {
        display: none !important;
    }

    .swiper-slide:not(:first-child) {
        display: none !important;
    }

    body,
    body::before {
        background: #fff !important;
        animation: none !important;
    }
}

#print-loading {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    font-family: sans-serif;
}

#print-loading.active {
    display: flex;
}

#print-loading p {
    margin-top: 12px;
    font-size: 14px;
    color: #444;
}

/* اسپینر */
.spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #ddd;
    border-top-color: #cd8454;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* لودینگ در پرینت نمایش داده نشود */
@media print {
    #print-loading {
        display: none !important;
    }
}

/* کاهش انیمیشن هنگام اسکرول */
.reduce-motion body,
.reduce-motion body::before {
    animation: none !important;
}

/* اسکلتون لودینگ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
