/* ==========================================================================
   3. COMPONENTS.CSS - Bento Hero Slider, Amazing Offer & Economic Showcases,
   Product Cards, Story Category Icons, Buttons, Forms & Toasts
   ========================================================================== */

.dk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    border-radius: var(--dk-radius-sm);
    font-size: 0.92rem;
    font-weight: 800;
    transition: all var(--dk-transition);
    border: 1.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.dk-btn--primary {
    background: linear-gradient(135deg, var(--dk-primary) 0%, var(--dk-primary-hover) 100%);
    color: var(--dk-text-inverse);
    box-shadow: 0 4px 12px rgba(180, 123, 56, 0.22);
}

.dk-btn--primary:hover {
    background: linear-gradient(135deg, var(--dk-primary-hover) 0%, var(--dk-primary-dark) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(180, 123, 56, 0.32);
}

.dk-btn--outline {
    background-color: var(--dk-surface);
    border-color: var(--dk-primary);
    color: var(--dk-primary);
}

.dk-btn--outline:hover {
    background-color: var(--dk-primary-soft);
}

.dk-btn--secondary {
    background-color: var(--dk-surface-muted);
    border-color: var(--dk-border);
    color: var(--dk-text-body);
}

.dk-btn--secondary:hover {
    background-color: var(--dk-border-light);
    color: var(--dk-text-primary);
}

.dk-btn--disabled,
.dk-btn:disabled {
    background: #e0e0e2 !important;
    color: var(--dk-text-muted) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.dk-input,
.input-ui {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--dk-border);
    border-radius: var(--dk-radius-sm);
    background-color: var(--dk-surface);
    color: var(--dk-text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: all var(--dk-transition);
}

.dk-input:focus,
.input-ui:focus {
    border-color: var(--dk-cyan);
    box-shadow: 0 0 0 3px var(--dk-cyan-soft);
}

/* Bento Hero Section */
.dk-hero-grid {
    display: grid;
    grid-template-columns: 1fr 370px;
    gap: 16px;
    margin-bottom: var(--dk-space-6);
}

.dk-hero-slider {
    position: relative;
    border-radius: var(--dk-radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--dk-navy) 0%, #1e293b 100%);
    box-shadow: var(--dk-shadow-md);
    aspect-ratio: 16 / 7;
    min-height: 270px;
}

.dk-hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.dk-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.dk-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.dk-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dk-hero-nav {
    position: absolute;
    bottom: 18px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.dk-hero-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--dk-border);
    color: var(--dk-text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: var(--dk-shadow-sm);
    transition: all var(--dk-transition);
}

.dk-hero-arrow:hover {
    background-color: var(--dk-primary);
    color: #fff;
    border-color: var(--dk-primary);
}

.dk-hero-dots {
    position: absolute;
    bottom: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.dk-hero-dot {
    width: 9px;
    height: 9px;
    border-radius: var(--dk-radius-pill);
    background-color: rgba(255, 255, 255, 0.55);
    border: none;
    transition: all var(--dk-transition);
}

.dk-hero-dot.is-active {
    width: 26px;
    background-color: var(--dk-primary);
}

.dk-side-banners {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dk-side-banner-card {
    flex: 1;
    border-radius: var(--dk-radius-md);
    overflow: hidden;
    box-shadow: var(--dk-shadow-sm);
    background: var(--dk-surface);
    position: relative;
}

.dk-side-banner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.dk-side-banner-card:hover img {
    transform: scale(1.03);
}

/* Story-Style Circular Categories Strip */
.dk-categories-strip {
    background-color: var(--dk-surface);
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-radius-lg);
    padding: 24px 22px;
    margin-bottom: var(--dk-space-6);
    box-shadow: var(--dk-shadow-xs);
}

.dk-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.dk-section-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--dk-text-primary);
    position: relative;
    padding-bottom: 8px;
}

.dk-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 64px;
    height: 3.5px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--dk-primary), var(--dk-cyan));
}

.dk-section-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--dk-cyan);
    padding: 6px 12px;
    border-radius: var(--dk-radius-xs);
    background-color: var(--dk-cyan-soft);
}

