
body {
    font-family: 'Inter', Arial, sans-serif;
    min-height: 100vh;
    padding: 0rem 1rem 2rem 1rem;
    background-color: #ffffff;
}
body:not(.modal-open):has(.container) {
    background-color: #f3f4f6;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 1rem;
}
body.modal-open {
    overflow: hidden;
}
.container {
    max-width: 900px;
    width: 100%;
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.container:has(.product-grid) {
    max-width: 1200px;
    margin: 0 auto;
}
.btn-back {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 9999px;
    background-color: #e5e7eb;
    color: #4b5563;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.btn-back:hover {
    background-color: #d1d5db;
}
.navbar {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 50;
    padding: 1rem
}
.search-container {
    flex-grow: 0;
    max-width: 300px;
    width: 100%;
    position: relative;
    width: 300px
}
.search-container input {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    outline: none;
    transition: border-color .3s
}
.search-container input:focus {
    border-color: #1F2937;
    box-shadow: 0 0 0 3px rgba(31, 41, 55, .1);
}
.search-results-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    margin-top: .5rem
}
.search-result-item {
    display: flex;
    align-items: center;
    padding: .75rem 1rem;
    cursor: pointer;
    transition: background-color .2s
}
.search-result-item:hover {
    background-color: #f3f4f6
}
.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 1rem
}
.search-result-item span {
    font-size: .95rem;
    color: #1f2937
}
.toast-notification {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(31, 41, 55, .9);
    color: white;
    padding: .75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    opacity: 0;
    transition: opacity .5s ease-in-out, transform .5s ease-in-out;
    z-index: 1000;
    pointer-events: none
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}
.toast-notification.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px)
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem;
    padding-top: 1rem
}
.container:has(.product-grid) .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    padding-top: 0;
}
.product-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1), 0 1px 1px -1px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}
.product-card:has(.product-actions) {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}
.product-card:has(.product-actions):hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.image-card-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden
}
.product-image-container {
    width: 100%;
    padding-top: 75%;
    position: relative;
    background-color: #e2e8f0;
}
.image-card-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-info {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 70px;
}
.product-info h3 {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1F2937;
    margin-bottom: .25rem;
    text-decoration: none;
    line-height: 1.3;
}
.product-category {
    display: none !important;
}
.product-info h3:hover {
    color: #4B5563
}
.product-price, .product-category:has(~ .product-price) {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}
.product-card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    padding-top: 0.25rem;
    margin-top: auto;
}
.product-card .text-red-600,
.carousel-card .text-red-600 {
    color: #E31B54 !important;
    font-weight: 700;
    font-size: 1rem !important;
    margin: 0 !important;
    align-self: flex-end;
    line-height: 1.2;
}
.product-card .text-xs,
.carousel-card .text-xs {
    font-size: 0.7rem !important;
    color: #9ca3af !important;
    margin: 0 !important;
    align-self: flex-end;
}
.carousel-container {
    width: 100%;
    display: flex;
    justify-content: center;
    perspective: 1000px;
    margin-bottom: 2rem;
    height: 300px;
    position: relative;
    align-items: center
}
.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 100%;
    transform-style: preserve-3d
}
.carousel-card {
    position: absolute;
    width: 250px;
    height: 250px;
    top: 0;
    left: 50%;
    transform-origin: center;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
    transition: transform .6s cubic-bezier(.25, .46, .45, .94), opacity .6s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none
}
.carousel-card .image-card-container {
    height: 75%;
    padding-top: 0 !important;
}
.carousel-card .product-info {
    height: 25%;
    padding: 0.4rem 0.5rem;
    justify-content: space-between;
}
.carousel-card .product-info h3 {
    font-size: .85rem;
    margin-bottom: 0.25rem;
}
.carousel-card.active {
    transform: translateX(-50%) scale(1) translateZ(50px);
    opacity: 1;
    z-index: 3
}
.carousel-card.next {
    transform: translateX(20%) scale(.85) translateZ(-20px);
    opacity: .9;
    z-index: 2
}
.carousel-card.prev {
    transform: translateX(-120%) scale(.85) translateZ(-20px);
    opacity: .9;
    z-index: 2
}
.carousel-card.far-next {
    transform: translateX(10%) scale(.7) translateZ(-100px);
    opacity: .7;
    z-index: 1
}
.carousel-card.far-prev {
    transform: translateX(-110%) scale(.7) translateZ(-100px);
    opacity: .7;
    z-index: 1
}
.carousel-card .image-card-container img {
    object-fit: contain;
}
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, .9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    cursor: pointer;
    z-index: 4;
    transition: background-color .3s ease, transform .3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.carousel-button:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1)
}
.carousel-button:focus {
    outline: none
}
.carousel-button.prev {
    left: 0px;
}
.carousel-button.next {
    right: 0px;
}
.carousel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}
.category-image-grid {
    display: inline-flex;
    max-width: 100%;
    overflow-x: auto;
    gap: 0;
    padding: 0;
    margin-top: 0.2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
}
.category-image-grid::-webkit-scrollbar {
    display: none
}
.category-item {
    flex-shrink: 0;
    width: 80px;
    height: 110px;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .2s ease;
    opacity: 1;
    border-right: 1px solid #d1d5db;
    position: relative;
}
.category-item:last-child {
    border-right: none;
}
.category-item:hover {
    opacity: 1;
    background-color: #f3f4f6;
    transform: none;
}
.category-item.active {
    box-shadow: inset 0 -3px 0 0 #1F2937;
}
.category-item.active .image-card-container {
    box-shadow: none;
}
.category-item .image-card-container {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: visible;
    margin: 0.2rem auto 0;
    box-shadow: none;
    transition: none;
}
.category-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.category-item p {
    font-size: .75rem;
    font-weight: 600;
    color: #1f2937;
    padding: .2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.category-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}
