﻿body {
    background: var(--white-ivory);
    overflow-x: hidden;
}

@keyframes sparkle {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

.animated-heading {
    background: linear-gradient(45deg, var(--white-ivory), var(--white-ivory), var(--teal-accent));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy-blue-dark);
    margin-bottom: 20px;
    position: relative;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, var(--teal-accent), var(--navy-blue-dark));
    border-radius: 2px;
}

/* Shares section styles */
#shares {
    background: var(--white-ivory);
    padding: 50px 0;
}

/* Search container */
.search-container {
    max-width: 500px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.search-input-group {
    flex-grow: 1;
    position: relative;
    max-width: 400px;
    display: flex;
    align-items: center;
}

.search-input {
    border: 2px solid rgba(45, 184, 163, 0.2);
    border-radius: 25px;
    padding: 12px 16px 12px 50px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--white-ivory);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: var(--navy-blue-dark);
    width: 100%;
}

.search-input::placeholder {
    color: var(--grey);
}

.search-input:focus {
    border-color: var(--teal-accent);
    box-shadow: 0 0 0 0.2rem rgba(45, 184, 163, 0.25);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey);
    font-size: 1.2rem;
    z-index: 2;
}

.search-input-group .clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--grey);
    font-size: 1.2rem;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-input-group .clear-btn:hover {
    color: var(--teal-accent);
}

.btn-show-all {
    background: linear-gradient(45deg, var(--teal-accent), var(--navy-blue-dark));
    border: none;
    color: var(--white-ivory);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

.btn-show-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--white-ivory);
}

.btn-custom {
    background: linear-gradient(45deg, var(--teal-accent), var(--navy-blue-dark));
    border: none;
    color: var(--white-ivory);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--white-ivory);
}

.btn-custom-new {
    background: linear-gradient(45deg, var(--navy-blue-dark), var(--teal-accent));
    color: var(--white-ivory);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-custom-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--white-ivory);
}

/* SMALLER HORIZONTAL HOT DEAL BADGE - TOP RIGHT CORNER */
.hot-deal-badge {
    position: absolute;
    top: 2px;
    right: 10px;
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    color: white !important;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    z-index: 15 !important;
    animation: pulseBadge 2s infinite, glowEffect 1.5s infinite alternate;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform: none;
    font-family: 'Arial Black', Arial, sans-serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    text-align: center;
    min-width: 80px;
}

@keyframes pulseBadge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
    }
}

@keyframes glowEffect {
    0% {
        box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4), 0 0 15px rgba(255, 71, 87, 0.2);
    }
    100% {
        box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5), 0 0 20px rgba(255, 71, 87, 0.3);
    }
}

/* SIMPLIFIED LARGER CARD DESIGN */
.share-card {
    width: 100%;
    max-width: 320px;
    height: 350px;
    margin: 0 auto 24px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.05);
    background: var(--white-ivory);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.share-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(45, 184, 163, 0.3);
}

/* Hot deal card specific adjustments */
.hot-deal-card {
    border: 3px solid transparent;
    background: linear-gradient(var(--white-ivory), var(--white-ivory)) padding-box,
                linear-gradient(45deg, var(--teal-accent), var(--navy-blue-dark)) border-box;
    box-shadow: 0 10px 35px rgba(45, 184, 163, 0.25);
}

.hot-deal-card:hover {
    box-shadow: 0 20px 50px rgba(45, 184, 163, 0.35);
}

.hot-deal-card .hot-deal-badge {
    top: 8px;
    right: 8px;
    padding: 7px 14px;
    font-size: 0.75rem;
    max-width: 140px;
    min-width: 90px;
}

/* Ensure badge appears above header */
.share-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 2px solid rgba(45, 184, 163, 0.2);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* Hot deal header styling */
.hot-deal-header {
    background: linear-gradient(135deg, var(--teal-accent), var(--navy-blue-dark)) !important;
    color: var(--white-ivory) !important;
}

.header-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    object-fit: scale-down;
    border: 3px solid rgba(45, 184, 163, 0.3);
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--white-ivory), #f0f4f8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-logo.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--teal-accent), var(--navy-blue-dark));
    border-radius: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 3px solid var(--teal-accent);
}

/* Company name container */
.company-name-container {
    flex: 1;
}

.company-name {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy-blue-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.hot-deal-header .company-name,
.hot-deal-header .company-name a {
    color: var(--white-ivory) !important;
}

/* ENHANCED DETAILS SECTION - FLEX LAYOUT TO KEEP BUTTON VISIBLE */
.share-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;   /* Ensures button stays at bottom */
    min-height: 0;                     /* Allows shrinking in flex */
    font-size: 0.9rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    gap: 2px;
}

