:root {
    --primary-color: var(--teal-primary, #0d9488);
    --secondary-color: var(--teal-secondary, #14b8a6);
    --accent-color: var(--teal-secondary, #14b8a6);
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: var(--teal-bg, #f8f9fa);
    --dark-bg: #1f2937;
    --text-dark: #1f2937;
    --text-light: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.product-details {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.product-details-page {
    min-height: calc(100vh - 80px);
    background:
        linear-gradient(180deg, #f1f5f9 0%, #f8fafc 52%, #eef7f5 100%);
    border-top: 1px solid #e2e8f0;
}

.product-details-page .product-gallery,
.product-details-page .product-info {
    background: #ffffff;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08) !important;
}

.product-details-page .product-tabs {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    padding: 0 1rem;
}

/* Shop Menu Icon */
.shop-menu-icon {
    position: static;
    z-index: 2;
    margin-bottom: 0;
}

.show-dot-btn {
    position: relative;
}

.show-dot-btn .btn-dot-spinner {
    display: none;
    align-items: center;
    gap: 3px;
    margin-right: 6px;
}

.show-dot-btn .btn-dot-spinner span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    animation: showDotPulse 0.9s infinite ease-in-out;
}

.show-dot-btn .btn-dot-spinner span:nth-child(2) { animation-delay: 0.15s; }
.show-dot-btn .btn-dot-spinner span:nth-child(3) { animation-delay: 0.3s; }

.show-dot-btn.loading {
    pointer-events: none;
}

.show-dot-btn.loading .btn-dot-spinner {
    display: inline-flex;
}

.show-page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(1px);
}

.show-page-loading-overlay.active {
    display: flex;
}

.show-page-loading-spinner {
    width: 2.25rem;
    height: 2.25rem;
    border: 3px solid color-mix(in srgb, var(--primary-color) 24%, transparent);
    border-top-color: var(--primary-color);
    border-radius: 999px;
    animation: spin 0.75s linear infinite;
}

.show-image-loading {
    position: relative;
    background: color-mix(in srgb, var(--light-bg) 86%, #ffffff);
}

.show-image-loading::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 1.35rem;
    height: 1.35rem;
    margin: -0.675rem 0 0 -0.675rem;
    border: 2px solid color-mix(in srgb, var(--primary-color) 28%, transparent);
    border-top-color: var(--primary-color);
    border-radius: 999px;
    animation: spin 0.75s linear infinite;
    z-index: 3;
    pointer-events: none;
}

.show-image-loading img {
    opacity: 1;
}

.show-image-loaded {
    background: var(--light-bg);
}

.show-image-loaded::after {
    display: none;
}

.show-image-loaded img {
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

@keyframes showDotPulse {
    0%, 80%, 100% {
        transform: scale(0.75);
        opacity: 0.25;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 30px;
}

.gallery-main-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gallery-top-row {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.gallery-sidebar {
    width: 120px;
    flex-shrink: 0;
    height: 100%;
    align-self: stretch;
}

.gallery-thumbs-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    padding-right: 4px;
    flex-shrink: 0;
}

.gallery-thumbs-vertical::-webkit-scrollbar {
    width: 4px;
}

.gallery-thumbs-vertical::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbs-vertical::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 2px;
}

.thumb-image {
    flex: 0 0 70px;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* WRAPPER YA CHINI – ONDOA WHITE SPACE */
.horizontal-thumbs-container {
    display: none;
    margin-top: 4px;
    /* distance ndogo sana kutoka main image */
    padding: 0;
    line-height: 0;
    /* izuie extra height ya line box */
}

.gallery-thumbs-horizontal {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    margin: 0;
    height: 70px;
    /* kimo cha strip ya thumbnails + scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.gallery-thumbs-horizontal::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbs-horizontal::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbs-horizontal::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 2px;
}

.thumb-image.active,
.thumb-image:hover,
.thumb-image-horizontal.active,
.thumb-image-horizontal:hover {
    border-color: var(--primary-color);
}

.mobile-gallery-dots {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0 2px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    background: #cbd5e1;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.gallery-dot.active {
    width: 18px;
    border-radius: 999px;
    background: var(--primary-color);
}

.thumb-image-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.thumb-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.thumb-image-horizontal {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    border-radius: 15px;
    overflow: hidden;
    background: var(--light-bg);
    width: 100%;
    height: 330px;
    box-shadow: var(--shadow-lg);
    margin-top: 0;
    position: relative;
    touch-action: pan-y;
    /* hakuna nafasi kati ya sidebar na image */
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
    will-change: transform, opacity;
}

.main-image img.is-zoom-in {
    animation: galleryImageZoomInOnly 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.main-image img.is-zoom-out {
    animation: galleryImageZoomOutOnly 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes galleryImageZoomInOnly {
    0% {
        transform: scale(0.9);
        opacity: 0.82;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes galleryImageZoomOutOnly {
    0% {
        transform: scale(1.1);
        opacity: 0.82;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
    z-index: 3;
    transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.gallery-nav-btn i {
    font-size: 1rem;
    font-weight: 700;
}

.gallery-nav-prev {
    left: 10px;
}

.gallery-nav-next {
    right: 10px;
}

.gallery-nav-btn:hover {
    transform: translateY(-50%) scale(1.06);
    background: #ffffff;
}

.gallery-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.product-info {
    margin-bottom: 40px;
}

.product-title-price-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.product-main-title {
    font-size: clamp(1.45rem, 3vw, 2.15rem);
    font-weight: 650;
    color: var(--primary-color);
    margin-bottom: 0;
    letter-spacing: 0.01em;
    min-width: 0;
}

.product-main-title .badge {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.38rem 0.55rem;
    border-radius: 0.5rem;
    vertical-align: middle;
}

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

.stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 18px;
    color: #fbbf24;
}

.rating-text {
    color: #6b7280;
    font-size: 14px;
}

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

.current-price {
    font-size: clamp(1.25rem, 2.65vw, 1.9rem);
    font-weight: 650;
    color: var(--text-dark);
    letter-spacing: 0.005em;
}

.product-title-price {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
    line-height: 1.15;
}

.old-price {
    font-size: clamp(1rem, 2.2vw, 1.5rem);
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}

.discount-badge {
    background: var(--danger-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.product-offers {
    display: grid;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
}

.product-offers-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 11px 13px 4px;
    border-bottom: 0;
    color: #166534;
    font-size: 0.92rem;
    font-weight: 600;
}

.product-offers-title i {
    color: #16a34a;
    font-size: 1rem;
}

.product-offer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 8px 8px;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
    color: #166534;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.35;
}

.product-offer-item i {
    color: #16a34a;
    font-size: 1rem;
    flex: 0 0 auto;
}

.product-offers-list {
    display: grid;
    width: 100%;
    max-width: 100%;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    background: linear-gradient(180deg, #f7fff9 0%, #f0fdf4 100%);
    box-shadow: 0 8px 18px rgba(22, 101, 52, 0.07);
    overflow: hidden;
}

.stock-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 400;
    margin-bottom: 0;
}

.stock-qty-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
}

.product-discount-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 22px;
    border: 1px solid #ef4444;
    border-radius: 10px;
    background: #dc2626;
    color: #fff;
    line-height: 1;
}

.product-discount-label {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 400;
}

.product-discount-box strong {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}

.stock-in {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.stock-low {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning-color);
}

.stock-out {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.action-buttons {
    margin-bottom: 20px;
}

.btn-add-cart,
.btn-order-now,
.btn-wishlist {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-buttons .btn-wishlist,
.action-buttons .btn-outline-warning {
    min-height: 50px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.action-buttons .col-6 .btn-wishlist,
.action-buttons .col-6 .btn-outline-secondary {
    min-height: 50px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    border-width: 1px;
    letter-spacing: 0.01em;
}

.action-buttons .btn-add-cart {
    font-size: 0.97rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn-add-cart {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-add-cart:hover {
    background: color-mix(in srgb, var(--primary-color) 85%, #000000);
    transform: translateY(-2px);
}

.btn-order-now {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-order-now:hover {
    background: var(--light-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-wishlist {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-wishlist:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-wishlist.in-wishlist {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-wishlist.in-wishlist:hover {
    background: color-mix(in srgb, var(--primary-color) 85%, #000000);
    border-color: color-mix(in srgb, var(--primary-color) 85%, #000000);
    color: white;
}

.btn-wishlist.in-wishlist i {
    color: white;
}

/* Rate this Product button */
.action-buttons .btn-outline-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.star-rating {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating.active,
.star-rating.hover {
    color: #fbbf24;
}

/* CSS-Only Reviews Carousel */
.reviews-carousel-container {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
}

.reviews-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reviews-heading h4 {
    margin-bottom: 0;
}

.reviews-heading-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #d9e4ec;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.reviews-score {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

.reviews-stars-inline {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #f59e0b;
}

.reviews-count {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
}

.css-carousel {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 20px;
    height: auto;
    min-height: 0;
    padding: 0.25rem 0.1rem 0.45rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.css-carousel::-webkit-scrollbar {
    height: 4px;
}

.css-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.css-carousel::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 2px;
}

.css-carousel-track {
    display: flex;
    width: max-content;
    height: auto;
}

.css-carousel-slide {
    flex: 0 0 320px;
    width: 320px;
    height: auto;
    scroll-snap-align: start;
    margin-right: 16px;
}

.css-carousel-slide:last-child {
    margin-right: 0;
}





.review-item {
    background: #ffffff;
    border: 1px solid #d7e6ef;
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 1rem 1rem 1.05rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.review-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.review-item::before {
    content: "";
    position: absolute;
    inset: 0;
    height: 0;
    background: transparent;
}

.review-item-head {
    border-bottom: 1px solid #dde7ef;
    padding-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 18px rgba(13, 148, 136, 0.25);
}

.review-user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.review-author {
    color: #0f172a;
    font-size: 0.96rem;
    line-height: 1.2;
    letter-spacing: 0.005em;
    text-transform: capitalize;
    font-weight: 700;
}

.review-rating-summary {
    margin-top: 0.58rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.review-stars i {
    color: #f59e0b;
    font-size: 1rem;
    margin: 0 1px;
}

.review-rating-badge {
    background: rgba(13, 148, 136, 0.12);
    color: #0f766e;
    border: 1px solid rgba(13, 148, 136, 0.24);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.24rem 0.55rem;
}

.review-date {
    color: #64748b;
    font-size: 0.8rem;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.review-quote {
    margin: 0.8rem 0 0;
    position: relative;
    padding: 0.2rem 0.2rem 0.2rem 0.1rem;
}

.review-quote p {
    color: #334155;
    font-size: 0.93rem;
    line-height: 1.65;
    font-weight: 400;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-quote::before,
.review-quote::after {
    content: none;
}

.review-quote p::before,
.review-quote p::after {
    color: #0d9488;
    font-size: 1.05em;
    font-weight: 700;
    line-height: 1;
}

.review-quote p::before {
    content: '" ';
}

.review-quote p::after {
    content: ' "';
}

.review-empty {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.8rem;
    font-style: italic;
}

.related-item {
    background: #ffffff;
    border: 2px solid #e9ecef !important;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-item .related-image img {
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.related-item .related-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.related-item .related-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stars {
    justify-content: center;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator:hover {
    background-color: #adb5bd;
}

.indicator.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Notification */
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-100px);
    z-index: 9999;
    background: var(--success-color);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-xl);
    transition: transform 0.4s ease;
    max-width: 400px;
    text-align: center;
}

.notification.show {
    transform: translate(-50%, -50%) translateY(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 24px;
}

.notification-message {
    font-weight: 500;
}

/* SweetAlert2 unified style (same visual language as seller delete warning) */
.category-delete-popup {
    border-radius: 20px;
    width: 420px;
    max-width: calc(100vw - 2rem);
    padding: 0.85rem 0.75rem 1rem;
}

.category-delete-icon.swal2-icon {
    border-width: 0.2em;
}

.category-delete-icon.swal2-icon.swal2-info,
.category-delete-icon.swal2-icon.swal2-success,
.category-delete-icon.swal2-icon.swal2-error,
.category-delete-icon.swal2-icon.swal2-question {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-delete-icon.swal2-icon.swal2-info .swal2-icon-content,
.category-delete-icon.swal2-icon.swal2-success .swal2-icon-content,
.category-delete-icon.swal2-icon.swal2-error .swal2-icon-content,
.category-delete-icon.swal2-icon.swal2-question .swal2-icon-content {
    color: var(--primary-color);
}

.category-delete-icon.swal2-icon.swal2-warning {
    border-color: #e8b07a;
    color: #e8b07a;
}

.category-delete-icon.swal2-icon.swal2-warning .swal2-icon-content {
    color: #e8b07a;
}

.category-delete-title {
    font-size: 1.6rem;
    font-weight: 400;
    color: #4b5563;
}

.category-delete-text {
    font-size: 0.96rem;
    color: #6b7280;
    line-height: 1.6;
}

.category-delete-actions {
    gap: 0.75rem;
}

.category-delete-confirm,
.category-delete-cancel {
    background: transparent;
    border: 1px solid;
    border-radius: 10px;
    padding: 0.65rem 1.35rem;
    font-weight: 400;
    line-height: 1;
}

.category-delete-confirm {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-delete-confirm:hover {
    background: var(--primary-color);
    color: #fff;
}

.category-delete-cancel {
    border-color: #6b7280;
    color: #6b7280;
}

.category-delete-cancel:hover {
    background: #6b7280;
    color: #fff;
}

.category-delete-popup .swal2-close {
    color: #9ca3af;
    transition: color 0.2s ease;
}

.category-delete-popup .swal2-close:hover {
    color: var(--primary-color);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 0;
    width: 100%;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    min-height: 52px;
    width: 100%;
}

.quantity-btn {
    background: #f8f9fa;
    border: none;
    width: 58px;
    flex: 0 0 58px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-input input {
    border: none;
    width: 100%;
    flex: 1 1 auto;
    height: 52px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

.product-tabs {
    margin-bottom: 40px;
}

.tab-buttons-scrollable {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.tab-buttons-scrollable::-webkit-scrollbar {
    height: 2px;
}

.tab-buttons-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.tab-buttons-scrollable::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 1px;
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    flex-shrink: 0;
}

.tab-btn i {
    font-size: 20px;
    margin-bottom: 2px;
}

.tab-btn span {
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

@media (max-width: 767.98px) {
    .tab-buttons-scrollable {
        gap: 0;
        padding: 0 10px;
    }

    .tab-btn {
        padding: 10px 12px;
        min-width: 70px;
    }

    .tab-btn i {
        font-size: 18px;
    }

    .tab-btn span {
        font-size: 11px;
    }
}

.tab-content {
    display: none;
}

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

.tab-content h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

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

.spec-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 15px;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-list li strong {
    color: var(--primary-color);
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.specifications-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.related-products {
    margin-top: 60px;
    margin-bottom: 80px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
    clear: both;
}

.related-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.related-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.related-grid::-webkit-scrollbar {
    height: 4px;
}

.related-grid::-webkit-scrollbar-track {
    background: transparent;
}

.related-grid::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 2px;
}

.related-grid::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--primary-color) 85%, #000000);
}

.related-card {
    flex: 0 0 250px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.related-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-info {
    padding: 15px;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.related-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Match "You might also like" tiles to shop page card sizing */
.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(174px, 174px));
    grid-auto-rows: auto;
    grid-auto-flow: row;
    align-items: stretch;
    justify-content: start;
    gap: 16px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-products .product-card {
    height: 350px;
    display: flex;
    flex-direction: column;
    grid-row-end: auto;
}

.related-products .product-info {
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    gap: 4px;
    padding: 12px;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    margin-bottom: 0;
}

.related-products .product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0;
    min-height: 20px;
    flex-wrap: nowrap;
}

.related-products .product-rating .stock-status {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.related-products .stars {
    display: flex;
    gap: 2px;
    justify-content: flex-start;
    flex-shrink: 0;
}

.related-products .star {
    font-size: 12px;
}

.related-products .rating-count {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.related-products .product-title {
    font-size: 16px;
    line-height: 1.3;
    min-height: 2.6em;
}

.related-products .product-description {
    font-size: 11px;
    line-height: 1.3;
    min-height: 2.8em;
}

.related-products .product-prices {
    gap: 8px;
    margin-bottom: 2px;
    row-gap: 2px;
}

.related-products .product-price {
    font-size: 18px;
}

.related-products .product-old-price {
    font-size: 14px;
}

@media (max-width: 768px) {
    .related-products .products-grid {
        gap: 8px;
    }

    .related-products .product-card {
        height: 320px;
    }

    .related-products .product-info {
        padding: 8px;
        gap: 3px;
    }

    .related-products .product-title {
        font-size: 12px;
        line-height: 1.2;
        min-height: 2.4em;
    }

    .related-products .product-price {
        font-size: 14px;
    }

    .related-products .product-old-price {
        font-size: 12px;
    }
}

@media (max-width: 767.98px) {
    .reviews-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
        margin-bottom: 0.75rem;
    }

    .reviews-heading-meta {
        padding: 0.28rem 0.65rem;
    }

    .css-carousel {
        height: auto;
    }

    .css-carousel-slide {
        flex: 0 0 88vw;
        width: 88vw;
        margin-right: 12px;
    }

    .review-item {
        min-height: 0;
        border-radius: 18px;
    }

    .product-gallery {
        margin-bottom: 20px;
    }

    .gallery-top-row {
        flex-direction: column;
        gap: 0;
    }

    .gallery-sidebar {
        display: none;
    }

    .main-image {
        order: 1;
        aspect-ratio: 4/3;
        margin-bottom: 0;
        /* bado hakuna gap */
    }

    .gallery-nav-btn {
        width: 36px;
        height: 36px;
    }

    .horizontal-thumbs-container {
        display: block;
    }

    .mobile-gallery-dots {
        display: flex;
    }

    .gallery-thumbs-horizontal {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px 0;
        margin: 0;
        height: 70px;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) transparent;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    .thumb-image-horizontal {
        flex: 0 0 70px;
        height: 60px;
        border-radius: 10px;
        overflow: hidden;
        cursor: pointer;
        border: 3px solid transparent;
        transition: all 0.3s ease;
    }

    .thumb-image-horizontal.active,
    .thumb-image-horizontal:hover {
        border-color: var(--primary-color);
    }

    .product-info {
        padding: 0.95rem !important;
    }

    .product-title-price-row {
        gap: 10px;
        margin-bottom: 0.75rem;
    }

    .product-main-title {
        font-size: 1.05rem !important;
        margin-bottom: 0;
    }

    .product-prices {
        margin-bottom: 0.65rem;
    }

    .current-price {
        font-size: 0.9rem !important;
    }

    .old-price {
        font-size: 0.78rem !important;
    }

    .product-prices {
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: 18px;
    }

    .old-price {
        font-size: 1.2rem;
    }

    .product-prices .badge {
        font-size: 0.72rem;
        padding: 0.25rem 0.45rem;
    }

    .stock-info {
        width: auto;
        justify-content: flex-start;
        font-size: 0.88rem;
        padding: 0.5rem 0.65rem;
        gap: 8px;
        margin-bottom: 0;
    }

    .stock-qty-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: 0.55rem;
        margin-bottom: 0.7rem;
        overflow-x: auto;
    }

    .product-discount-box {
        min-height: 44px;
        padding: 9px 12px;
        gap: 6px;
    }

    .product-discount-label {
        font-size: 0.75rem;
    }

    .product-discount-box strong {
        font-size: 0.82rem;
    }

    .quantity-selector {
        width: 100%;
        gap: 0.55rem;
        margin-bottom: 0;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }

    .quantity-selector label {
        font-size: 0.9rem;
        margin-bottom: 0;
        white-space: nowrap;
    }

    .quantity-input {
        width: 100%;
        max-width: none;
    }

    .quantity-btn {
        width: 48px;
        flex-basis: 48px;
        height: 44px;
        font-size: 0.95rem;
    }

    .quantity-input input {
        width: 100%;
        height: 44px;
        font-size: 0.95rem;
    }

    .btn-add-cart,
    .btn-wishlist {
        width: 100%;
        min-height: 44px;
        font-size: 0.88rem;
    }

.action-buttons .col-6 .btn,
.action-buttons .col-6 .btn-wishlist {
    min-height: 40px;
    font-size: 0.84rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .product-info.card {
        border-radius: 0.9rem;
    }

    .specifications-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .gallery-thumbs-vertical {
        height: 330px;
    }

    .thumb-image {
        flex: 0 0 calc((330px - 30px) / 4);
        max-height: calc((330px - 30px) / 4);
        min-height: 0;
    }

    .thumb-image {
        aspect-ratio: 1;
    }

    .gallery-thumbs-horizontal {
        display: none;
    }
}

/* Rating modal theme alignment */
.rating-modal-content {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.rating-modal-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.rating-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal-primary, #0d9488);
    font-weight: 400;
}

.rating-modal-title i {
    color: var(--teal-primary, #0d9488);
}

.rating-submit-btn {
    border: 1px solid var(--teal-primary, #0d9488);
    background: #fff;
    color: var(--teal-primary, #0d9488);
}

.rating-submit-btn:hover {
    background: var(--teal-primary, #0d9488);
    color: #fff;
}
