:root {
    --primary-color: #FF6A00;
    --primary-light: #FFF1E6;
    --primary-lighter: #FFF1E6;
    --secondary-color: #E85D04;
    --dark-color: #1a1a1a;
    --light-bg: #f9fafb;
    --text-color: #2d3748;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: #ffffff;
    line-height: 1.6;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6A00 0%, #E85D04 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
    z-index: 999;
    opacity: 0;
}

.back-to-top.show {
    display: flex;
    animation: slideInUp 0.3s ease-out;
    opacity: 1;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-to-top:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FF7200 100%);
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(255, 106, 0, 0.5);
}

.back-to-top:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

.container-lg {
    max-width: 1400px;
}

@media (max-width: 576px) {
    .container-lg {
        max-width: 100% !important;
    }
}

/* Search Section */
.search-section {
    margin-bottom: 14px;
    width: 100%;
    overflow-x: hidden;
    padding: 0;
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    max-width: 400px;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.95rem;
}

.search-input {
    width: 100%;
    padding: 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.search-clear:hover {
    color: var(--primary-color);
}

/* Category Filter */
.category-filter {
    background: white;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 12px;
}

.filter-header h5 {
    font-weight: 900;
    color: var(--dark-color);
    margin: 0;
    font-size: 14px;
    margin-bottom: 10px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-lighter);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 11px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    border-left: 4px solid;
}

.alert-success {
    background: #ecfdf5;
    color: #FF6A00;
    border-color: #FF6A00;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #ef4444;
}

.alert i {
    margin-right: 8px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}


.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.product-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.badge-text {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.product-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.product-name {
    font-weight: 900;
    font-size: 14px;
    line-height: 1.35;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
}

.product-desc {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.star-rating {
    display: flex;
    gap: 2px;
    color: #fbbf24;
    font-size: 12px;
}

.rating-count {
    color: #6b7280;
    font-size: 12px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: auto;
    box-sizing: border-box;
    width: 100%;
}

.btn-action {
    padding: 7px 10px;
    border-radius: 6px;
    color: white;
    border: none;
    font-weight: 800;
    font-size: 12px;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
}

.btn-detail {
    background: #7c3aed;
}

.btn-detail:hover {
    background: #6d28d9;
}

.btn-rate {
    background: #FF6A00;
}

.btn-rate:hover {
    background: #E85D04;
}

/* Empty State */
.recommendation-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 16px;
}

.empty-state {
    text-align: center;
}

.empty-state-icon {
    font-size: 2.5rem;
    color: #d1d5db;
    margin-bottom: 12px;
}

.empty-state-text {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark-color);
    margin: 0;
}

.empty-state-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 6px 0 0 0;
}

/* Section Title */
.section-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--dark-color);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 16px 0;
}