.dk-section-link:hover {
    background-color: var(--dk-cyan);
    color: #ffffff;
}

.dk-circle-cats-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    gap: 18px;
    overflow-x: auto;
    padding-block: 6px;
}

.dk-circle-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 100px;
    text-align: center;
}

.dk-circle-cat-icon {
    width: 78px;
    height: 78px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fdf8f0 0%, #f4f5f7 100%);
    border: 2px solid var(--dk-primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dk-primary);
    transition: all var(--dk-transition);
    box-shadow: var(--dk-shadow-xs);
}

.dk-circle-cat-item:hover .dk-circle-cat-icon {
    transform: translateY(-5px) rotate(-2deg);
    border-color: var(--dk-primary);
    box-shadow: 0 8px 20px rgba(180, 123, 56, 0.2);
}

.dk-circle-cat-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--dk-text-primary);
}

/* Amazing Offer & Economic Horizontal Showcases */
.dk-amazing-section {
    background: linear-gradient(135deg, #b47b38 0%, #734818 100%);
    border-radius: var(--dk-radius-lg);
    padding: 22px 16px;
    margin-bottom: var(--dk-space-6);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(180, 123, 56, 0.2);
}

.dk-amazing-section--economic {
    background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
    box-shadow: 0 10px 26px rgba(13, 148, 136, 0.18);
}

.dk-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
}

.dk-carousel-track {
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    width: 100%;
    padding-block: 4px;
}

.dk-carousel-track::-webkit-scrollbar {
    display: none;
}

.dk-amazing-promo-card {
    flex: 0 0 185px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    padding: 16px 12px;
    color: #ffffff;
}

.dk-amazing-promo-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.35;
}

.dk-amazing-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
    margin-block: 10px;
}

.dk-timer-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--dk-text-primary);
    font-weight: 900;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.dk-amazing-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 7px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--dk-radius-pill);
    transition: all var(--dk-transition);
}

.dk-amazing-view-all:hover {
    background-color: #ffffff;
    color: var(--dk-primary);
}

.dk-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--dk-surface);
    border: 1px solid var(--dk-border);
    color: var(--dk-text-primary);
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: var(--dk-shadow-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--dk-transition);
}

.dk-carousel-btn:hover {
    background-color: var(--dk-primary);
    color: #fff;
    border-color: var(--dk-primary);
}

.dk-carousel-btn--prev { right: 8px; }
.dk-carousel-btn--next { left: 8px; }

.dk-slider-box {
    background-color: var(--dk-surface);
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-radius-lg);
    padding: 22px;
    margin-bottom: var(--dk-space-6);
    position: relative;
    box-shadow: var(--dk-shadow-xs);
}

/* Product Card (.dk-product-card) */
.dk-product-card {
    background-color: var(--dk-surface);
    border: 1px solid var(--dk-border);
    border-radius: var(--dk-radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform var(--dk-transition), box-shadow var(--dk-transition), border-color var(--dk-transition);
    height: 100%;
    min-width: 210px;
}

.dk-carousel-track .dk-product-card {
    flex: 0 0 220px;
}

.dk-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--dk-shadow-md);
    border-color: var(--dk-primary-border);
}

.dk-product-card__badge-top {
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dk-amazing-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--dk-primary);
    background-color: var(--dk-primary-soft);
    padding: 2px 8px;
    border-radius: var(--dk-radius-pill);
}

.dk-product-card__thumb {
    width: 100%;
    height: 172px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.dk-product-card__thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.dk-product-card:hover .dk-product-card__thumb img {
    transform: scale(1.06);
}

.dk-product-card__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dk-text-primary);
    line-height: 1.65;
    height: calc(1.65em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
}

.dk-product-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--dk-text-muted);
    margin-bottom: 12px;
}

.dk-product-card__meta-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--dk-green);
}

.dk-product-card__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--dk-border-light);
}

.dk-product-card__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dk-discount-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--dk-primary);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: var(--dk-radius-pill);
    min-width: 36px;
    line-height: 1.4;
}

