@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&family=Noto+Serif+Kannada:wght@100..900&family=Poppins:wght@300;400;500;700;800&display=swap');

:root{
    --main-color: #313186;
    --second-color: #C11C43;
    --light-red: #C11C4359;
    --light-pink: #FFC2D0;
    --text-color: #000;
    --white-color: #fff;
    --body-color: #fff6f6;
}

*{
    font-family: "Jost", sans-serif;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--body-color); 
    scroll-behavior: smooth;
    font-family: "Jost", sans-serif;
}

.btn {
    position: relative;
}

.loading {
  pointer-events: none;
  opacity: 0.7;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 4px solid #afafe6;
  border-top: 4px solid #000080;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 0%;
  left: 30%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.product-card, .brand-filter {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.product-card.show, .brand-filter.show {
    opacity: 1;
    transform: translateY(0);
}

.cctv-section{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-name{
    width: 100%;
    height: 50px;
    overflow: hidden;
    margin-top: 10px;
}

.product-name p{
    margin: 0;
    padding: 0;
}

.brand-filter{
    width: 12%;
    margin-top: 140px;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--main-color);
    padding: 15px;
}

.brand-filter label{
    font-weight: 600;
}

.brand-filter select{
    cursor: pointer;
    background-color: var(--main-color);
    color: var(--white-color);
    padding: 5px 15px;
    border: none;
}

option {
    background-color: #f0f0f0; 
    color: #000; 
    padding: 10px;
}

.brands{
    text-align: center;
}

.brands p{
    color: #4a4a66;
}

.brand-title{
    font-weight: 600;
}

.line{
    height: 2px;
    background-color: #000;
}

.product-container{
    width: 80%;
    margin: 20px auto;
    padding-right: 15px ;
}

.product-container h4{
    text-align: center;
    width: 165px;
    padding: 10px;
    font-weight: 500;
    border: 1px solid var(--second-color);
    margin: 0 auto;
    color: var(--second-color);
}

.product-container h3{
    font-weight: 600;
    font-size: 2rem;
    text-align: center;
}

.product-img img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.product-items{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-img{
    width: 100%;
    height: 150px;
    background-color: rgba(215, 220, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px;
}

.product-card{
    padding: 10px;
    display: block;
    margin-bottom: 40px;
}

.cart-button{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card .ratings{
    color: goldenrod;
    font-size: 0.8rem;
}

.product-price{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qty input{
    width: auto;
    padding: 8px;
    border: none;
    background-color: rgba(215, 220, 255, 0.4);
    border: 1px solid var(--main-color);
}

.qtyminus,.qtyplus{
    background-color: var(--main-color);
    color: var(--white-color);
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.cart-button a{
    border: 1px solid var(--main-color);
    padding: 5px 10px;
    background-color: transparent;
    color: var(--main-color);
    transition: all 0.3s ease-in-out;
}

.cart-button a:hover{
    background-color: var(--main-color);
    color: var(--white-color);
}

.btn{
    border: 1px solid var(--main-color);
    padding: 5px 10px;
    color: var(--main-color);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.off{
    color: green;
    font-weight: 600;
    font-size: 0.8rem;
}

.strike-cost{
    gap: 10px;
}

@media (max-width: 1200px) {
    .product-container {
        width: 90%;
        margin: 0 auto;
    }
    .product-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px){
    .product-items{
        grid-template-columns: repeat(2, 1fr);
    }
    .product-container{
        width: 90%;
    }
    .cart-button a {
        font-size: 0.8rem;
    }
    .product-name{
        font-size: 0.8rem;
    }
    .cart-button{
        gap: 20px;
    }
    .cart-button a {
        width: 100%;
        font-size: 1rem;
        text-align: center;
        padding: 10px;
    }
}

@media (max-width: 500px) {
    .product-items {
        grid-template-columns: repeat(1, 1fr);
    }
    .product-img {
        width: unset;
    }
    .product-container {
        width: 90%;
    }
}