/* ================================================================
   DetectorHub Elementor Widgets — Frontend Styles
   Luxury Obsidian & Gold Theme
================================================================ */

/* ── Fonts ───────────────────────────────────────────────────── */
.dhb-widget-wrap { font-family: 'Montserrat', sans-serif; }
.dhb-section-title, .dhb-card-title a, .dhb-cat-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ── Section Header ──────────────────────────────────────────── */
.dhb-section-header {
    margin-bottom: 36px;
}
.dhb-section-label-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.dhb-section-label-line {
    display: inline-block;
    width: 22px;
    height: 2px;
    background: #c9a84c;
    flex-shrink: 0;
}
.dhb-section-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c9a84c;
}
.dhb-section-title {
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.1;
    color: #ede8df;
    margin: 0;
}

/* ================================================================
   PRODUCT CARD WIDGET
================================================================ */
.dhb-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ── Single Card ─────────────────────────────────────────────── */
.dhb-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #181410 0%, #13100e 100%);
    border: 1px solid #2d2820;
    border-radius: 4px;
    transition: border-color 0.25s ease,
                box-shadow 0.25s ease;
}
.dhb-product-card:hover {
    border-color: rgba(201, 168, 76, 0.35);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(201,168,76,0.06);
}

/* Top gold line */
.dhb-card-top-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
}
.dhb-product-card:hover .dhb-card-top-line { opacity: 1; }

/* ── Image Area ──────────────────────────────────────────────── */
.dhb-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #161310, #0f0d0a);
    overflow: hidden;
}
.dhb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 32px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
}
.dhb-product-card:hover .dhb-card-image img {
    transform: scale(1.03);
}

/* ── Badges ──────────────────────────────────────────────────── */
.dhb-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 2px;
    line-height: 1.4;
}
.dhb-badge-sale {
    background: #c0392b;
    color: #fff;
}
.dhb-badge-featured {
    background: #c9a84c;
    color: #0f0d0a;
}

/* ── Rating ──────────────────────────────────────────────────── */
.dhb-rating-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(15,13,10,0.9);
    border: 1px solid rgba(201,168,76,0.25);
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #c9a84c;
}
.dhb-rating-badge svg { color: #c9a84c; }

/* ── Quick View (disabled by default) ──────────────────────── */
.dhb-quick-view {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,13,10,0.65);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 4;
    pointer-events: none;
}
.dhb-product-card:hover .dhb-quick-view {
    opacity: 1;
    pointer-events: auto;
}
.dhb-quick-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #c9a84c;
    color: #0f0d0a;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 2px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.dhb-quick-view-btn:hover { background: #e8c84a; color: #0f0d0a; }

/* ── Card Divider ────────────────────────────────────────────── */
.dhb-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    opacity: 0.3;
}

/* ── Card Body ───────────────────────────────────────────────── */
.dhb-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Category tag */
.dhb-cat-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c9a84c;
    text-decoration: none;
    transition: opacity 0.2s;
}
.dhb-cat-tag:hover { opacity: 0.7; color: #c9a84c; }

/* Title */
.dhb-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}
.dhb-card-title a {
    color: #ede8df;
    text-decoration: none;
    transition: color 0.25s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dhb-card-title a:hover { color: #c9a84c; }

/* Description */
.dhb-card-desc {
    font-size: 0.72rem;
    line-height: 1.65;
    color: #5a4f42;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer row */
.dhb-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(201,168,76,0.12);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

/* Price */
.dhb-card-price {
    line-height: 1;
}
.dhb-card-price .amount {
    font-size: 1.35rem;
    font-weight: 800;
    color: #c9a84c;
    font-family: 'Montserrat', sans-serif;
}
.dhb-card-price ins {
    text-decoration: none;
}
.dhb-card-price del .amount {
    font-size: 0.8rem;
    color: #5a4f42;
    font-weight: 400;
    -webkit-text-fill-color: #5a4f42 !important;
}

/* Add to Cart button */
.dhb-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(201,168,76,0.1);
    color: #c9a84c;
    border: 1px solid rgba(201,168,76,0.35);
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
}
.dhb-card-btn:hover,
.dhb-card-btn.added {
    background: #c9a84c;
    color: #0f0d0a;
    border-color: #c9a84c;
}

/* No products */
.dhb-no-products {
    color: #5a4f42;
    font-size: 0.85rem;
    text-align: center;
    padding: 40px 20px;
}

/* ================================================================
   CATEGORY CARD WIDGET
================================================================ */
.dhb-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ── Cat Card ────────────────────────────────────────────────── */
.dhb-cat-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #141210;
    border: 1px solid #2d2820;
    border-radius: 4px;
    text-decoration: none;
    transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease;
}
.dhb-cat-card:hover {
    border-color: rgba(201,168,76,0.45);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(201,168,76,0.06);
}

/* Top hover line */
.dhb-cat-top-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 5;
}
.dhb-cat-card:hover .dhb-cat-top-line { opacity: 1; }

