/* =========================================
   FRONT PAGE STYLES
========================================= */
.dm-front-page {
    padding-top: 30px;
    padding-bottom: 50px;
}
@media screen and (max-width: 768px) {
    .dm-front-page {
    padding-top: 10px;
    padding-bottom: 10px;
}
}
.site-main-content.dm-front-page .container{
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}
.dm-hp-section {
    margin-bottom: 50px;
}
@media screen and (max-width: 768px) {
    .dm-hp-section {
    margin-bottom: 20px;
    padding: 0px 10px;
}
}

/* Section Headers */
.dm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f2f4;
}

.dm-section-title {
    font-size: 20px;
    font-weight: 900;
    color: #333;
    margin: 0;
    position: relative;
}

.dm-section-title::after {
    content: "";
    position: absolute;
    bottom: -17px; /* تنظیم برای قرارگیری روی خط حاشیه پایینی */
    right: 0;
    width: 60px;
    height: 3px;
    background: #da0037;
    border-radius: 4px;
}

.dm-view-all {
    font-size: 13px;
    font-weight: 700;
    color: #2F2E96;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.dm-view-all:hover {
    color: #da0037;
}

/* Temporary Grid Layouts (قبل از تبدیل به اسلایدر) */
.dm-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.dm-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Responsive Grids */
@media (max-width: 1200px) {
    .dm-products-grid { grid-template-columns: repeat(4, 1fr); }
    .dm-posts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
    .dm-products-grid { grid-template-columns: repeat(3, 1fr); }
    .dm-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .dm-products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dm-posts-grid { grid-template-columns: 1fr; gap: 15px; }
    .dm-section-title { font-size: 17px; }
    .dm-section-title::after { bottom: -16px; }
}
/* --- Hero Slider Component --- */
.dm-hero-slider-container {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    direction: ltr; /* برای عملکرد بهتر Swiper.js معمولا ltr تنظیم می‌شود */
}

.dm-hero-slider-container .dm-slide-link {
    display: block;
    width: 100%;
}

.dm-hero-slider-container .dm-slide-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

/* استایل دکمه‌های ناوبری اسلایدر */
.dm-hero-slider-container .swiper-button-next,
.dm-hero-slider-container .swiper-button-prev {
    color: #111;
    background: rgb(255 255 255 / 40%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.dm-hero-slider-container .swiper-button-next:hover,
.dm-hero-slider-container .swiper-button-prev:hover {
    background: #da0037;
    color: #fff !important;
}

.dm-hero-slider-container .swiper-button-next::after,
.dm-hero-slider-container .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 800;
}

/* پگینیشن (نقاط پایین اسلایدر) */
.dm-hero-slider-container .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.6;
    width: 10px;
    height: 10px;
}

.dm-hero-slider-container .swiper-pagination-bullet-active {
    background: #da0037;
    opacity: 1;
    width: 25px;
    border-radius: 5px;
    transition: all 0.3s ease;
}
/* --- Circle Categories Component --- */
.dm-circle-cats-wrapper {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    text-align: center;
}

.dm-circle-cats-wrapper .dm-circle-cat-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dm-circle-cats-wrapper .dm-cat-img-box {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dm-circle-cats-wrapper .dm-circle-cat-item:hover .dm-cat-img-box {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.dm-circle-cats-wrapper .dm-cat-img-box img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.dm-circle-cats-wrapper .dm-cat-title {
    font-size: 13px;
    font-weight: 700;
    color: #444;
    margin: 0;
}

@media screen and (max-width: 800px) {
.dm-circle-cats-wrapper .dm-cat-img-box{
    width: 100%;
    height: auto;
}
.dm-circle-cats-wrapper .dm-circle-cat-item{
    padding: 15px;
}
.dm-circle-cats-wrapper{
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
}


/* --- Double Promos Component (Anti-Adblock) --- */
.dm-promo-boxes-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dm-promo-boxes-wrapper .dm-promo-item {
    display: block;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.dm-promo-boxes-wrapper .dm-promo-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.dm-promo-boxes-wrapper .dm-promo-item:hover .dm-promo-img {
    transform: scale(1.03);
}

@media (max-width: 767px) {
    .dm-promo-boxes-wrapper { grid-template-columns: 1fr; gap: 15px; }
}