/* فونت و ریست اولیه مشابه index.css */
@font-face {
    font-family: 'Lalezar';
    src: url(../fonts/Lalezar-Regular.otf);
}
@font-face {
    font-family: 'iransans';
    src: url(../fonts/Iranian-Sans.ttf);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Tahoma, Arial, sans-serif;
    transition-duration: 0.5s;
}

/* ساختار کلی */
.dk-detail-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1100px;
    margin: 16px 0;
    background: #fff;
    color: #222;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 16px 6px;
    direction: rtl;
    flex-direction: column; /* Stack items vertically by default */
}

.dk-detail-gallery {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%; /* Take full width */
    min-width: 0;
    padding: 0;
}

.dk-detail-main-img {
    width: 100%; /* Take full width */
    max-width: 320px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 10px;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.dk-detail-info {
    flex: 2 1 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    width: 100%; /* Take full width */
    padding: 0;
}

.dk-detail-title {
    font-size: 1.2rem; /* Slightly smaller on all screens */
    color: #333;
    margin-bottom: 4px;
    font-weight: bold;
    letter-spacing: 1px;
}

.dk-detail-price-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.dk-detail-price {
    font-size: 1.05rem;
    color: #2e7d32;
    font-weight: bold;
    text-shadow: #fff 0px 0px 5px;
}

.dk-detail-buy-btn {
    background: linear-gradient(90deg,#ef394e,#ff5c39);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.dk-detail-buy-btn:hover {
    background: linear-gradient(90deg,#ff5c39,#ef394e);
}

.dk-detail-desc {
    background: #fafbfc;
    border-radius: 6px;
    padding: 10px 6px;
    color: #444;
    font-size: 0.98rem;
    line-height: 2;
    margin-bottom: 6px;
    font-family: iransans;
}

.dk-detail-features {
    background: #f5f7fa;
    border-radius: 6px;
    padding: 8px 6px;
    margin-top: 6px;
}
.dk-detail-features ul {
    margin: 0;
    padding-right: 18px;
}
.dk-detail-features li {
    font-size: 1rem;
    color: #333;
    margin-bottom: 6px;
    list-style: disc;
}

.dk-detail-tags {
    margin: 10px 0 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.dk-tag-link {
    display: inline-block;
    background: #f0f2f5;
    color: #1976d2;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border: 1px solid #e0e0e0;
}
.dk-tag-link:hover {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

/* دارک مود هماهنگ با index.css */
body.dark-mode,
.theme-dark .dk-detail-wrapper,
.dk-detail-wrapper.theme-dark {
    background: #222 !important;
    color: #e0e0e0 !important;
}
body.dark-mode .dk-detail-wrapper,
.theme-dark .dk-detail-wrapper,
.dk-detail-wrapper.theme-dark {
    background: gray !important;
    color: #e0e0e0 !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
body.dark-mode .dk-detail-title,
.theme-dark .dk-detail-title,
.dk-detail-wrapper.theme-dark .dk-detail-title {
    color: #e0e0e0 !important;
}
body.dark-mode .dk-detail-desc,
body.dark-mode .dk-detail-features,
.theme-dark .dk-detail-desc,
.theme-dark .dk-detail-features,
.dk-detail-wrapper.theme-dark .dk-detail-desc,
.dk-detail-wrapper.theme-dark .dk-detail-features {
    background: #444 !important;
    color: #e0e0e0 !important;
    font-family: iransans !important;
}
body.dark-mode .dk-detail-price,
.theme-dark .dk-detail-price,
.dk-detail-wrapper.theme-dark .dk-detail-price {
    color: #02d402 !important; /* سبز روشن مثل index.css */
    text-shadow: none;
}
body.dark-mode .dk-tag-link,
.theme-dark .dk-tag-link,
.dk-detail-wrapper.theme-dark .dk-tag-link {
    background: #5c5c5c !important;
    color: #90caf9 !important;
    border: 1px solid #888 !important;
}
body.dark-mode .dk-tag-link:hover,
.theme-dark .dk-tag-link:hover,
.dk-detail-wrapper.theme-dark .dk-tag-link:hover {
    background: #1976d2 !important;
    color: #fff !important;
    border-color: #1976d2 !important;
}
body.dark-mode .dk-detail-buy-btn,
.theme-dark .dk-detail-buy-btn,
.dk-detail-wrapper.theme-dark .dk-detail-buy-btn {
    background: linear-gradient(90deg,#ff5c39,#ef394e) !important;
    color: #fff !important;
}
body.dark-mode .dk-detail-buy-btn:hover,
.theme-dark .dk-detail-buy-btn:hover,
.dk-detail-wrapper.theme-dark .dk-detail-buy-btn:hover {
    background: linear-gradient(90deg,#ef394e,#ff5c39) !important;
}
.buy-message {
    background-color: #0ac213;
}

/* Media query for smaller screens */
@media (min-width: 600px) {
    .dk-detail-wrapper {
        flex-direction: row; /* Restore horizontal layout on larger screens */
        gap: 32px;
        padding: 32px 24px;
        margin: 48px auto;
        border-radius: 14px;
        box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    }
    .dk-detail-gallery {
        flex: 1 1 320px;
        min-width: 320px;
    }
    .dk-detail-info {
        flex: 2 1 400px;
    }
    .dk-detail-title {
        font-size: 2.1rem; /* Restore larger font size on larger screens */
    }
    .dk-detail-main-img {
        width: 340px;
        max-width: 100%;
    }
    .dk-detail-desc {
        font-size: 1.1rem;
        padding: 18px 16px;
    }
    .dk-detail-features {
        padding: 14px 16px;
    }
    .dk-tag-link {
        font-size: 1rem;
        padding: 5px 14px;
    }
}

/* بهبود اسکرول برای موبایل */
body, html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}