@font-face { font-family: 'Dana'; src: url('/assets/fonts/Dana/Dana-Thin.woff2')       format('woff2'); font-weight: 100;  font-style: normal; font-display: swap; }
@font-face { font-family: 'Dana'; src: url('/assets/fonts/Dana/Dana-Light.woff2')      format('woff2'); font-weight: 300;  font-style: normal; font-display: swap; }
@font-face { font-family: 'Dana'; src: url('/assets/fonts/Dana/Dana-Regular.woff2')    format('woff2'); font-weight: 400;  font-style: normal; font-display: swap; }
@font-face { font-family: 'Dana'; src: url('/assets/fonts/Dana/Dana-Medium.woff2')     format('woff2'); font-weight: 500;  font-style: normal; font-display: swap; }
@font-face { font-family: 'Dana'; src: url('/assets/fonts/Dana/Dana-DemiBold.woff2')   format('woff2'); font-weight: 600;  font-style: normal; font-display: swap; }
@font-face { font-family: 'Dana'; src: url('/assets/fonts/Dana/Dana-Bold.woff2')       format('woff2'); font-weight: 700;  font-style: normal; font-display: swap; }
@font-face { font-family: 'Dana'; src: url('/assets/fonts/Dana/Dana-ExtraBold.woff2')  format('woff2'); font-weight: 800;  font-style: normal; font-display: swap; }
@font-face { font-family: 'Dana'; src: url('/assets/fonts/Dana/Dana-Black.woff2')      format('woff2'); font-weight: 850;  font-style: normal; font-display: swap; }

/**
 * Homepage Frontend — CSS اصلی (import همه)
 *
 * @package Marketplace\Modules\Homepage
 */

/* ============================================================
   Types (بلوک‌های Homepage)
   ============================================================ */
@import url('types/slider.css');
@import url('types/banner.css');
@import url('types/product-grid.css');

/* ============================================================
   Product Cards (کارت‌های محصول)
   ============================================================ */
@import url('types/cards/amazing-card.css');
@import url('types/cards/default-card.css');
@import url('types/cards/minimal-card.css');

/* ============================================================
   Layout اصلی
   ============================================================ */
.hdbuy-frontend-body {
    margin: 0;
    padding: 0;
    font-family: 'Dana', Tahoma, sans-serif, 'Tahoma', 'Arial', sans-serif;
    background: #f5f5f5;
    color: #333;
    direction: rtl;
    line-height: 1.6;
}

.hdbuy-frontend-body * {
    box-sizing: border-box;
}

.hdbuy-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.hdbuy-layout__main {
    width: 100%;
}

.hdbuy-section {
    margin-bottom: 24px;
}

.hdbuy-section[data-wrapper="full-width"] {
    max-width: none;
    margin-left: -20px;
    margin-right: -20px;
}

.hdbuy-section[data-wrapper="container"] {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   State های خالی
   ============================================================ */
.hdbuy-empty-homepage {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #fff;
    border-radius: 8px;
}

/* ============================================================
   Utilities
   ============================================================ */
.hdbuy-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.hdbuy-error {
    text-align: center;
    padding: 20px;
    color: #e53935;
    background: #ffebee;
    border-radius: 8px;
}

/* ============================================================
   Header (کلی)
   ============================================================ */
.hdbuy-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.hdbuy-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.hdbuy-header__logo img {
    height: 40px;
}

.hdbuy-header__nav {
    flex: 1;
}

.hdbuy-nav {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hdbuy-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 0;
}

.hdbuy-nav a:hover {
    color: #4CAF50;
}

.hdbuy-header__search {
    flex: 0 0 300px;
}

.hdbuy-search-form {
    position: relative;
    display: flex;
}

.hdbuy-search-input {
    width: 100%;
    padding: 8px 40px 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
}

.hdbuy-search-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

.hdbuy-header__actions {
    display: flex;
    gap: 8px;
}

.hdbuy-header__icon {
    position: relative;
    color: #333;
    padding: 8px;
    display: inline-flex;
    align-items: center;
}

.hdbuy-header__badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.hdbuy-header__menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: none;
}

.hdbuy-mobile-menu {
    display: none;
    background: #fff;
    padding: 16px;
}

.hdbuy-mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hdbuy-mobile-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.hdbuy-mobile-menu a {
    display: block;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
}

@media (max-width: 768px) {
    .hdbuy-header__nav,
    .hdbuy-header__search {
        display: none;
    }

    .hdbuy-header__menu-toggle {
        display: block;
    }

    .hdbuy-mobile-menu-open .hdbuy-mobile-menu {
        display: block;
    }
}

/* ============================================================
   Footer (کلی)
   ============================================================ */
.hdbuy-footer {
    background: #2c3e50;
    color: #ecf0f1;
    margin-top: 40px;
}

.hdbuy-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .hdbuy-footer__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hdbuy-footer__inner {
        grid-template-columns: 1fr;
    }
}

.hdbuy-footer__title {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
}

.hdbuy-footer__about {
    font-size: 13px;
    line-height: 1.8;
    color: #bdc3c7;
}

.hdbuy-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hdbuy-footer__links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 13px;
    line-height: 2;
    display: block;
}

.hdbuy-footer__links a:hover {
    color: #fff;
}

.hdbuy-footer__contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hdbuy-footer__contact li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #bdc3c7;
    margin-bottom: 12px;
}

.hdbuy-footer__social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.hdbuy-footer__social-link {
    color: #bdc3c7;
}

.hdbuy-footer__social-link:hover {
    color: #fff;
}

.hdbuy-footer__bottom {
    border-top: 1px solid #34495e;
    padding: 20px;
}

.hdbuy-footer__bottom-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hdbuy-footer__copyright {
    margin: 0;
    font-size: 13px;
    color: #95a5a6;
}

.hdbuy-footer__legal {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 16px;
}

.hdbuy-footer__legal a {
    color: #95a5a6;
    text-decoration: none;
    font-size: 13px;
}

.hdbuy-footer__legal a:hover {
    color: #fff;
}
