
@media (max-width: 370px) {
/* MAIN ITEM BOX */
.mainBox_left {
    display: none;
}
.main_itemBox {
    display: flex;
    width: 100%;
    margin: 20px auto;
    border-radius: 15px;
}

/* main working with right box */
.mainBox_right {
    width: 100%;
    padding: 15px;
}


.mainBox_right_top {
    display: flex;              /* horizontal row */
    overflow-x: auto;           /* allow horizontal scroll */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.mainBox_right_top::-webkit-scrollbar-thumb {
  background: #b30404;
  border-radius: 3px;
}


/*  PRODUCT CARD */
.item_card {
    flex: 0 0 auto;   /* let width property decide */
    width: 230px;     /* fixed width */
    scroll-snap-align: start;

}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/*    ITEM CARD IMAGE */
.item_card_img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
    padding: 6px;
    background: #fafafa;
}

.item_card_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* FIXED HEIGHT TEXT SECTIONS */
.item_card_name {
    padding: 5px;
    box-sizing: border-box;
    line-height: 1.4;
    height: 52px; /* ✅ enough for 2 lines without clipping */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* border: 1px solid green; */
    height: 50px;
}



.item_card_desc {
    padding: 5px;
    box-sizing: border-box;
    font-size: 14px;
    color: #555;
    line-height: 1.4em;
    height: 44px; /* ✅ slightly taller so descenders fit */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* border: 1px solid red; */
    font-size: 1rem;
    height: 50px;
}


.item_card_price {
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 40px; /* fixed height for price row */
    /* border: 1px solid brown; */
}


/* HREF STYLE */
.item_card_name a,
.item_card_img a {
    text-decoration: none;   /* remove underline */
    color: inherit;          /* inherit parent text color */
}

.item_card_name a:hover,
.item_card_img a:hover {
    text-decoration: none;   /* keep underline off on hover */
    color: inherit;          /* prevent default blue/purple */
}

.item_card_name a {
    text-decoration: none;   /* remove underline */
    color: inherit;          /* keep same text color */
    font-weight: 600;        /* make it slightly bold */
}

.item_card_name a:hover {
    text-decoration: none;   /* no underline on hover */
    color: inherit;          /* prevent default hover color */
}

/* ACTION ROW (always pinned at bottom) */
.item_card_action {
    margin-top: auto; /* push to bottom */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    border-top: 1px solid #bbbaba81;
    height: 115px; /* fixed height for action row */
}

.qty_input {
    width: 100%;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 0.95em;
    height: 25px;
}

.qty_available {
    font-size: 1em;
    color: #555;
    margin: 0 10px;
    height: 35px;
    padding: 4px;
}

.add-to-cart {
    background: linear-gradient(135deg, #c54f00, #d84602);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, #d60000, #f00000);
    transform: translateY(-2px);
}

.sold-out {
    height: 55px;
    align-content: center;
}

/*  PRICE STYLES  */
.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 0.9rem;
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:0.9rem;
    font-weight: bold;
}



/* Hide grid-based pagination arrows on mobile if you want */
.mainBox_right_bottom {
    display: none;
}



}

