/* ===================================
   SIPZZ - COMPONENTS.CSS
   Reusable UI components (cards, buttons, forms, badges)
   =================================== */

/* ===================================
   BUTTONS
   =================================== */

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #005a9a;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--light-blue);
    color: #333;
}

.btn-secondary:hover {
    background-color: #8acfe7;
}

.btn-shopee {
    background-color: var(--shopee-orange);
    color: white;
    padding: 12px 30px;
}

.btn-tiktok {
    background-color: var(--tiktok-black);
    color: white;
    padding: 12px 30px;
}

/* ===================================
   PRODUCT CARDS
   =================================== */

.product-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card-image-wrapper {
    position: relative;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
}

.product-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.product-card-info {
    padding: 20px;
}

.product-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.product-card .price {
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-blue);
    margin: 0 0 15px 0;
}

.product-card .view-details {
    display: inline-block;
    background-color: var(--light-blue);
    color: #002855;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.product-card .view-details:hover {
    background-color: #8acfe7;
}

/* ===================================
   BADGES (Homepage product cards)
   =================================== */

.product-card .product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.product-card .badge {
    background-color: #8cd2f4;
    color: #002855;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
}

/* ===================================
   FORMS
   =================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-grey);
    border-radius: 5px;
    font-family: 'Montserrat', 'Arial', sans-serif;
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
}

/* ===================================
   STAR RATING
   =================================== */

.star-rating {
    color: var(--star-rating);
    font-size: 18px;
}

.star-rating i {
    margin-right: 2px;
}

/* ===================================
   STORE ICONS
   =================================== */

.store-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.store-icons a {
    display: block;
    transition: transform var(--transition-fast);
}

.store-icons a:hover {
    transform: scale(1.1);
}

.store-icons img {
    height: 50px;
    width: auto;
}

/* ===================================
   FEATURE GRID
   =================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item img {
    height: 50px;
    margin-bottom: 20px;
}

.feature-item h4 {
    font-size: 20px;
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #233658;
}

.feature-item p {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    color: #455a64;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.feature-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ===================================
   USP SECTION (Homepage)
   =================================== */

.usp-section {
    background-color: var(--bg-white);
    padding: 60px 0;
}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.usp-item {
    text-align: center;
}

.usp-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-blue);
    border-radius: 50%;
}

.usp-icon i {
    font-size: 36px;
    color: var(--brand-blue);
}

.usp-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.usp-description {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===================================
   PROMO BANNER
   =================================== */

.promo-banner {
    background-color: white;
    color: black;
    padding: 12px 0;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    overflow: hidden;
    border-bottom: 1px solid #e0e0e0;
}

/* Desktop only - keep consistent sizing */
@media (min-width: 901px) {
    .promo-banner {
        padding: 12px 0;
        font-size: 14px;
    }
}

.promo-slider {
    position: relative;
}

.promo-text {
    display: none;
    color: black;
    font-weight: 700;
}

.promo-text.active {
    display: block;
    color: black;
    animation: fadeIn 0.5s ease-in;
}

.promo-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.promo-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===================================
   POPUP MODAL (First-time visitor)
   =================================== */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.active {
    display: block;
}

.popup-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: popupSlideIn 0.4s ease;
}

.popup-modal.active {
    display: block;
}

.popup-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content a {
    display: block;
    cursor: pointer;
}

.popup-content img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    height: auto;
    width: auto;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.popup-content img:hover {
    transform: scale(1.02);
}

.popup-close {
    display: none; /* Hidden - users can only close by clicking overlay or pressing Escape */
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {

    .features-grid,
    .usp-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-card-image-wrapper {
        min-height: 200px;
    }

    .popup-modal {
        max-width: 95%;
        max-height: 80vh;
    }
}