/* ============================================
   SHOP.CSS - استایل فروشگاه
   ============================================ */

/* ===== هدر ===== */
#main-header {
    background: #1a2a3a;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    color: #f1c40f;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.badge {
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    margin-right: 4px;
}

/* ===== فروشگاه ===== */
main {
    padding: 30px 0 60px;
    background: #f8f5f0;
    min-height: 60vh;
}

.shop-header {
    text-align: center;
    padding: 20px 0 30px;
}

.shop-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: #1a2a3a;
    margin-bottom: 8px;
}

.shop-subtitle {
    color: #7f8c8d;
    font-size: 16px;
}

/* ===== دسته‌بندی‌ها (اسکرول افقی) ===== */
.categories-section {
    margin-bottom: 30px;
}

.categories-scroll {
    overflow-x: auto;
    padding: 10px 0 20px;
    scrollbar-width: thin;
    scrollbar-color: #f1c40f #e0dcd6;
}

.categories-scroll::-webkit-scrollbar {
    height: 6px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: #e0dcd6;
    border-radius: 10px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: #f1c40f;
    border-radius: 10px;
}

.categories-wrapper {
    display: flex;
    gap: 20px;
    padding: 0 10px;
    min-width: max-content;
}

.category-card {
    flex: 0 0 180px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.category-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.category-card .info {
    padding: 12px;
}

.category-card .info h4 {
    font-size: 16px;
    color: #1a2a3a;
    margin: 0;
}

.category-card .info p {
    font-size: 13px;
    color: #7f8c8d;
    margin: 4px 0 0;
}

/* ===== جستجو و فیلتر ===== */
.search-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.search-box input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #fff;
}

.search-box input:focus {
    border-color: #f1c40f;
    outline: none;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #f1c40f;
    color: #1a2a3a;
}

.btn-primary:hover {
    background: #f39c12;
    transform: scale(1.03);
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #219a52;
}

.btn-secondary {
    background: #2c3e50;
    color: #fff;
}

.btn-secondary:hover {
    background: #1a2a3a;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* ===== گرید محصولات ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.product-card .image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-card .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .image-wrapper img {
    transform: scale(1.05);
}

.product-card .info {
    padding: 14px 16px 16px;
}

.product-card .info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1a2a3a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .info .details {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-card .info .price {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.product-card .info .price .original {
    font-size: 14px;
    color: #95a5a6;
    text-decoration: line-through;
    margin-right: 8px;
}

.product-card .info .stock {
    font-size: 12px;
    margin-top: 5px;
    padding: 2px 12px;
    border-radius: 20px;
    display: inline-block;
}

.stock-in_stock {
    background: #d4edda;
    color: #155724;
}

.stock-out_of_stock {
    background: #f8d7da;
    color: #721c24;
}

.stock-pre_order {
    background: #fff3cd;
    color: #856404;
}

.product-card .actions {
    padding: 0 16px 16px;
    display: flex;
    gap: 8px;
}

.product-card .actions .btn {
    flex: 1;
    text-align: center;
}

/* ===== بارگذاری ===== */
.loading {
    text-align: center;
    padding: 60px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f1c40f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== صفحه‌بندی ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover {
    background: #f1c40f;
    border-color: #f1c40f;
}

.pagination button.active {
    background: #1a2a3a;
    color: #fff;
    border-color: #1a2a3a;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== پیام خالی ===== */
.empty-message {
    text-align: center;
    padding: 60px 0;
    color: #7f8c8d;
    grid-column: 1 / -1;
}

.empty-message .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* ===== فوتر ===== */
footer {
    background: #1a2a3a;
    color: #bdc3c7;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-brand .logo-text {
    color: #f1c40f;
    font-size: 1.8rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #f1c40f;
}

.footer-enamad img {
    max-width: 100px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-enamad img:hover {
    opacity: 1;
}

.footer-copy {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    #main-header .container {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input,
    .filter-select {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .product-card .image-wrapper {
        height: 150px;
    }

    .shop-header h1 {
        font-size: 24px;
    }

    .category-card {
        flex: 0 0 140px;
    }

    .category-card img {
        height: 90px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-card .image-wrapper {
        height: 120px;
    }

    .product-card .info h3 {
        font-size: 14px;
    }

    .product-card .info .price {
        font-size: 15px;
    }

    .product-card .actions .btn {
        font-size: 12px;
        padding: 5px 8px;
    }

    .category-card {
        flex: 0 0 110px;
    }

    .category-card img {
        height: 70px;
    }

    .category-card .info h4 {
        font-size: 13px;
    }

    .category-card .info p {
        font-size: 11px;
    }
}

/* ===== FOOTER ENAMAD & BITPAY ===== */
.footer-enamad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-enamad a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.footer-enamad a:hover {
    transform: scale(1.05);
}

.footer-enamad img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* برای موبایل */
@media (max-width: 576px) {
    .footer-enamad {
        gap: 12px;
        flex-wrap: wrap;
    }
    .footer-enamad img {
        height: 45px;
    }
}