/* Rise Store — Global Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Product image aspect ratio */
.product-img-wrap {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 3/4;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-media-viewer {
    touch-action: pan-y;
}

.gallery-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-thumb {
    flex: 0 0 auto;
    width: 4.5rem;
    min-width: 4.5rem;
    scroll-snap-align: start;
}

.gallery-thumb img,
.gallery-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

/* Hero gradient */
.hero-bg {
    background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 40%, #d6d3d1 100%);
}

/* Fade-in animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 0.6s ease forwards;
}

.fade-up-delay-1 {
    animation-delay: 0.1s;
    opacity: 0;
    animation-fill-mode: forwards;
    animation-name: fadeUp;
    animation-duration: 0.6s;
}

.fade-up-delay-2 {
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
    animation-name: fadeUp;
    animation-duration: 0.6s;
}

.fade-up-delay-3 {
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
    animation-name: fadeUp;
    animation-duration: 0.6s;
}

/* Quantity input */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.qty-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Toast notification */
#toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Admin sidebar active */
.admin-link.active {
    background: #f5f5f5;
    color: #171717;
    font-weight: 600;
}

/* Table hover */
.data-table tr:hover td {
    background: #fafafa;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 10;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-pending {
    background: #fef9c3;
    color: #854d0e;
}

.badge-processing {
    background: #dbeafe;
    color: #1e40af;
}

.badge-shipped {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-delivered {
    background: #dcfce7;
    color: #166534;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Star Rating System */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 24px;
    color: #e5e5e5;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input:checked~label {
    color: #fbbf24;
}

.star-fill {
    color: #fbbf24;
}

.star-empty {
    color: #e5e5e5;
}

/* Review Card */
.review-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: #e5e5e5;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.02);
}

/* --- Category Carousel (Scroll Snap) --- */
.cat-carousel-container {
    position: relative;
    width: 100%;
}

.cat-carousel-wrapper {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(25% - 18px); /* 4 items on desktop */
    gap: 24px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 10px 0 30px 0;
}

.cat-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.cat-item {
    scroll-snap-align: start;
}

/* Responsive Columns */
@media (max-width: 1024px) {
    .cat-carousel-wrapper {
        grid-auto-columns: calc(33.333% - 16px);
    }
}

@media (max-width: 768px) {
    .cat-carousel-wrapper {
        grid-auto-columns: calc(50% - 12px);
    }
}

@media (max-width: 480px) {
    .cat-carousel-wrapper {
        grid-auto-columns: 85%; /* Peek effect */
        gap: 16px;
    }
}

.cat-nav-btn {
    position: absolute;
    top: calc(50% - 20px);
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0;
}

.cat-carousel-container:hover .cat-nav-btn {
    opacity: 1;
}

.cat-nav-btn:hover {
    background: #171717;
    color: white;
    border-color: #171717;
}

.cat-nav-btn.prev { left: -22px; }
.cat-nav-btn.next { right: -22px; }

@media (max-width: 1024px) {
    .cat-nav-btn { display: none; }
}