/* ==========================================================================
   HansalDev Products Page - Premium Styles
   ========================================================================== */

/* --- Product Hero Atmosphere ---------------------------------------------- */
.hs-product-hero {
    position: relative;
    overflow: clip;
    background-image: var(--hs-grad-hero-atmosphere);
    background-repeat: no-repeat;
}
[data-theme="dark"] .hs-product-hero {
    background-image: var(--hs-grad-hero-atmosphere);
}

/* --- Breadcrumb Override for Products Page -------------------------------- */
.hs-product-hero .hs-breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 16px;
}
.hs-product-hero .breadcrumb-item + .breadcrumb-item::before {
    color: var(--hs-muted);
}
.hs-product-hero .breadcrumb-item a {
    color: var(--hs-muted);
    transition: color var(--hs-transition);
}
.hs-product-hero .breadcrumb-item a:hover {
    color: var(--hs-primary);
}
.hs-product-hero .breadcrumb-item.active {
    color: var(--hs-heading);
}

/* --- Category Navigation -------------------------------------------------- */
.hs-category-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hs-category-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hs-muted);
}
.hs-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hs-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--hs-radius-full);
    border: 1px solid var(--hs-border);
    background: var(--hs-surface);
    color: var(--hs-muted);
    cursor: pointer;
    transition: all var(--hs-card-transition);
    white-space: nowrap;
}
@media (hover: hover) {
    .hs-category-pill:hover {
        color: var(--hs-primary);
        border-color: rgba(109, 74, 255, 0.25);
        background: rgba(109, 74, 255, 0.04);
    }
}
.hs-category-pill.active {
    background: #F1EEFF;
    color: #6D4AFF;
    border-color: rgba(109, 74, 255, 0.25);
}
[data-theme="dark"] .hs-category-pill.active {
    background: rgba(109, 74, 255, 0.15);
    color: #8B6CFF;
    border-color: rgba(109, 74, 255, 0.3);
}

/* --- Search Form ---------------------------------------------------------- */
.hs-search-form {
    width: 100%;
}
.hs-search-form .input-group {
    box-shadow: var(--hs-shadow-sm);
    border-radius: var(--hs-radius-md);
    overflow: hidden;
    border: 1px solid var(--hs-border);
    background: var(--hs-surface);
    transition: all var(--hs-card-transition);
}
.hs-search-form .input-group:focus-within {
    border-color: #6D4AFF;
    box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.10), var(--hs-shadow-sm);
}
.hs-search-form .form-input {
    border: none;
    background: transparent;
    padding: 14px 20px;
    height: 52px;
    color: var(--hs-heading);
}
.hs-search-form .form-input::placeholder {
    color: var(--hs-muted);
}
.hs-search-form .form-input:focus {
    box-shadow: none;
    border-color: transparent;
}
.hs-search-form .btn {
    height: 52px;
    border: none;
    border-radius: 0;
    padding: 0 24px;
    white-space: nowrap;
}
@media (max-width: 991.98px) {
    .hs-search-form .btn span {
        display: none;
    }
    .hs-search-form .btn i {
        margin: 0;
    }
    .hs-search-form .btn {
        padding: 0 16px;
        width: 52px;
    }
}

/* --- Product Grid --------------------------------------------------------- */
.hs-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 1199.98px) {
    .hs-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 767.98px) {
    .hs-product-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Product Card Premium Overrides --------------------------------------- */
.product-card {
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all var(--hs-card-transition);
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(109, 74, 255, 0.4), transparent);
    opacity: 0;
    transition: opacity var(--hs-card-transition);
    z-index: 1;
}
@media (hover: hover) {
    .product-card:hover::before {
        opacity: 1;
    }
    .product-card:hover {
        transform: translateY(-6px);
        border-color: rgba(109, 74, 255, 0.25);
        box-shadow: var(--hs-shadow-md);
    }
}

/* Product Card Image */
.product-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: var(--hs-bg-soft);
    margin: -24px -24px 24px;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}
@media (hover: hover) {
    .product-card:hover .product-card-image img {
        transform: scale(1.025);
    }
}

/* Product Card Body */
.product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category Badge */
.product-card .badge {
    font-size: 11px;
    font-weight: 700;
    background: #F1EEFF;
    color: #6D4AFF;
    padding: 5px 9px;
    border-radius: 999px;
    margin-bottom: 12px;
    display: inline-block;
}
[data-theme="dark"] .product-card .badge {
    background: rgba(109, 74, 255, 0.15);
    color: #8B6CFF;
}

