/* =========================================================
   START – DAIVAVARNA VENDOR SHOWCASE PLUGIN
   ========================================================= */

/* Product page: About the Vendor */
.dvf-vendor-top {
    margin-bottom: 18px;
}

.dvf-heading {
    margin: 0 0 24px !important;
    font-size: 30px !important;
    font-weight: 700 !important;
}

.dvf-vendor-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.dvf-vendor-logo {
    display: block;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
}

.dvf-vendor-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dvf-vendor-identity-text {
    min-width: 0;
}

.dvf-brand-name {
    margin: 0 0 7px !important;
    font-size: 30px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    text-transform: none !important;
}

.dvf-brand-name a {
    color: #222 !important;
    text-decoration: none !important;
}

.dvf-brand-name a:hover {
    color: var(--wd-primary-color, #ff8b5c) !important;
}

.dvf-offered-by {
    margin-bottom: 7px;
    color: #888;
    font-size: 15px;
}

.dvf-offered-by a {
    color: #555 !important;
    font-weight: 600;
    text-decoration: none !important;
}

.dvf-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #777;
    font-size: 15px;
}

/* Dynamic Elementor vendor gallery */
#dv-vendor-gallery {
    margin-top: 10px;
    margin-bottom: 6px !important;
}

/* Keep the biography close to the showcase gallery on all screen sizes. */
#dv-vendor-gallery.elementor-widget,
#dv-vendor-gallery .elementor-widget-container {
    margin-bottom: 0 !important;
}

/* Elementor shortcode wrappers can add their own top spacing. */
.elementor-widget-shortcode:has(.dvf-vendor-bottom),
.elementor-widget-shortcode:has(.dvf-vendor-bottom) .elementor-widget-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#dv-vendor-gallery .swiper-slide-inner {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

#dv-vendor-gallery .swiper-slide-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 12px !important;
}

.dvf-vendor-bottom {
    margin-top: 0 !important;
    margin-bottom: 30px;
}

.dvf-biography {
    color: #666;
    font-size: 16px;
    line-height: 1.75;
    font-weight: 400;
}

.dvf-biography p {
    margin-bottom: 15px;
}

.dvf-store-action {
    margin-top: 14px;
}

/* Let WoodMart control the real button colors/hover. */
.dvf-store-button {
    text-decoration: none !important;
}

/* Click/tap vendor showcase images to view them full-screen. */
#dv-vendor-gallery .dvs-lightbox-trigger {
    cursor: zoom-in !important;
}

html.dvs-lightbox-open,
html.dvs-lightbox-open body {
    overflow: hidden !important;
}

.dvs-vendor-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.dvs-vendor-lightbox.is-open {
    display: flex;
}

.dvs-vendor-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.90);
}

.dvs-vendor-lightbox-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(96vw, 1600px);
    height: min(92vh, 1100px);
    padding: 18px clamp(72px, 6vw, 108px) 30px;
    box-sizing: border-box;
}

.dvs-vendor-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pinch-zoom;
}

/* Close button keeps the clean white circle. */
.dvs-vendor-lightbox-close {
    position: absolute;
    z-index: 3;
    top: 6px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #222 !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22) !important;
    font-size: 32px !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.dvs-vendor-lightbox-close:hover {
    background: #ff8b5c !important;
    color: #fff !important;
}

/*
 * Previous / Next use a WoodMart-style floating chevron only.
 * No white circle, so they stay clean and correctly shaped on desktop
 * and mobile. The dark drop shadow keeps the white chevron visible over
 * both light and dark photographs.
 */
.dvs-vendor-lightbox-prev,
.dvs-vendor-lightbox-next {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 64px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
    transform: translateY(-50%);
    font-size: 0 !important;
    line-height: 0 !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.dvs-vendor-lightbox-prev::before,
.dvs-vendor-lightbox-next::before {
    content: '';
    display: block;
    width: 17px;
    height: 17px;
    box-sizing: border-box;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
    filter:
        drop-shadow(0 1px 1px rgba(0, 0, 0, 0.95))
        drop-shadow(0 0 4px rgba(0, 0, 0, 0.78));
    transition: color 0.18s ease, transform 0.18s ease;
}

.dvs-vendor-lightbox-prev::before {
    transform: rotate(-135deg);
}

.dvs-vendor-lightbox-next::before {
    transform: rotate(45deg);
}

.dvs-vendor-lightbox-prev {
    left: 18px;
}

.dvs-vendor-lightbox-next {
    right: 18px;
}

@media (hover: hover) and (pointer: fine) {
    .dvs-vendor-lightbox-prev:hover,
    .dvs-vendor-lightbox-next:hover {
        color: #ff8b5c !important;
        background: transparent !important;
    }
}

.dvs-vendor-lightbox-prev:active,
.dvs-vendor-lightbox-next:active {
    color: #ff8b5c !important;
    background: transparent !important;
}

.dvs-vendor-lightbox-count {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    padding: 7px 12px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    font-size: 13px;
    line-height: 1;
}

@media (max-width: 767px) {
    .dvs-vendor-lightbox {
        display: none;
        align-items: stretch;
        justify-content: stretch;
        padding:
            max(12px, env(safe-area-inset-top))
            12px
            max(14px, env(safe-area-inset-bottom));
    }

    .dvs-vendor-lightbox.is-open {
        display: flex;
    }

    .dvs-vendor-lightbox-dialog {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        padding:
            calc(max(8px, env(safe-area-inset-top)) + 56px)
            52px
            calc(max(20px, env(safe-area-inset-bottom)) + 34px);
        box-sizing: border-box;
    }

    .dvs-vendor-lightbox-image {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 6px;
        touch-action: pinch-zoom;
    }

    .dvs-vendor-lightbox-close {
        position: absolute !important;
        top: calc(max(4px, env(safe-area-inset-top))) !important;
        right: 4px !important;
        width: 44px;
        height: 44px;
        font-size: 30px !important;
        transform: none !important;
    }

    .dvs-vendor-lightbox-prev,
    .dvs-vendor-lightbox-next {
        top: 50% !important;
        bottom: auto !important;
        width: 42px;
        height: 64px;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: translateY(-50%) !important;
    }

    .dvs-vendor-lightbox-prev {
        left: 2px !important;
    }

    .dvs-vendor-lightbox-next {
        right: 2px !important;
    }

    .dvs-vendor-lightbox-prev::before,
    .dvs-vendor-lightbox-next::before {
        width: 16px;
        height: 16px;
        border-width: 3px 3px 0 0;
    }

    .dvs-vendor-lightbox-count {
        left: 50%;
        bottom: calc(max(6px, env(safe-area-inset-bottom))) !important;
        transform: translateX(-50%);
        padding: 7px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Vendor dashboard biography helpers */
.dvs-word-counter {
    margin: 6px 0 0;
    color: #777;
    font-size: 13px;
}

.dvs-long-bio-help {
    margin-top: 8px !important;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .dvf-heading {
        font-size: 24px !important;
    }

    .dvf-vendor-identity {
        align-items: flex-start;
        gap: 12px;
    }

    .dvf-vendor-logo {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
    }

    .dvf-brand-name {
        font-size: 25px !important;
    }

    .dvf-biography {
        font-size: 15px;
    }
}

/* =========================================================
   END – DAIVAVARNA VENDOR SHOWCASE PLUGIN
   ========================================================= */
