/* ==========================================================================
   DOC SANSAR - ENTERPRISE AD SYSTEM v3.0 (PREMIUM ORANGE)
   ========================================================================== */

:root {
    /* -- Brand Palette -- */
    --da-pri: #e04826;       /* Primary Orange */
    --da-dark: #1e293b;      /* Dark Slate */
    --da-light: #f8fafc;     /* Light Gray Background */
    --da-border: #e2e8f0;    /* Border Gray */
    --da-white: #ffffff;
    --da-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    
    /* -- Google/Meta Colors -- */
    --da-link: #1a0dab;      /* Google Link Blue */
    --da-url: #202124;       /* Google URL Black */
    --da-star: #f59e0b;      /* Star Yellow */
    --da-green: #16a34a;     /* Success Green */
}

/* Base Wrapper - Ensures Fluidity */
.ds-ad-wrapper {
    width: 100%;
    margin-bottom: 30px;
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

.ds-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ==========================================================================
   1. PRODUCT CARD (Amazon Style)
   ========================================================================== */
.ds-ad-card {
    background: var(--da-white);
    border: 1px solid var(--da-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ds-ad-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--da-shadow);
    border-color: var(--da-pri);
}

.ds-ad-header { position: relative; }

.ds-ad-label {
    position: absolute; top: 10px; right: 10px;
    background: rgba(30, 41, 59, 0.85); color: #fff;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    padding: 3px 8px; border-radius: 4px; z-index: 2;
    backdrop-filter: blur(4px);
}

.ds-ad-img-box {
    /*height: 180px;*/
    background: var(--da-light);
    /*padding: 20px;*/
    display: flex; align-items: center; justify-content: center;
}

.ds-ad-img-box img {
    max-height: 100%; max-width: 100%; object-fit: contain;
    transition: transform 0.3s;
}

.ds-ad-card:hover .ds-ad-img-box img { transform: scale(1.05); }

.ds-ad-body { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }

.ds-ad-title {
    font-size: 0.95rem; font-weight: 600; color: var(--da-dark);
    margin: 0 0 5px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.ds-ad-rating { font-size: 0.75rem; color: var(--da-star); margin-bottom: 12px; }

.ds-ad-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

.ds-ad-price { font-size: 1.1rem; font-weight: 800; color: var(--da-pri); }

.ds-ad-btn {
    background: var(--da-pri); color: #fff;
    padding: 6px 14px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 700;
    transition: background 0.2s;
}

.ds-ad-card:hover .ds-ad-btn { background: #c23b1b; }


/* ==========================================================================
   2. BANNER IMAGE
   ========================================================================== */
.ds-ad-banner {
    display: block; position: relative;
    border-radius: 12px; overflow: hidden;
    line-height: 0; border: 1px solid var(--da-border);
}

.ds-ad-overlay-label {
    position: absolute; bottom: 5px; right: 5px;
    background: rgba(255, 255, 255, 0.8); color: #000;
    font-size: 9px; padding: 2px 5px; border-radius: 3px;
}


/* ==========================================================================
   3. SEARCH LISTING (Google Style)
   ========================================================================== */
.ds-search-ad {
    padding: 15px; background: #fff;
    border-radius: 8px; border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ds-search-badge { font-weight: 700; color: #5f6368; font-size: 11px; margin-right: 5px; }
.ds-search-url { color: var(--da-url); font-size: 12px; }

.ds-search-title {
    display: block; color: var(--da-link);
    font-size: 18px; line-height: 1.3; font-weight: 400;
    text-decoration: none; margin-top: 5px;
}
.ds-search-title:hover { text-decoration: underline; }

.ds-search-desc {
    color: #4d5156; font-size: 14px; line-height: 1.5; margin: 4px 0 8px 0;
}

.ds-search-links { display: flex; gap: 12px; font-size: 13px; }
.ds-search-links a { color: var(--da-link); text-decoration: none; }
.ds-search-links a:hover { text-decoration: underline; }


/* ==========================================================================
   4. CAROUSEL GALLERY
   ========================================================================== */
.ds-carousel-container {
    background: #fff; border: 1px solid var(--da-border);
    border-radius: 12px; padding: 12px; overflow: hidden;
}

.ds-carousel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; font-size: 11px; color: #5f6368; text-transform: uppercase; letter-spacing: 0.5px;
}

.ds-carousel-nav button {
    background: none; border: 1px solid var(--da-border);
    border-radius: 50%; width: 24px; height: 24px;
    cursor: pointer; color: #5f6368;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; transition: 0.2s;
}
.ds-carousel-nav button:hover { background: var(--da-light); color: var(--da-pri); }

.ds-carousel-track {
    display: flex; gap: 12px; overflow-x: auto;
    scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}
.ds-carousel-track::-webkit-scrollbar { height: 0px; background: transparent; }

.ds-carousel-item {
    flex: 0 0 130px; text-decoration: none;
    border: 1px solid transparent; border-radius: 8px;
    padding: 10px; transition: 0.2s;
}
.ds-carousel-item:hover {
    border-color: var(--da-border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.ds-carousel-item img {
    width: 100%; height: 110px; object-fit: contain; margin-bottom: 8px;
}

.ds-c-info { font-size: 12px; color: var(--da-dark); line-height: 1.3; }
.ds-c-info strong {
    display: block; font-weight: 600; height: 32px;
    overflow: hidden; margin-bottom: 4px;
}
.ds-c-info span { font-weight: 700; color: var(--da-pri); font-size: 13px; }


/* ==========================================================================
   5. GRID GALLERY (2x2)
   ========================================================================== */
.ds-grid-ad {
    border: 1px solid var(--da-border);
    border-radius: 12px; background: #fff; padding: 15px;
}

.ds-grid-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.ds-grid-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--da-border); }
.ds-grid-header div { flex: 1; line-height: 1.2; font-size: 13px; }
.ds-grid-header strong { display: block; color: var(--da-dark); }
.ds-grid-header small { display: block; color: #94a3b8; font-size: 11px; }

.ds-grid-cta {
    font-size: 12px; color: var(--da-pri); font-weight: 700;
    text-decoration: none; border: 1px solid var(--da-pri);
    padding: 4px 12px; border-radius: 20px; transition: 0.2s;
}
.ds-grid-cta:hover { background: var(--da-pri); color: #fff; }

.ds-grid-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.ds-grid-item {
    position: relative; border-radius: 8px; overflow: hidden;
    text-decoration: none; background: #f1f5f9;
}
.ds-grid-item img {
    width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
    transition: transform 0.3s;
}
.ds-grid-item:hover img { transform: scale(1.05); }

.ds-grid-item span {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.6); color: #fff;
    font-size: 11px; padding: 4px; text-align: center; font-weight: 600;
    backdrop-filter: blur(2px);
}


/* ==========================================================================
   6. VIDEO CARD
   ========================================================================== */
.ds-video-card {
    border-radius: 12px; overflow: hidden;
    border: 1px solid var(--da-border); background: #000;
}

.ds-video-wrapper {
    position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0;
}
.ds-video-wrapper video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
}
.ds-video-overlay {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700;
}

.ds-video-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 15px; background: #fff;
    text-decoration: none; color: var(--da-dark);
}
.ds-vf-text { display: flex; flex-direction: column; }
.ds-vf-text strong { font-size: 0.95rem; }
.ds-vf-text span { font-size: 0.85rem; color: var(--da-pri); font-weight: 700; }


/* ==========================================================================
   7. COUPON CLIP
   ========================================================================== */
.ds-coupon-card {
    display: flex; border: 2px dashed var(--da-pri);
    border-radius: 12px; background: #fff7ed; overflow: hidden;
}

.ds-coupon-left {
    background: var(--da-pri); color: #fff;
    padding: 15px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; min-width: 90px;
}
.ds-coupon-val { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.ds-coupon-left small { font-size: 0.7rem; font-weight: 700; opacity: 0.9; }

.ds-coupon-right { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.ds-coupon-right h4 { margin: 0 0 8px; font-size: 1rem; color: var(--da-dark); font-weight: 600; }

.ds-coupon-box {
    display: flex; background: #fff;
    border: 1px solid var(--da-border); border-radius: 6px;
    overflow: hidden; text-decoration: none; cursor: pointer;
}
.ds-code {
    flex-grow: 1; padding: 8px; text-align: center;
    font-family: monospace; font-weight: 700; color: var(--da-dark);
    letter-spacing: 1px; font-size: 1.1rem;
}
.ds-copy-btn {
    background: var(--da-dark); color: #fff;
    padding: 8px 15px; font-size: 0.8rem; font-weight: 700;
    display: grid; place-items: center;
}


/* ==========================================================================
   8. APP INSTALL
   ========================================================================== */
.ds-app-card {
    display: flex; align-items: center; padding: 15px;
    background: #fff; border: 1px solid var(--da-border);
    border-radius: 12px; text-decoration: none; color: inherit;
    transition: 0.2s;
}
.ds-app-card:hover { transform: scale(1.01); border-color: var(--da-green); }

.ds-app-icon {
    width: 60px; height: 60px; border-radius: 14px;
    margin-right: 15px; object-fit: cover;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ds-app-info { flex-grow: 1; }
.ds-app-info h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--da-dark); }
.ds-app-meta { font-size: 0.8rem; color: #64748b; display: flex; align-items: center; gap: 8px; }
.ds-stars { color: var(--da-star); }

.ds-app-btn {
    background: var(--da-green); color: #fff; border: none;
    padding: 8px 20px; border-radius: 30px;
    font-weight: 700; cursor: pointer; font-size: 0.85rem;
}


/* ==========================================================================
   9. INTERSTITIAL POPUP (Animation)
   ========================================================================== */
.ds-interstitial-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    animation: dsFadeIn 0.3s ease;
}

.ds-interstitial-box {
    position: relative; width: 340px; background: #fff;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: dsPopUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ds-int-close {
    position: absolute; top: 15px; right: 15px;
    background: rgba(255,255,255,0.9); color: #000; border: none;
    width: 32px; height: 32px; border-radius: 50%;
    font-size: 20px; line-height: 1; cursor: pointer; z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ds-interstitial-box a { text-decoration: none; color: inherit; display: block; }
.ds-interstitial-box img { width: 100%; height: 280px; object-fit: cover; }

.ds-int-content { padding: 25px 20px; text-align: center; }
.ds-int-content h3 { margin: 0 0 8px; font-size: 20px; color: var(--da-pri); font-weight: 800; }
.ds-int-content p { margin: 0 0 20px; font-size: 14px; color: #64748b; line-height: 1.5; }

.ds-int-btn {
    display: inline-block; background: var(--da-pri); color: #fff;
    padding: 12px 30px; border-radius: 50px;
    font-weight: 700; font-size: 14px;
    box-shadow: 0 4px 15px rgba(224, 72, 38, 0.4);
}

.ds-int-footer {
    background: #f1f5f9; font-size: 10px; text-align: center;
    padding: 8px; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px;
}


/* ==========================================================================
   10. STICKY FOOTER
   ========================================================================== */
.ds-sticky-bar {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--da-border);
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 9999; box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(8px);
    animation: dsSlideUp 0.5s ease-out;
}

.ds-sticky-close {
    position: absolute; top: -15px; right: 10px;
    background: #fff; color: #ef4444;
    width: 24px; height: 24px; border-radius: 50%;
    text-align: center; line-height: 24px; font-weight: bold; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15); font-size: 18px;
}

.ds-sticky-content { display: flex; align-items: center; gap: 12px; }
.ds-sticky-content img { width: 45px; height: 45px; border-radius: 8px; object-fit: cover; }
.ds-sticky-content div { display: flex; flex-direction: column; }
.ds-sticky-content strong { font-size: 0.95rem; color: var(--da-dark); }
.ds-sticky-content span { font-size: 0.85rem; color: var(--da-pri); font-weight: 700; }

.ds-sticky-btn {
    background: var(--da-pri); color: #fff;
    padding: 10px 25px; border-radius: 50px;
    text-decoration: none; font-weight: 700; font-size: 0.9rem;
}

@media(max-width:600px) {
    .ds-sticky-bar { flex-direction: column; gap: 10px; text-align: center; padding-bottom: 25px; }
    .ds-sticky-btn { width: 100%; display: block; }
}


/* ==========================================================================
   11. TEXT LINK
   ========================================================================== */
.ds-ad-textlink {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 15px; background: #fff;
    border: 1px dashed var(--da-pri); color: var(--da-dark);
    border-radius: 8px; text-decoration: none;
    font-weight: 600; font-size: 0.95rem;
    transition: all 0.2s;
}
.ds-ad-textlink:hover { background: #fff7ed; border-style: solid; }
.ds-ad-textlink i { color: #f59e0b; }


/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes dsFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dsPopUp { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes dsSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }