* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    border-radius: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #fff;
    color: #222;
    overflow-y: hidden;
}

.bounce-in-up {
    animation: bounceInUp 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.bounce-in-left {
    animation: bounceInLeft 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes bounceInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceInLeft {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .bounce-in-up,
    .bounce-in-left {
        animation: none;
    }
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.product-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    position: relative;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.gallery .main-img {
    border: 1px solid #f0f0f0;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.gallery .main-img img {
    width: 50%;
    pointer-events: none;
    object-fit: contain;
}

.gallery .thumbs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
}

.gallery .thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 10px;
    max-width: 75%;
}

.gallery .thumbs::-webkit-scrollbar {
    display: none;
}

.gallery .thumbs img {
    width: 75px;
    height: 75px;
    border: 1px solid #eee;
    object-fit: cover;
    cursor: pointer;
    flex-shrink: 0;
}

.gallery .thumbs img.active {
    border: 2px solid #000;
}

.gallery .nav-arrow {
    width: 30px;
    height: 30px;
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.details .sale-badge {
    background: #000;
    color: #fff;
    padding: 2px 8px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 10px;
}

.details .brand {
    font-size: 14px;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.details h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.details .price-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.details .price-area .price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 18px;
}

.details .price-area .price-new {
    font-size: 24px;
    font-weight: bold;
    color: #222;
}

.details .stock-status {
    display: inline-block;
    padding: 4px 12px;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 15px;
}

.details .stock-status.in-stock {
    background: #e6f7e6;
    color: #2e7d32;
}

.details .stock-status.out-of-stock {
    background: #fde8e8;
    color: #c62828;
}

.details .specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.details .specs-table td {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.details .specs-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 40%;
}

.details .total-price-display {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.details .total-price-display .label {
    font-size: 14px;
    color: #666;
}

.details .total-price-display .amount {
    font-size: 28px;
    font-weight: bold;
    color: #000;
}

.details .actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.details .actions .qty {
    display: flex;
    border: 1px solid #ddd;
    height: 44px;
}

.details .actions .qty button {
    background: transparent;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    color: #555;
    font-size: 18px;
}

.details .actions .qty input {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 16px;
    outline: none;
}

.details .actions .btn-add {
    flex: 1;
    background: #000;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.details .actions .btn-add:hover {
    background: #333;
}

.details .actions .btn-add:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.details .info-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    margin-top: 30px;
}

.details .info-row span {
    font-size: 13px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details .info-row span i {
    color: #555;
    width: 18px;
    text-align: center;
}

.recommendations {
    margin-top: 150px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.recommendations h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.rec-card {
    display: flex;
    flex-direction: column;
}

.rec-card .rec-image-wrap {
    position: relative;
    background: #f9f9f9;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.rec-card .rec-image-wrap img {
    max-height: 80%;
    max-width: 80%;
    object-fit: contain;
}

.rec-card .rec-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-card .rec-price {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-top: 4px;
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .details .actions {
        flex-wrap: wrap;
    }

    .details .actions .qty {
        width: 100%;
        justify-content: space-between;
    }

    .details .actions .btn-add {
        width: 100%;
    }

    .rec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.price-area .price-old {
    text-decoration: line-through;
    color: #94a3b8;
    margin-right: 12px;
    font-size: 1.2rem;
}

.price-area .price-new {
    font-weight: 700;
    font-size: 1.8rem;
    color: #dc3545;
}

.discount-badge {
    background: #dc3545;
    color: #fff;
    padding: 2px 14px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    margin-left: 12px;
}

.total-price-display .amount {
    font-weight: 700;
    font-size: 1.5rem;
    color: #dc3545;
}

.total-price-display .label {
    font-weight: 500;
}

.stock-status.low-stock {
    color: #dc3545;
    font-weight: 600;
    background: #fef2f2;
    padding: 4px 12px;
    display: inline-block;
}

.stock-status.in-stock {
    color: #16a34a;
    font-weight: 600;
    background: #f0fdf4;
    padding: 4px 12px;
    display: inline-block;
}

.stock-status.out-of-stock {
    color: #6b7280;
    font-weight: 600;
    background: #f3f4f6;
    padding: 4px 12px;
    display: inline-block;
}

#liveStockContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}

.live-stock-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    color: #166534;
    padding: 10px 16px;
    font-weight: 400;
    font-size: 0.95rem;
    border: 1px solid #bbf7d0;
}

.live-stock-badge i {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.live-stock-badge.urgent {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
    animation: pulse 1.5s ease-in-out infinite;
}

.cart-hold-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fffbeb;
    color: #92400e;
    padding: 10px 16px;
    font-weight: 400;
    font-size: 14px;
    border: 1px solid #fde68a;
}

.cart-hold-alert i {
    font-size: 1.05rem;
    flex-shrink: 0;
    color: #d97706;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}