@media (min-width: 371px) and (max-width: 490px) {
/* MAIN ITEM BOX */
.mainBox_left {
    display: none;
}
.main_itemBox {
    display: flex;
    width: 100%;
    margin: 20px auto;
    border-radius: 15px;
}

/* main working with right box */
.mainBox_right {
    width: 100%;
    padding: 15px;
}


.mainBox_right_top {
    display: flex;              /* horizontal row */
    overflow-x: auto;           /* allow horizontal scroll */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.mainBox_right_top::-webkit-scrollbar-thumb {
  background: #b30404;
  border-radius: 3px;
}


/*  PRODUCT CARD */
.item_card {
    flex: 0 0 auto;   /* let width property decide */
    width: 230px;     /* fixed width */
    scroll-snap-align: start;

}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/*    ITEM CARD IMAGE */
.item_card_img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
    padding: 6px;
    background: #fafafa;
}

.item_card_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* FIXED HEIGHT TEXT SECTIONS */
.item_card_name {
    padding: 5px;
    box-sizing: border-box;
    line-height: 1.4;
    height: 52px; /* ✅ enough for 2 lines without clipping */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* border: 1px solid green; */
    height: 55px;
}



.item_card_desc {
    padding: 5px;
    box-sizing: border-box;
    font-size: 14px;
    color: #555;
    line-height: 1.4em;
    height: 44px; /* ✅ slightly taller so descenders fit */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* border: 1px solid red; */
    font-size: 1rem;
    height: 50px;
}


.item_card_price {
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 40px; /* fixed height for price row */
    /* border: 1px solid brown; */
}


/* HREF STYLE */
.item_card_name a,
.item_card_img a {
    text-decoration: none;   /* remove underline */
    color: inherit;          /* inherit parent text color */
}

.item_card_name a:hover,
.item_card_img a:hover {
    text-decoration: none;   /* keep underline off on hover */
    color: inherit;          /* prevent default blue/purple */
}

.item_card_name a {
    text-decoration: none;   /* remove underline */
    color: inherit;          /* keep same text color */
    font-weight: 600;        /* make it slightly bold */
}

.item_card_name a:hover {
    text-decoration: none;   /* no underline on hover */
    color: inherit;          /* prevent default hover color */
}

/* ACTION ROW (always pinned at bottom) */
.item_card_action {
    margin-top: auto; /* push to bottom */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    border-top: 1px solid #bbbaba81;
    height: 115px; /* fixed height for action row */
}

.qty_input {
    width: 100%;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 0.95em;
    height: 25px;
}

.qty_available {
    font-size: 1em;
    color: #555;
    margin: 0 10px;
    height: 35px;
    padding: 4px;
}

.add-to-cart {
    background: linear-gradient(135deg, #c54f00, #d84602);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, #d60000, #f00000);
    transform: translateY(-2px);
}

.sold-out {
    height: 55px;
    align-content: center;
}

/*  PRICE STYLES  */
.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 1rem;
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 0.9rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:1rem;
    font-weight: bold;
}



/* Hide grid-based pagination arrows on mobile if you want */
.mainBox_right_bottom {
    display: none;
}



}

@media (min-width: 491px) and (max-width: 800px) {
/* MAIN ITEM BOX */
.mainBox_left {
    display: none;
}
.main_itemBox {
    display: flex;
    width: 100%;
    margin: 20px auto;
    border-radius: 15px;
}

/* main working with right box */
.mainBox_right {
    width: 100%;
    padding: 15px;
}


.mainBox_right_top {
    display: flex;              /* horizontal row */
    overflow-x: auto;           /* allow horizontal scroll */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.mainBox_right_top::-webkit-scrollbar-thumb {
  background: #b30404;
  border-radius: 3px;
}


/*  PRODUCT CARD */
.item_card {
    flex: 0 0 auto;   /* let width property decide */
    width: 280px;     /* fixed width */
    scroll-snap-align: start;

}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/*    ITEM CARD IMAGE */
.item_card_img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
    padding: 6px;
    background: #fafafa;
}

.item_card_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* FIXED HEIGHT TEXT SECTIONS */
.item_card_name {
    padding: 5px;
    box-sizing: border-box;
    line-height: 1.4;
    height: 52px; /* ✅ enough for 2 lines without clipping */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* border: 1px solid green; */
    height: 60px;
    font-size: 1.2rem
}



.item_card_desc {
    padding: 5px;
    box-sizing: border-box;
    font-size: 14px;
    color: #555;
    line-height: 1.4em;
    height: 44px; /* ✅ slightly taller so descenders fit */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* border: 1px solid red; */
    font-size: 1.1rem;
    height: 55px;
}


.item_card_price {
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 40px; /* fixed height for price row */
    /* border: 1px solid brown; */
}


/* HREF STYLE */
.item_card_name a,
.item_card_img a {
    text-decoration: none;   /* remove underline */
    color: inherit;          /* inherit parent text color */
}

.item_card_name a:hover,
.item_card_img a:hover {
    text-decoration: none;   /* keep underline off on hover */
    color: inherit;          /* prevent default blue/purple */
}

.item_card_name a {
    text-decoration: none;   /* remove underline */
    color: inherit;          /* keep same text color */
    font-weight: 600;        /* make it slightly bold */
}

.item_card_name a:hover {
    text-decoration: none;   /* no underline on hover */
    color: inherit;          /* prevent default hover color */
}

/* ACTION ROW (always pinned at bottom) */
.item_card_action {
    margin-top: auto; /* push to bottom */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    border-top: 1px solid #bbbaba81;
    height: 115px; /* fixed height for action row */
}

.qty_input {
    width: 100%;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 0.95em;
    height: 25px;
}

.qty_available {
    font-size: 1em;
    color: #555;
    margin: 0 10px;
    height: 35px;
    padding: 4px;
}

.add-to-cart {
    background: linear-gradient(135deg, #c54f00, #d84602);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, #d60000, #f00000);
    transform: translateY(-2px);
}

.sold-out {
    height: 55px;
    align-content: center;
}

/*  PRICE STYLES  */
.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 1.1rem;
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 1rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:1.1rem;
    font-weight: bold;
}



/* Hide grid-based pagination arrows on mobile if you want */
.mainBox_right_bottom {
    display: none;
}



}