.detail-label {
    display: block;
    color: var(--grey);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-value {
    display: block;
    font-weight: 700;
    color: var(--navy-blue-dark);
    font-size: 0.85rem;
}

/* FIX: Truncate long brand names with ellipsis */
    .detail-value.brand-value {
        white-space: normal; /* allow wrapping */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1; /* keep it to 1 line */
        -webkit-box-orient: vertical;
        line-height: 1.3;
        max-height: 1.3em; /* matches line-height */
        word-break: normal; /* don't break mid-word */
        overflow-wrap: anywhere; /* soft wrap long words if needed */
    }

.price-highlight {
    color: var(--teal-accent) !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
}

.hot-deal-title {
    text-align: center;
    font-weight: 700;
    color: #ff6200;
    font-size: 1rem;
    margin: 12px 0;
    letter-spacing: 0.5px;
    padding: 8px;
    background: rgba(255, 98, 0, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ff6200;
}

/* BUTTON CONTAINER - STICK TO BOTTOM */
.btn-container {
    display: flex;
    gap: 12px;
    padding: 12px 16px 16px;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
    margin-top: auto;                 /* Pushes to bottom */
    background: rgba(0, 0, 0, 0.02);
}

.btn-invest {
    width: 100% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    padding: 7px 16px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    margin-top: auto !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-decoration:none;
}

.btn-invest:hover {
   background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
        color: white !important;
}

.btn-whatsapp {
    width: 35px;
    height: 35px;
    background: #25D366;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* COMPARISON TABLE STYLES */
.comparison-table {
    background: var(--white-ivory);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.table-header {
    background: linear-gradient(135deg, var(--teal-accent), var(--navy-blue-dark));
    color: var(--white-ivory);
    padding: 20px;
    font-weight: 600;
}

.comparison-table .table-header .row {
    color: var(--white-ivory);
    font-weight: 600;
    padding: 5px 0;
    border-radius: 10px 10px 0 0;
}

.table-row {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.table-row:hover {
    background: rgba(45, 184, 163, 0.05);
}

.comparison-table .table-row .row {
    background: var(--white-ivory);
    padding: 5px 0;
    border-bottom: 1px solid rgba(45, 184, 163, 0.2);
}

.comparison-table .table-row .row:last-child {
    border-bottom: none;
}

/* Pagination */
.pagination {
    margin-top: 10px;
}

.page-link {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    border: 1px solid #ddd;
    color: var(--navy-blue-dark);
    border-radius: 15px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.page-item.active .page-link {
    background: var(--teal-accent);
    color: var(--white-ivory);
    border-color: var(--teal-accent);
}

.page-link:hover {
    background: var(--teal-accent);
    color: var(--white-ivory);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .share-item {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 992px) {
    .share-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .share-card {
        max-width: 100%;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .share-card {
        margin-bottom: 24px;
        max-width: 100%;
        height: 420px;
    }
    .search-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .share-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .btn-show-all {
        width: 100%;
        text-align: center;
    }
    .share-card-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 12px;
    }
    .header-logo {
        width: 80px;
        height: 80px;
        align-self: center;
    }
    .company-name {
        font-size: 1.3rem;
        text-align: center;
    }
    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .btn-container {
        flex-direction: column;
        gap: 10px;
    }
    .btn-invest {
        padding: 14px 20px;
        font-size: 1rem;
    }
    .btn-whatsapp {
        width: 55px;
        height: 55px;
        align-self: center;
    }
    .hot-deal-badge {
        top: 6px;
        right: 6px;
        font-size: 0.65rem;
        padding: 5px 10px;
        max-width: 110px;
        min-width: 70px;
    }
    .hot-deal-card .hot-deal-badge {
        top: 6px;
        right: 6px;
        padding: 6px 12px;
        font-size: 0.7rem;
        max-width: 130px;
    }
    .comparison-table {
        margin-bottom: 20px;
        border-radius: 12px;
    }
    .table-header { padding: 15px; }
    .table-row { padding: 12px 15px; }
    .btn-invest i, .btn-whatsapp i {
        display: inline-block !important;
        font-size: 1rem !important;
        line-height: 1;
        margin-right: 1px;
        opacity: 1 !important;
    }
    .btn-invest {
        padding: 14px 20px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    .btn-whatsapp {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .btn-container {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        overflow: visible;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 2rem;
    }
    .share-card {
        height: 600px;
    }
    .share-card-header {
        padding: 16px;
    }
    .header-logo {
        width: 70px;
        height: 70px;
    }
    .company-name {
        font-size: 1.2rem;
    }
    .share-details {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    .hot-deal-badge {
        font-size: 0.6rem;
        padding: 4px 8px;
        max-width: 100px;
        min-width: 65px;
        top: 5px;
        right: 5px;
    }
    .btn-container {
        padding: 10px 8px;
    }
    .btn-invest {
        padding: 12px 18px;
    }
    .comparison-table {
        border-radius: 10px;
    }
    .table-header {
        padding: 12px;
        font-size: 0.95rem;
    }
    .table-row {
        padding: 10px 12px;
    }
}

/* Additional styles for other sections */
.info-card {
    background: linear-gradient(135deg, var(--navy-blue), var(--navy-blue-dark));
    color: var(--white-ivory);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}
    
.info-card:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.info-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--teal-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}