.dhb-cat-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 32px;
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
}
.dhb-cat-card:hover img { transform: scale(1.05); }

/* Hover glow */
.dhb-cat-glow-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(201,168,76,0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}
.dhb-cat-card:hover .dhb-cat-glow-overlay { opacity: 1; }

/* Gradient overlay */
.dhb-cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(15,13,10,0.97) 0%,
        rgba(15,13,10,0.5) 55%,
        transparent 100%);
    z-index: 2;
}

/* Info block */
.dhb-cat-info {
    position: absolute;
    inset-x: 0;
    bottom: 0;
    padding: 20px;
    z-index: 3;
}

.dhb-cat-count {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 5px;
}
.dhb-cat-name {
    display: block;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ede8df;
    line-height: 1.2;
    margin-bottom: 8px;
}

.dhb-cat-divider-line {
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, #c9a84c, transparent);
    margin-bottom: 8px;
    transition: width 0.3s ease;
}
.dhb-cat-card:hover .dhb-cat-divider-line { width: 48px; }

.dhb-cat-desc {
    font-size: 0.7rem;
    color: #5a4f42;
    line-height: 1.5;
    margin: 0 0 8px;
}

.dhb-cat-explore {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c9a84c;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.dhb-cat-explore svg {
    transition: transform 0.3s ease;
}
.dhb-cat-card:hover .dhb-cat-explore {
    opacity: 1;
    transform: translateY(0);
}
.dhb-cat-card:hover .dhb-cat-explore svg {
    transform: translateX(3px);
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1024px) {
    .dhb-products-grid,
    .dhb-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .dhb-products-grid,
    .dhb-cat-grid {
        grid-template-columns: 1fr;
    }
    .dhb-section-title {
        font-size: 2rem;
    }
    .dhb-card-image img { padding: 20px; }
    .dhb-cat-card img { padding: 20px; }
}

/* ── Elementor editor visibility fix ──────────────────────────── */
.elementor-widget-dhb_product_cards .dhb-quick-view,
.elementor-widget-dhb_category_cards .dhb-cat-explore {
    transition: none;
}

/* ================================================================
   CAROUSEL WIDGET — Shared
================================================================ */

.dhb-carousel-wrap {
    position: relative;
    overflow: hidden;
}

/* Track outer clips the overflow */
.dhb-carousel-track-outer {
    overflow: hidden;
}

.dhb-carousel-track {
    display: flex;
    will-change: transform;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dhb-carousel-slide {
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Cards inside carousel fill the slide */
.dhb-carousel-slide .dhb-product-card,
.dhb-carousel-slide .dhb-cat-card {
    width: 100%;
    height: 100%;
}

/* ── Arrow Buttons ──────────────────────────────────────────── */
.dhb-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,13,10,0.9);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    padding: 0;
    outline: none;
}
.dhb-carousel-btn:hover {
    background: rgba(201,168,76,0.15);
    border-color: rgba(201,168,76,0.6);
}
.dhb-carousel-btn svg {
    display: block;
    flex-shrink: 0;
}
.dhb-carousel-prev {
    left: -48px;
}
.dhb-carousel-next {
    right: -48px;
}
/* If widget is full-width or wrapped, show arrows inside */
.dhb-carousel-wrap.dhb-arrows-inside .dhb-carousel-prev { left: 8px; }
.dhb-carousel-wrap.dhb-arrows-inside .dhb-carousel-next { right: 8px; }

/* Show arrows on hover */
.dhb-carousel-wrap {
    padding: 0 52px;
}

/* ── Dot Navigation ─────────────────────────────────────────── */
.dhb-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
}
.dhb-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(201,168,76,0.25);
    border: 1px solid rgba(201,168,76,0.3);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
    outline: none;
}
.dhb-carousel-dot:hover {
    background: rgba(201,168,76,0.5);
}
.dhb-carousel-dot.active {
    background: #c9a84c;
    transform: scale(1.3);
    border-color: #c9a84c;
}

/* ── Category cards in carousel get fixed aspect ratio ──────── */
.dhb-carousel-slide .dhb-cat-card {
    aspect-ratio: 4 / 5;
    display: block;
    min-height: 220px;
}

/* ── Drag / touch cursor ────────────────────────────────────── */
.dhb-carousel-track-outer {
    cursor: grab;
    user-select: none;
}
.dhb-carousel-track-outer.is-dragging {
    cursor: grabbing;
}
.dhb-carousel-track-outer.is-dragging .dhb-carousel-track {
    transition: none;
}

/* ── Responsive arrow placement ────────────────────────────── */
@media (max-width: 1024px) {
    .dhb-carousel-wrap {
        padding: 0 44px;
    }
    .dhb-carousel-prev { left: -44px; }
    .dhb-carousel-next { right: -44px; }
}
@media (max-width: 767px) {
    .dhb-carousel-wrap {
        padding: 0 36px;
    }
    .dhb-carousel-prev { left: -36px; }
    .dhb-carousel-next { right: -36px; }
    .dhb-carousel-btn {
        width: 32px;
        height: 32px;
    }
}
