/* Stylesheet for Warungio Buyer Home Page */

/* ── User Profile Dropdown ── */
.profile-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu-custom {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 59, 31, 0.08);
    width: 200px;
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

.dropdown-menu-custom.show {
    display: block;
}

.dropdown-menu-custom a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0,0,0,0.02);
    text-decoration: none;
}

.dropdown-menu-custom a:last-child {
    border-bottom: none;
    color: var(--danger);
}

.dropdown-menu-custom a:hover {
    background: var(--background);
    color: var(--primary-dark);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Best Deals Section ── */
.best-deals-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.deal-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    position: relative;
}

.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.08);
}

.deal-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
}

.deal-image-wrapper {
    height: 130px;
    background: #f8fafc;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.deal-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
}

.deal-store {
    font-size: 11px;
    color: var(--muted);
}

.deal-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
}

.deal-prices {
    display: flex;
    flex-direction: column;
}

.deal-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.deal-old-price {
    font-size: 11px;
    color: var(--muted);
    text-decoration: line-through;
}

.btn-add-deal {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-deal:hover {
    background: var(--primary-dark);
}

/* ── Newsletter Section ── */
.newsletter-section input[type="email"] {
    transition: border-color 0.2s;
}
.newsletter-section input[type="email"]:focus {
    border-color: var(--primary-light) !important;
}

/* ── Responsive adjustments ── */
@media (max-width: 1200px) {
    .best-deals-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .best-deals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .best-deals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .newsletter-section {
        padding: 24px 20px;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .best-deals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