@media (min-width: 801px) and (max-width: 1045px)  {
.main_itemBox {
    display: flex;
    width: 90%;
    margin: 20px auto;
    border-radius: 0;
    border-top: 1px solid burlywood;
}

.mainBox_left {
    width: 23%;
    border-right: 1px solid #ddd;
    padding: 15px 0 15px 15px;
}

.mainBox_right {
    width: 77%;
    padding-left: 10px;
}

/* Product grid layout */
.mainBox_right_top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-items: center;
}

.item_card {
    width: 210px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px auto;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

}

@media (min-width: 1046px) and (max-width: 1124px)  {
.main_itemBox {
    display: flex;
    width: 85%;
    margin: 20px auto;
    border-radius: 0;
    border-top: 1px solid burlywood;
}

.mainBox_left {
    width: 25%;
    border-right: 1px solid #ddd;
    padding: 15px 0 15px 15px;
}

.mainBox_right {
    width: 75%;
    padding-left: 10px;
}

/* Product grid layout */
.mainBox_right_top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-items: center;
}

.item_card {
    width: 230px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px auto;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

}

@media (min-width: 1125px) and (max-width: 1205px)  {
.main_itemBox {
    display: flex;
    width: 85%;
    margin: 20px auto;
    border-radius: 0;
    border-top: 1px solid burlywood;
}

.mainBox_left {
    width: 25%;
    border-right: 1px solid #ddd;
    padding: 15px 0 15px 15px;
}

.mainBox_right {
    width: 75%;
    padding-left: 10px;
}

/* Product grid layout */
.mainBox_right_top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-items: center;
}

.item_card {
    width: 250px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px auto;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

}

@media (min-width: 1205px) and (max-width: 1367px) {
.main_itemBox {
    display: flex;
    width: 85%;
    margin: 20px auto;
    border-radius: 0;
    border-top: 1px solid burlywood;
}

.mainBox_left {
    width: 25%;
    border-right: 1px solid #ddd;
    padding: 15px 0 15px 15px;
}

.mainBox_right {
    width: 75%;
    padding-left: 10px;
}

/* Product grid layout */
.mainBox_right_top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-items: center;
}

.item_card {
    width: 250px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px auto;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

}

@media (min-width: 1368px) and (max-width: 1703px) {
.main_itemBox {
    display: flex;
    width: 90%;
    margin: 20px auto;
    border-radius: 0;
    border-top: 1px solid burlywood;
}

.mainBox_right {
    width: 80%;
    padding-left: 10px;
}

/* Product grid layout */
.mainBox_right_top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-items: center;
}

.item_card {
    width: 250px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px auto;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

}

@media (min-width: 1704px) {
.main_itemBox {
    display: flex;
    width: 90%;
    margin: 20px auto;
    border-radius: 0;
    border-top: 1px solid burlywood;
}

.mainBox_right {
    width: 80%;
    padding-left: 10px;
}

/* Product grid layout */
.mainBox_right_top {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    justify-items: center;
}

.item_card {
    width: 250px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px auto;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box; 

    display: flex;
    flex-direction: column;
}

.item_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

}