/* Product Name */
.product-card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--hs-heading);
    margin-bottom: 8px;
    line-height: 1.3;
}
.product-card-title a {
    color: inherit;
    transition: color var(--hs-transition);
}
.product-card-title a:hover {
    color: var(--hs-primary);
}

/* Short Description */
.product-card-desc {
    font-size: 0.9rem;
    color: var(--hs-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

/* Version */
.product-card-version {
    font-size: 0.8rem;
    color: var(--hs-muted);
    margin-bottom: 12px;
}

/* Price */
.product-card-price {
    font-family: 'Plus Jakarta Sans', var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    color: var(--hs-heading);
    margin-bottom: 20px;
}

/* Feature Highlights */
.product-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: grid;
    gap: 8px;
    max-height: 120px;
    overflow: hidden;
}
.product-card-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--hs-text);
}
.product-card-features li i {
    color: var(--hs-success);
    font-size: 14px;
    flex-shrink: 0;
}

/* Product Actions */
.product-card-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--hs-border);
    margin-top: auto;
}
.product-card-footer .btn {
    width: 100%;
    justify-content: center;
}
@media (min-width: 576px) {
    .product-card-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .product-card-footer .btn {
        width: auto;
        flex: 1;
    }
}

/* Hover Arrow Animation */
.product-card-footer .btn i {
    transition: transform var(--hs-transition);
}
@media (hover: hover) {
    .product-card-footer .btn:hover i {
        transform: translateX(3px);
    }
}

/* --- Section Header Divider Override -------------------------------------- */
.hd-section-heading .hs-glow-line {
    margin: 8px auto 0;
}

/* --- Use Case Cards ------------------------------------------------------- */
.hd-card.hs-spotlight {
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--hs-card-transition);
    position: relative;
}
@media (hover: hover) {
    .hd-card.hs-spotlight:hover {
        transform: translateY(-5px);
        border-color: rgba(109, 74, 255, 0.25);
        box-shadow: var(--hs-shadow-md);
    }
    .hd-card.hs-spotlight:hover .hs-icon-hover {
        background: var(--hs-primary-light);
        color: var(--hs-primary);
        transform: translateY(-2px);
    }
}
.hd-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: var(--hs-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hs-primary-light);
    color: var(--hs-primary);
    margin-bottom: 20px;
    transition: all var(--hs-card-transition);
}
.hd-icon-wrap .hd-icon {
    width: 24px;
    height: 24px;
}
.hd-card.hs-spotlight h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--hs-heading);
    margin-bottom: 12px;
}
.hd-card.hs-spotlight p {
    color: var(--hs-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}
.hd-text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--hs-primary);
    transition: all var(--hs-transition);
}
@media (hover: hover) {
    .hd-text-link:hover {
        color: var(--hs-primary-hover);
    }
    .hd-text-link:hover > span,
    .hd-text-link:hover svg {
        transform: translateX(3px);
    }
}

/* --- Why HansalDev Value Cards ------------------------------------------- */
.hd-value {
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: 16px;
    padding: 32px 24px;
    height: 100%;
    transition: all var(--hs-card-transition);
}
@media (hover: hover) {
    .hd-value:hover {
        transform: translateY(-5px);
        border-color: rgba(109, 74, 255, 0.25);
        box-shadow: var(--hs-shadow-md);
    }
    .hd-value:hover .hd-icon {
        background: var(--hs-primary-light);
        color: var(--hs-primary);
    }
}
.hd-value .hd-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--hs-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hs-primary-light);
    color: var(--hs-primary);
    margin-bottom: 20px;
    transition: all var(--hs-card-transition);
}
.hd-value .hd-icon svg {
    width: 24px;
    height: 24px;
}
.hd-value h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--hs-heading);
    margin-bottom: 12px;
}
.hd-value p {
    color: var(--hs-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* --- Custom Development Panel -------------------------------------------- */
.hd-custom-panel {
    position: relative;
    overflow: clip;
    border-radius: var(--hs-radius-xl);
    padding: 40px;
    background: linear-gradient(150deg, #F8F6FF 0%, #F1EEFF 55%, #E9E2FF 100%);
    border: 1px solid var(--hs-border);
    min-height: 100%;
}
[data-theme="dark"] .hd-custom-panel {
    background: linear-gradient(150deg, #171223 0%, #1A1430 100%);
}
.hd-custom-panel::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(109, 74, 255, 0.08), transparent 70%);
    pointer-events: none;
}
.hd-custom-panel > * {
    position: relative;
    z-index: 1;
}
.hs-stack-visual {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.hs-stack-core,
.hs-stack-layer {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--hs-surface);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--hs-heading);
    box-shadow: var(--hs-shadow-sm);
    transition: all var(--hs-card-transition);
}
.hs-stack-core {
    background: var(--hs-grad-primary);
    color: #fff;
    border-color: transparent;
}
.hs-stack-layer {
    position: relative;
}
@media (prefers-reduced-motion: no-preference) {
    .hs-stack-layer {
        animation: hs-stack-float 3.5s ease-in-out infinite;
    }
    .hs-stack-layer:nth-child(odd) {
        animation-direction: alternate-reverse;
    }
}
@keyframes hs-stack-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
    .hs-stack-layer { animation: none !important; }
}
.hd-panel-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--hs-heading);
    margin-bottom: 16px;
}
.hs-dark-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}
.hs-dark-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    /* color: var(--hs-dark-text); */
    font-size: 15px;
}
.hs-dark-list i {
    color: #B39CFF;
    font-size: 18px;
    flex-shrink: 0;
}
@media (max-width: 767.98px) {
    .hs-dark-list li {
        align-items: flex-start;
    }
}