.category-list-item:last-child {
    border-bottom: none;
}
.category-image-preview {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}
.product-detail-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.product-image-container-detail {
    position: relative;
    padding-top: 66.66%;
    background-color: #ffffff;
}
.product-image-detail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-image-block {
    padding: 1rem;
    cursor: pointer;
}
.product-info-detail {
    padding: 1rem;
    padding-top: 0;
}
.product-description-detail {
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 2rem;
    margin-top: 0;
}
.product-specs {
    border-top: 1px solid #e5e7eb;
    margin-top: 0;
    padding: 1.5rem 1rem;
}
.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}
.spec-label {
    font-weight: 600;
    color: #4b5563;
}
.spec-value {
    color: #1f2937;
    font-weight: 500;
    text-align: right;
}
.related-product-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}
.related-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.related-product-image-container {
    position: relative;
    padding-top: 100%;
    background-color: #f7f8fa;
}
.related-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}
.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.btn-action {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.btn-edit {
    background-color: #3b82f6;
    color: #ffffff;
}
.btn-edit:hover {
    background-color: #2563eb;
}
.btn-delete {
    background-color: #ef4444;
    color: #ffffff;
}
.btn-delete:hover {
    background-color: #dc2626;
}
.btn-add-product {
    background-color: #4f46e5;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease;
}
.btn-add-product:hover {
    background-color: #4338ca;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
}
.modal-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}
.modal-form label {
    display: block;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.5rem;
}
.modal-form input,
.modal-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}
.modal-form input:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}
.btn-primary {
    background-color: #10b981;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}
.btn-primary:hover {
    background-color: #059669;
}
.btn-cancel {
    background-color: #9ca3af;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}
.btn-cancel:hover {
    background-color: #6b7280;
}
#productSelectionModal .product-grid {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 15px;
}
.modal-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content:has(.modal-image) {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    margin: auto;
    display: block;
    width: 90%;
    max-width: 900px;
    position: relative;
}
.modal-image {
    width: 100%;
    height: auto;
    max-height: 90vh;
    display: block;
    object-fit: contain;
}
.modal-close {
    position: absolute;
    top: -30px;
    right: 0px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;
    z-index: 1001;
}
.modal-close:hover,
.modal-close:focus {
    color: #ccc;
    text-decoration: none;
    cursor: pointer;
}
.hidden {
    display: none !important;
}
.flash-sale-card {
    position: relative;
}
.flash-sale-card .sale-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    z-index: 10;
}
.flash-sale-badge-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem 0 0.375rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 20;
    opacity: 0.95;
    text-transform: uppercase;
}
.flash-sale-badge-overlay {
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: #E31B54;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 20;
    opacity: 1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    line-height: 1;
}
.product-card.flash-sale-card {
    border: 4px solid #f87171;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2), 0 4px 6px -4px rgba(239, 68, 68, 0.1);
}
.product-card.flash-sale-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 20px -3px rgba(239, 68, 68, 0.4), 0 6px 8px -4px rgba(239, 68, 68, 0.2);
}
.flash-sale-card .sale-timer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(153, 27, 27, 0.9);
    color: white;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.25rem 0;
    font-weight: 500;
    z-index: 10;
    transition: background-color 0.3s ease;
}
.flash-sale-card .sale-timer.bg-gray-500\/80 {
    background-color: rgba(107, 114, 128, 0.8);
}
.flash-sale-card .sale-timer .fa-clock {
    margin-right: 0.25rem;
}
.flash-sale-slider-wrapper {
    position: relative;
}
#flashSaleViewport {
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
#flashSaleTrack {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: fit-content;
    gap: 1rem;
    transform: translateX(0);
}
#flashSaleTrack .product-card {
    flex-shrink: 0;
    width: calc((100% / 4) - 0.75rem);
    margin: 0;
}
.flash-sale-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ef4444;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 30;
    color: #ef4444;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.flash-sale-nav-button:hover {
    opacity: 1;
    background: #fee2e2;
}
.flash-sale-nav-button.prev {
    left: -20px;
}
.flash-sale-nav-button.next {
    right: -20px;
}
@media (max-width: 640px) {

    .search-container {
        max-width: 50% !important; 
        flex-grow: 1;
    }
    
    .navbar {
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem !important;
        padding: 0.5rem 0.5rem;
    }
 .navbar a.text-xl {
        font-size: 1rem !important;
        line-height: 1; /* ลดขนาดชื่อเว็บไซต์ */
    }
    .carousel-container {
        height: 50vw
    }
    .carousel-wrapper {
        max-width: 500px
    }
    .carousel-card {
        width: 50vw;
        height: 50vw
    }
    .carousel-card.active {
        transform: translateX(-50%) scale(1) translateZ(30px)
    }
    .carousel-card.next {
        transform: translateX(10%) scale(.85) translateZ(-10px)
    }
    .carousel-card.prev {
        transform: translateX(-110%) scale(.85) translateZ(-10px)
    }
    .carousel-card.far-next,
    .carousel-card.far-prev {
        opacity: 0;
        pointer-events: none
    }
    .carousel-button {
        width: 36px;
        height: 36px;
        padding: 0;
    }
    .carousel-button.prev {
        left: 0rem
    }
    .carousel-button.next {
        right: 0rem
    }
    .category-item {
        width: 80px;
        height: 110px;
    }
    .category-item .image-card-container {
        width: 70px;
        height: 70px;
        margin: 0.2rem auto 0;
    }
    .category-item p {
        font-size: .75rem;
    }
    #flashSaleViewport {
         grid-template-columns: repeat(2, 1fr);
     }
     #flashSaleTrack .product-card {
         width: calc(50% - 0.5rem);
     }
}
@media (min-width: 480px) and (max-width: 639px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    #flashSaleViewport {
       grid-template-columns: repeat(3, 1fr);
    }
    #flashSaleTrack .product-card {
       width: calc(33.333% - 0.66rem);
    }
}
@media (min-width: 768px) {
    .product-detail-card {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .product-image-block,
    .product-specs {
        flex: 0 0 40%;
        border-right: 1px solid #e5e7eb;
    }
    .product-image-block {
        order: 1;
        padding: 2rem;
        padding-bottom: 0;
    }
    .product-specs {
        order: 3;
        padding: 0 2rem 2rem 2rem;
        border-top: none;
        margin-top: 0;
    }
    .product-info-detail {
        flex: 0 0 60%;
        order: 2;
        padding: 2rem;
    }
    .product-image-container-detail {
        padding-top: 0 !important;
        height: 400px;
        min-height: auto;
    }
    #productSelectionModal .modal-content {
        max-width: 500px;
        padding: 2rem;
    }
}
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1rem;
    }
    #flashSaleViewport {
        grid-template-columns: repeat(4, 1fr);
    }
    #flashSaleTrack .product-card {
        width: calc(25% - 0.75rem);
    }
}
@media (max-width: 768px) {
    #productSelectionModal .modal-content {
        max-width: 95%;
        padding: 1rem;
    }
    #productSelectionModal .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