.dk-product-card__final-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: auto;
    font-size: 1.06rem;
    font-weight: 900;
    color: var(--dk-text-primary);
}

.dk-toman-unit {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dk-text-body);
}

.dk-product-card__old-price {
    font-size: 0.8rem;
    color: var(--dk-text-muted);
    text-decoration: line-through;
    text-align: left;
    min-height: 20px;
}

.dk-product-card__out-of-stock {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 6px;
    color: var(--dk-text-muted);
    font-size: 0.9rem;
    font-weight: 800;
}

/* Alerts & Toasts */
.dk-messages-container {
    margin-bottom: var(--dk-space-4);
}

.dk-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-radius: var(--dk-radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.dk-alert--success,
.dk-alert--info {
    background-color: var(--dk-green-soft);
    color: var(--dk-green);
    border-color: rgba(13, 148, 136, 0.25);
}

.dk-alert--warning,
.dk-alert--error {
    background-color: var(--dk-primary-soft);
    color: var(--dk-primary-dark);
    border-color: var(--dk-primary-border);
}

.dk-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.dk-toast {
    pointer-events: auto;
    min-width: 290px;
    max-width: 390px;
    background-color: var(--dk-navy);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: var(--dk-radius-sm);
    box-shadow: var(--dk-shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    animation: dkToastSlideIn 0.25s ease forwards;
}

.dk-toast--success { border-right: 4px solid var(--dk-green); }
.dk-toast--error { border-right: 4px solid var(--dk-primary); }

@keyframes dkToastSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.dk-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--dk-text-muted);
    margin-bottom: var(--dk-space-4);
    background: var(--dk-surface);
    padding: 10px 16px;
    border-radius: var(--dk-radius-sm);
    border: 1px solid var(--dk-border-light);
}

.dk-breadcrumb a:hover { color: var(--dk-primary); }
.dk-breadcrumb-sep { color: var(--dk-border); }

.dk-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--dk-space-6);
}

.dk-page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--dk-radius-sm);
    border: 1px solid var(--dk-border);
    background-color: var(--dk-surface);
    color: var(--dk-text-body);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dk-transition);
}

.dk-page-link:hover,
.dk-page-link.is-active {
    background-color: var(--dk-primary);
    color: #ffffff;
    border-color: var(--dk-primary);
}

@media (max-width: 992px) {
    .dk-hero-grid { grid-template-columns: 1fr; }
    .dk-side-banners { flex-direction: row; }
}

@media (max-width: 576px) {
    .dk-side-banners { flex-direction: column; }
    .dk-toast-container { left: 16px; right: 16px; bottom: 76px; }
    .dk-toast { max-width: none; }
}


/* Mobile Drawer Collapsible Subcategories */
.dk-drawer-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dk-drawer-nav-row .dk-drawer-nav-link {
    flex: 1;
}

.dk-drawer-sub-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--dk-border-light);
    border-radius: var(--dk-radius-xs);
    background-color: var(--dk-surface-muted);
    color: var(--dk-text-body);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--dk-transition);
}

.dk-drawer-sub-toggle .dk-chevron-svg {
    transition: transform 0.25s ease;
}

.dk-drawer-cat-item.is-open > .dk-drawer-nav-row > .dk-drawer-sub-toggle {
    background-color: var(--dk-primary-soft);
    color: var(--dk-primary);
    border-color: var(--dk-primary);
}

.dk-drawer-cat-item.is-open > .dk-drawer-nav-row > .dk-drawer-sub-toggle .dk-chevron-svg {
    transform: rotate(180deg);
}

.dk-drawer-sublist {
    display: none !important;
    list-style: none;
    padding-right: 14px;
    padding-bottom: 8px;
    margin: 0;
    border-right: 2px solid var(--dk-border-light);
}

.dk-drawer-cat-item.is-open > .dk-drawer-sublist {
    display: block !important;
}

/* Fix Mobile Hero Banner Full Height (Prevent Bottom Empty Rectangle in Chrome) */
.dk-hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.dk-hero-slide,
.dk-hero-slide.is-active {
    display: block;
    width: 100%;
    height: 100%;
}

.dk-hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