/* --- Final CTA Atmosphere ------------------------------------------------ */
.hs-final-cta {
    position: relative;
    overflow: clip;
    background: linear-gradient(135deg, #F8F6FF 0%, #F1EEFF 46%, #ECE6FF 100%);
    border-top: 1px solid var(--hs-border);
    text-align: center;
}
[data-theme="dark"] .hs-final-cta {
    background: linear-gradient(135deg, #12131A 0%, #171223 50%, #1A1430 100%);
}
.hs-final-cta .hs-glow-orb--a {
    top: -180px;
    right: -80px;
}
.hs-final-cta .hs-glow-orb--b {
    bottom: -200px;
    left: -100px;
}
.hs-final-cta h2 {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}
.hs-final-cta p {
    color: var(--hs-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 32px;
}
.hs-final-cta .hd-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Empty State ---------------------------------------------------------- */
.hs-empty-state {
    text-align: center;
    padding: 80px 24px;
    border: 1px dashed var(--hs-border-strong);
    border-radius: var(--hs-radius-xl);
    background: var(--hs-bg-soft);
}
.hs-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--hs-primary-light);
    color: var(--hs-primary);
    font-size: 30px;
}
.hs-empty-state h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--hs-heading);
    margin-bottom: 12px;
}
.hs-empty-state p {
    color: var(--hs-muted);
    margin-bottom: 24px;
}

/* --- Responsive Adjustments ----------------------------------------------- */
@media (max-width: 991.98px) {
    .hs-category-nav {
        order: 2;
    }
    .hs-search-form {
        order: 1;
    }
    .hs-product-hero .row {
        flex-direction: column-reverse;
    }
    .hs-product-hero .col-lg-6:first-child {
        order: 2;
    }
    .hs-product-hero .col-lg-6:last-child {
        order: 1;
    }
}
@media (max-width: 767.98px) {
    .hs-category-pills {
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--hs-border) transparent;
    }
    .hs-category-pills::-webkit-scrollbar {
        height: 4px;
    }
    .hs-category-pills::-webkit-scrollbar-track {
        background: transparent;
    }
    .hs-category-pills::-webkit-scrollbar-thumb {
        background: var(--hs-border-strong);
        border-radius: 2px;
    }
    .hs-final-cta .hd-actions {
        flex-direction: column;
        align-items: center;
    }
    .hs-final-cta .hd-actions .btn {
        width: 100%;
        max-width: 320px;
    }
}

/* --- Dark Mode Adjustments ------------------------------------------------ */
[data-theme="dark"] .hs-product-hero .hs-breadcrumb .breadcrumb-item a {
    color: var(--hs-muted);
}
[data-theme="dark"] .hs-product-hero .hs-breadcrumb .breadcrumb-item a:hover {
    color: var(--hs-primary-hover);
}
[data-theme="dark"] .hs-product-hero .hs-breadcrumb .breadcrumb-item.active {
    color: var(--hs-heading);
}

/* --- Reduced Motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .hs-category-pill,
    .product-card,
    .hd-card,
    .hd-value,
    .hs-stack-layer,
    .hd-text-link > span,
    .hd-text-link svg,
    .product-card-footer .btn i {
        transition: none !important;
    }
    .product-card:hover,
    .hd-card:hover,
    .hd-value:hover {
        transform: none;
    }
    .product-card:hover .product-card-image img {
        transform: none;
    }
    .product-card::before {
        opacity: 0;
    }
}