/* Responsive */
/* Responsive */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    /* Container dengan padding lebih compact */
    .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
        padding: 0 12px;
    }

    .col-md-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Header Section */
    .section-title {
        font-size: 20px;
        font-weight: 900;
        margin-bottom: 6px;
        margin-top: 8px;
    }

    .section-subtitle {
        font-size: 14px;
        margin-bottom: 14px;
        color: #6b7280;
    }

    /* Search Section */
    .search-section {
        margin-bottom: 14px;
        padding: 0;
    }

    .search-input-wrapper {
        max-width: 100%;
    }

    .search-input {
        height: 42px;
        padding: 10px 40px 10px 12px;
        font-size: 14px;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
    }

    .search-input-wrapper i {
        left: 12px;
        font-size: 0.85rem;
    }

    .search-clear {
        right: 10px;
        font-size: 0.9rem;
    }

    /* Category Filter */
    .category-filter {
        padding: 12px;
        margin: 0;
        border-radius: 10px;
    }

    .filter-header h5 {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .category-buttons {
        gap: 6px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .category-btn {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 8px;
        flex-shrink: 0;
        font-weight: 800;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        padding: 0;
        margin-top: 12px !important;
    }

    .product-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        overflow: hidden;
        width: 100%;
        border-radius: 12px;
    }

    /* Product Image */
    .product-image {
        height: 110px;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #FF6A00 0%, #E85D04 100%);
        font-size: 2rem;
        color: rgba(255, 255, 255, 0.6);
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Product Body */
    .product-body {
        padding: 8px;
        gap: 4px;
        flex: 1;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        overflow: hidden;
        width: 100%;
    }

    /* Product Name */
    .product-name {
        font-size: 14px;
        line-height: 1.3;
        font-weight: 900;
        color: #1a1a1a;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Product Description - Hide on mobile */
    .product-desc {
        font-size: 12px;
        display: none;
    }

    /* Product Rating */
    .product-rating {
        font-size: 12px;
        margin-bottom: 2px;
        gap: 4px;
        align-items: center;
        display: flex;
    }

    .star-rating {
        display: flex;
        gap: 1px;
        font-size: 12px;
        color: #fbbf24;
    }

    .rating-count {
        font-size: 12px;
        color: #6b7280;
    }

    /* Category Badge */
    .product-category-badge {
        top: 6px;
        right: 6px;
        z-index: 10;
    }

    .badge-text {
        font-size: 10px;
        padding: 3px 8px;
        border-radius: 4px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    /* Product Actions */
    .product-actions {
        display: flex;
        gap: 4px;
        margin-top: auto;
        box-sizing: border-box;
        width: 100%;
    }

    .btn-action {
        flex: 1;
        padding: 6px 4px;
        font-size: 11px;
        border-radius: 6px;
        color: white;
        border: none;
        font-weight: 700;
        transition: all 0.3s;
        cursor: pointer;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        white-space: nowrap;
        box-sizing: border-box;
        min-height: 32px;
    }

    .btn-action i {
        font-size: 10px;
    }

    /* Alert Section */
    .alert {
        margin: 12px 0;
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    /* Recommendation Section */
    .recommendation-section {
        margin: 12px 0 0 0;
        padding: 20px;
        border-radius: 10px;
    }

    .empty-state-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }

    .empty-state-text {
        font-size: 14px;
    }

    .empty-state-desc {
        font-size: 12px;
        margin-top: 6px;
    }
}

@media (max-width: 576px) {
    /* Container */
    .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
        padding: 0 12px;
    }

    .col-md-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Header Section */
    .search-form {
        flex-direction: column;
    }

    .section-title {
        font-size: 20px;
        margin-top: 8px;
        margin-bottom: 6px;
        font-weight: 900;
    }

    .section-subtitle {
        font-size: 14px;
        margin-bottom: 14px;
    }

    /* Search Section */
    .search-section {
        margin-bottom: 14px;
        padding: 0;
    }

    .search-input {
        height: 42px;
        padding: 10px 40px 10px 12px;
        font-size: 14px;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
    }

    .search-clear {
        right: 10px;
    }

    /* Category Filter */
    .category-filter {
        padding: 12px;
        margin: 0;
        border-radius: 10px;
    }

    .filter-header h5 {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .category-buttons {
        gap: 6px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .category-btn {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 8px;
        flex-shrink: 0;
        font-weight: 800;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        padding: 0;
        margin-top: 12px !important;
    }

    .product-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        overflow: hidden;
        width: 100%;
        border-radius: 12px;
    }

    /* Product Image */
    .product-image {
        height: 110px;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Product Body */
    .product-body {
        padding: 8px;
        gap: 4px;
        box-sizing: border-box;
        overflow: hidden;
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* Product Name */
    .product-name {
        font-size: 14px;
        line-height: 1.3;
        font-weight: 800;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Product Description */
    .product-desc {
        display: none;
    }

    /* Product Rating */
    .product-rating {
        font-size: 12px;
        gap: 4px;
        margin-bottom: 2px;
    }

    .star-rating {
        font-size: 12px;
        gap: 1px;
        display: flex;
    }

    .rating-count {
        font-size: 12px;
    }

    /* Category Badge */
    .product-category-badge {
        top: 6px;
        right: 6px;
    }

    .badge-text {
        font-size: 10px;
        padding: 3px 6px;
        border-radius: 4px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    /* Product Actions */
    .product-actions {
        display: flex;
        gap: 4px;
        box-sizing: border-box;
        margin-top: auto;
        width: 100%;
    }

    .btn-action {
        flex: 1;
        padding: 6px 4px;
        font-size: 11px;
        border-radius: 6px;
        color: white;
        border: none;
        font-weight: 700;
        transition: all 0.3s;
        cursor: pointer;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        white-space: nowrap;
        box-sizing: border-box;
        min-height: 32px;
    }

    .btn-action i {
        font-size: 10px;
    }

    /* Alert */
    .alert {
        margin: 12px 0;
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    /* Recommendation Section */
    .recommendation-section {
        margin: 14px 0 0 0;
        padding: 20px 12px;
        border-radius: 10px;
    }

    .empty-state-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .empty-state-text {
        font-size: 14px;
    }

    .empty-state-desc {
        font-size: 12px;
        margin-top: 6px;
    }
}