.sale-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    z-index: 10;
}
.flash-sale-badge-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem 0 0.375rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 20;
    opacity: 0.95;
    text-transform: uppercase;
}
.product-card.flash-sale-card {
    border: 4px solid #f87171;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2), 0 4px 6px -4px rgba(239, 68, 68, 0.1);
}
.product-card.flash-sale-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 20px -3px rgba(239, 68, 68, 0.4), 0 6px 8px -4px rgba(239, 68, 68, 0.2);
}
.flash-sale-slider-wrapper {
    position: relative;
}
#flashSaleViewport {
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
#flashSaleTrack {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: fit-content;
    gap: 1rem;
    transform: translateX(0);
}
#flashSaleTrack .product-card {
    flex-shrink: 0;
    width: calc((100% / 4) - 0.75rem);
    margin: 0;
}
.flash-sale-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ef4444;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 30;
    color: #ef4444;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.flash-sale-nav-button:hover {
    opacity: 1;
    background: #fee2e2;
}
.flash-sale-nav-button.prev {
    left: -20px;
}
.flash-sale-nav-button.next {
    right: -20px;
}
@media (min-width: 1024px) {
    #flashSaleViewport {
        grid-template-columns: repeat(4, 1fr);
    }
    #flashSaleTrack .product-card {
        width: calc(25% - 0.75rem);
    }
}
@media (max-width: 1023px) and (min-width: 640px) {
    #flashSaleViewport {
        grid-template-columns: repeat(3, 1fr);
    }
    #flashSaleTrack .product-card {
        width: calc(33.333% - 0.66rem);
    }
}
@media (max-width: 639px) {
    #flashSaleViewport {
        grid-template-columns: repeat(2, 1fr);
    }
    #flashSaleTrack .product-card {
        width: calc(50% - 0.5rem);
    }
}
.product-card .text-sm.text-gray-500 {
    display: none !important;
}