/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   DESIGN SYSTEM
========================= */

:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --primary: #0E53B5;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.05);
}

body.dark {
    --bg: #0f172a;
    --card: #111827;
    --text: #f4f4f4;
    --muted: #94a3b8;
    --primary: #38bdf8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.5);
}

/* =========================
   BASE
========================= */

body {
    font-family: Arial;
    background: var(--bg);
    color: var(--text);
}

/* =========================
   PRODUCT PAGE
========================= */

.product-detail-page {
    width: 90%;
    margin: 40px auto;
    display: flex;
    gap: 50px;
}

/* LEFT SIDE */

.product-left {
    flex: 1;
    display: flex;
    gap: 20px;
}

.thumbs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.thumb {
    width: 90px;
    height: 90px;
    border: 2px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    background: var(--card);
}

.thumb.active {
    border-color: var(--primary);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image {
    flex: 1;
    background: var(--card);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px;
}

.main-image img {
    width: 100%;
    max-width: 450px;
    object-fit: contain;
}

.discount-circle {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 110px;
    height: 110px;
    background: #ff8515;
    border-radius: 50%;
    color: white;
    font-size: 32px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* RIGHT SIDE */

.product-right {
    width: 420px;
}

.product-right h1 {
    font-size: 36px;
    margin-bottom: 25px;
    line-height: 1.3;
    color: var(--text);
}

.product-status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

/* STOCK */

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border: 1px solid var(--primary);
    border-radius: 12px;
    color: var(--primary);
    font-weight: 600;
    background: var(--card);
}

.stock-badge.out-of-stock {
    border-color: #dc2626;
    color: #dc2626;
}

/* INSTALLMENT */

.installment-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border: 1px solid #eab308;
    border-radius: 12px;
    color: #ca8a04;
    background: #fef9c3;
    font-weight: 600;
}

/* PRICE */

.price-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 30px;
    align-items: flex-start;
}

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

.old-price.strikethrough {
    text-decoration: line-through;
}

.new-price {
    font-size: 42px;
    font-weight: bold;
    color: var(--primary);
}

/* ACTIONS */

.top-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
}

.top-actions button {
    width: 55px;
    height: 55px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    font-size: 22px;
    cursor: pointer;
    transition: 0.3s;
    color: var(--text);
}

.action-btn:hover {
    background: var(--primary);
    color: white !important;
}

@media (max-width: 768px) {
    .action-btn,
    .action-btn:hover,
    .action-btn:active,
    .action-btn:focus {
        background: white !important;
        color: inherit !important;
        border-color: var(--border) !important;
    }
}


/* INFO BOX */

.info-box {
    background: var(--card);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    gap: 15px;
    color: var(--text);
    line-height: 1.6;
    border: 1px solid var(--border);
}

/* =========================
   SIMILAR PRODUCTS
========================= */

.similar-products {
    margin-top: 60px;
    padding: 20px 0;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    position: relative;
}

.section-header h2::after {
    content: "";
    width: 60px;
    height: 3px;
    background: var(--primary);
    position: absolute;
    left: 0;
    bottom: -8px;
    border-radius: 5px;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* CARD */

.similar-card {
    display: block;
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: 0.25s ease;
}

.similar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px var(--shadow);
}

.similar-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--card);
}

.similar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.similar-card:hover .similar-image img {
    transform: scale(1.05);
}

.similar-content {
    padding: 12px 14px;
}

.similar-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.similar-price {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* More button and hidden similar items */
.hidden-similar { display: none; }

.similar-more { text-align: center; margin-top: 12px; }
.more-btn {
    background: transparent;
    border: none;
    color: var(--primary, #e30613);
    font-weight: 600;
    cursor: pointer;
}
.more-btn:active { transform: translateY(1px); }

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

@media (max-width: 1100px) {
    .product-detail-page {
        flex-direction: column;
    }

    .product-right {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .product-left {
        flex-direction: column;
    }

    .thumbs {
        flex-direction: row;
    }

    .product-right h1 {
        font-size: 28px;
    }

    .new-price {
        font-size: 34px;
    }

    .similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
}

@media (max-width: 480px) {

   
    .similar-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-page {
        width: 94%;
    }

    .main-image {
        padding: 20px;
    }

    .discount-circle {
        width: 80px;
        height: 80px;
        font-size: 24px;
    }
}



/* CountDown */


/* =========================
   COUNTDOWN
========================= */

.countdown-box {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    margin-bottom: 25px;

    background: linear-gradient(135deg, #0E53B5, #1d72f3);
    color: #fff;

    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;

    box-shadow: 0 10px 25px rgba(14, 83, 181, 0.25);
    animation: pulseGlow 2s infinite;
}

/* icon */
.countdown-box i {
    font-size: 18px;
}

/* animation */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 10px 25px rgba(14, 83, 181, 0.25);
    }

    50% {
        box-shadow: 0 12px 35px rgba(14, 83, 181, 0.45);
    }

    100% {
        box-shadow: 0 10px 25px rgba(14, 83, 181, 0.25);
    }
}

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

@media (max-width: 768px) {
    .countdown-box {
        font-size: 14px;
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .countdown-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}