.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 20px;
}

.product-images {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: sticky;
    height: fit-content;
    top: 0;
    bottom: 0;
}

.main-image {
    height: auto;
    width: 77%;
    box-shadow: var(--shadow-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    position: relative;
}

.main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-thumbnails {
    width: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.thumbnail {
    height: 120px;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail.active {
    border-color: var(--black);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease-in-out;
}

.thumbnail:hover img {
    transform: scale(1.1);
}

.product-information {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: clamp(28px, 3.2vw, 30px);
    margin-bottom: 10px;
    color: var(--black);
}

.rating-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.stars-con {
    display: flex;
    gap: 5px;
}

.stars-con .star svg {
    width: 16px;
    height: 16px;
    color: var(--black);
}

.review-link {
    color: var(--text);
    font-size: 18px;
}

.review-link:hover {
    color: var(--black);
    text-decoration: underline;
}

.price {
    font-weight: bold;
    color: var(--black);
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--line);
}

.old-price {
    text-decoration: line-through;
    color: var(--dark-brown);
    margin-left: 10px;
}

.discount-price {
    font-size: 25px;
}

.discount {
    background-color: var(--discount-bg);
    color: var(--discount-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 10px;
}

.about-product {
    margin: 20px 0;
    color: var(--black);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.about-product .availability {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}


.stock-status {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--discount-color);
}

.stock-status svg {
    margin-right: 5px;
}

.stock-status.sold-out svg {
    fill: var(--color-danger);
}

.about-product .product-tags {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 10px;
    flex-wrap: wrap;
}

.about-product .product-tags .tags {
    display: inline-flex;
    gap: 10px;
}

.about-product .product-tags .tag {
    display: inline-block;
    padding: 10px;
    border-radius: 5px;
    text-transform: capitalize;
    background-color: var(--bg);
    color: var(--black);
}

.quantity-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--black);
    border-radius: 20px;
    overflow: hidden;
    width: 25%;
    height: 40px;
}

.quantity-item {
    width: 30px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    display: inline-block;
    height: 100%;
    color: var(--black);
    background-color: transparent;
}

.quantity-input {
    width: 40px;
    height: 40px;
    font-family: Sora;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    pointer-events: none;
}

/* Remove number input arrows for Chrome, Safari, Edge */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove number input arrows for Firefox */
.quantity-input[type=number] {
    -moz-appearance: textfield;
}

.add-to-cart-btn,
.buy-now-btn {
    display: block;
    width: 50%;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    height: 50px;
    border: 1px solid transparent;
    background-color: var(--black);
    color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    transition: .4s ease;
    font-weight: 600;
}


.action-buttons {
    display: flex;
    margin: 20px 0;
}

.buy-now-btn {
    height: 50px;
    border: none;
    width: 100%;
    background-color: var(--black);
    color: var(--white);
}

.buy-now-btn:hover {
    background-color: var(--black);
}

.add-to-cart-btn:hover {
    background-color: var(--primary);
}

.wishlist-toggle-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    cursor: pointer;
    padding: 10px;
    background-color: var(--white);
    box-shadow: var(--shadow-secondary);
    transition: transform 0.2s ease;
    z-index: 2;
    transform: scale(1.1);
}

.wishlist-toggle-btn:hover {
    background-color: var(--black);
    color: var(--white);
}

.delivery-info {
    background-color: var(--bg-2);
    border-radius: 10px;
    padding: 10px;
}

.delivery-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.delivery-item svg {
    color: var(--black);
    flex-shrink: 0;
}

.delivery-item:last-child {
    margin-bottom: 0;
}

.checkout-guarantee {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.checkout-guarantee .checkout-guarantee-imgs {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;

}

.checkout-guarantee .checkout-guarantee-imgs img {
    display: inline-block;
    width: 50px;
}

/* tabs */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}

.tab-item {
    padding: 12px 25px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.tab-item.active {
    color: var(--black);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--black);
}


.tab-content {
    padding: 20px 0;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.specifications .spec-row {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 15px;
}

.specifications .spec-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.specifications .spec-label {
    flex: 0 0 150px;
    font-weight: 600;
    font-size: 17px;
}

.specifications .spec-value {
    flex: 1;
}

.specifications .spec-list {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.specifications .spec-list li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 8px;
}

.specifications .spec-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--black);
    border-radius: 50%;
}

.specifications .color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid var(--line);
}

.specifications .color-blue {
    background-color: #3498db;
}

.specifications .color-red {
    background-color: #e74c3c;
}

.specifications .color-green {
    background-color: #2ecc71;
}

.specifications .color-gray {
    background-color: #95a5a6;
}

.specifications .color-black {
    background-color: #2c3e50;
}

.specifications .color-option {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 5px;
}

.specifications .warranty-badge {
    display: inline-block;
    background-color: var(--discount-bg);
    color: var(--discount-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.specifications .origin-flag {
    display: inline-flex;
    align-items: center;
}

.specifications .flag-icon {
    margin-right: 8px;
}

.reviews-content {
    padding: 30px 20px;
    text-align: center;
}

.rating-summary {
    margin-bottom: 25px;
}

.rating-number {
    font-weight: 700;
    color: var(--discount-color);
    margin-bottom: 10px;
}

.stars {
    color: var(--black);
    letter-spacing: 5px;
    margin-bottom: 10px;
}

.rating-count {
    color: var(--black);
    margin-bottom: 20px;
}

.rating-breakdown {
    max-width: 350px;
    padding: 10px 0;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-label {
    display: flex;
    align-items: center;
    width: 80px;
}

.rating-label .label-stars {
    color: var(--black);
    margin-left: 5px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--black);
}

.rating-percent {
    width: 40px;
    text-align: right;
    margin-left: 10px;
}

.review-prompt {
    background-color: var(--bg);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.prompt-text {
    margin-bottom: 15px;
    color: var(--black);
}

.review-btn {
    background-color: var(--black);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.review-btn:hover {
    background-color: var(--primary);
}

/* Review modal styles */
.modal-body #reviewForm {
    .form-group {
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
    }

    .form-group label {
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.5rem;
        border: 1px solid var(--line);
        border-radius: 4px;
        font-size: 1rem;
    }

    .modal .review-btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Responsive styles */
@media (max-width: 900px) {

    .product-images {
        flex-direction: column-reverse;
        position: static;
    }

    .product-main {
        grid-template-columns: 1fr;
    }

    .main-image {
        margin-bottom: 20px;
        width: 100%;
    }

    .image-thumbnails {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .thumbnail {
        width: 100px;
        height: 100px;
    }

    .quantity-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .quantity-selector {
        width: 50%;
    }

    .add-to-cart-btn {
        width: 100%;
    }

    .tab-navigation {
        overflow-x: scroll;
        gap: 15px;
        overflow: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tab-navigation::-webkit-scrollbar {
        display: none;
    }

    .tab-item {
        padding: 12px 10px;
    }
}

@media (max-width: 400px) {
    .about-product .product-tags .tag {
        font-size: 12px;
    }
}