/**
 * Promotional Ads Block Styling
 * Matches Original Electro Theme Design
 */

/* Home V2 DA Block Container */
.home-v2-da-block {
    margin-top: 50px;
    margin-bottom: 2.5em;
}

.home-v2-da-block > .da-block {
    margin: 0 -10px 43px -10px;
}

/* DA Block Row */
.da-block {
    margin-bottom: 1.643em;
}

/* Individual DA Card - NO Bootstrap col class */
.da {
    margin-bottom: 0;
}

/* DA Inner - Background and Layout */
.da-inner {
    background-color: #f5f6f8; /* Lightened border color */
    font-size: 14px;
    line-height: 1.278em;
    height: 100%;
    display: flex;
}

/* DA Text - Uppercase and Light Weight */
.da-text {
    font-weight: 200;
    text-transform: uppercase;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.90em; /* slightly smaller default */
}

.da-text strong {
    font-weight: 600;
    display: inline;
}

/* DA Media Container */
.da-media {
    align-items: flex-start;
    margin: auto;
    color: inherit;
    text-decoration: none;
}

.da-media:hover {
    color: inherit;
    text-decoration: none;
}

/* DA Media Left - Image Container */
.da-media-left {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.da-media-left img {
    margin: auto;
    max-width: 100%;
    height: auto;
}

/* DA Image - Consistent Sizing for All Cards */
.da-media-left img.da-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .da-media-left img.da-image {
        height: 140px;
    }
}

@media (min-width: 1200px) {
    .da-media-left img.da-image {
        height: 160px;
    }
}

/* DA Media Body - Text Content */
.da-media-body {
    flex-grow: 1;
    max-width: 130px;
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

/* DA Action - Button/Link with Arrow */
.da-action {
    font-weight: bold;
    display: flex;
    align-items: center;
    font-size: 0.833em;
    margin-top: 0.8em;
}

/* Add arrow after action text */
.da-action::after {
    content: "\203A"; /* Right angle bracket */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px; /* subtler dot */
    height: 14px;
    border-radius: 50%;
    background-color: #2563eb; /* blue */
    color: #fff;
    font-weight: 600;
    margin-left: 6px;
    text-align: center;
    font-size: .95em;
    line-height: 1;
    flex-shrink: 0;
}

/* Price Display Styles */
.from {
    text-transform: uppercase;
    font-weight: 300;
    display: block;
    line-height: 1.2;
}

.from .prefix {
    font-size: 0.85em;
    line-height: 1.2;
    display: block;
    width: auto;
    margin-bottom: 2px;
}

.from .value {
    font-weight: bold;
    font-size: 1.4em;
    letter-spacing: -0.025em;
    display: block;
}

.from .value sup {
    top: -0.25em;
}

.from .suffix {
    top: -0.5em;
    position: relative;
    font-weight: bold;
    vertical-align: top;
    margin-left: 2px;
}

/* Price action - hide arrow for price display */
.da-action:has(.from)::after {
    display: none;
}

/* Responsive Styles */

/* Large screens */
@media (min-width: 992px) {
    .da-inner {
        font-size: 16px;
    }
    
    .da-text { font-size: 0.95em; }
    .da-action::after { width: 16px; height: 16px; font-size: 1.05em; }
    
    .da-media-body {
        min-height: 140px;
    }
}

/* Extra Large screens */
@media (min-width: 1200px) {
    .da-inner {
        font-size: 18px;
        line-height: 23px;
    }
    
    .da-text { font-size: 1.0em; }
    .da-action { font-size: 13px; line-height: 28px; margin-top: 0; }
    .da-action::after { width: 18px; height: 18px; font-size: 1.1em; }
    
    .da-media-left {
        margin-right: 6%;
    }
    
    .da-media-body {
        min-height: 160px;
    }
}

/* Home V2 Specific Styles */
.home-v2-da-block .da-block.row-cols-xl-3 .da-media-body {
    letter-spacing: -.6px;
}

/* Hide third item on XL screens only (1200-1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .home-v2-da-block .da-block.row-cols-xl-3 > .da {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .home-v2-da-block .da-block.row-cols-xl-3 > .da:last-child {
        display: none;
    }
}

/* Medium screens - 2 columns */
@media (max-width: 1199px) {
    .da-block.row-cols-xl-3 > .da:last-child {
        display: none;
    }
}

/* Mobile - Stack cards */
@media (max-width: 767px) {
    .home-v2-da-block {
        margin-bottom: 1.5em;
    }
    
    .da-media-left img {
        max-width: 80px;
    }
    
    .da-text {
        font-size: 13px;
    }
    
    .da-action {
        font-size: 11px;
    }
}

/* Overflow Auto for Horizontal Scroll on Small Screens */
@media (max-width: 991px) {
    .da-block.overflow-auto {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .da-block.overflow-auto::-webkit-scrollbar {
        height: 6px;
    }
    
    .da-block.overflow-auto::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .da-block.overflow-auto::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }
    
    .da-block.overflow-auto::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

/* Hover Effects */
.da-inner {
    transition: all 0.3s ease;
}

.da-inner:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Stretched Link Support */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    pointer-events: auto;
    content: "";
    background-color: rgba(0, 0, 0, 0);
}
