@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', Arial, sans-serif;
    background-image: url('assets/background-3.jpeg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    color: #fff;
    margin: 0;
    padding: 0;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #D32F2F;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header > * {
    display: flex;
    align-items: center;
}

.header h1 {
    margin: 0;
    font-size: 18px;
}

.back-button, .menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.cart-button {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    position: relative !important;
    padding: 8px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    z-index: 1001 !important;
}

.cart-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1) !important;
}

.cart-button i {
    font-size: 22px !important;
    pointer-events: none !important;
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #FF4081;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

.cart-badge:empty,
.cart-badge[style*="display: none"] {
    display: none !important;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.tab-menu {
    display: flex;
    justify-content: space-around;
    background-image: url('assets/background-tab-dark.jpg');
    background-repeat:no-repeat;
    background-position: center;
    padding: 2px 0;
    border-bottom: 1px solid #444;
}

/* Mobile */
@media (max-width: 768px) {
    .tab-menu {
        background-image: url('assets/background-tab-dark.jpg');
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .tab-menu {
            background:
rgba( 0, 0, 0, 0.6 );
box-shadow:
0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
backdrop-filter:
blur( 4px );
-webkit-backdrop-filter:
blur( 4px );
border-radius:
10px;
border:
1px solid rgba( 255, 255, 255, 0.18 );
    }
}

/* Large Desktop */
@media (min-width: 1025px) {
    .tab-menu {
            background:
rgba( 0, 0, 0, 0.6 );
box-shadow:
0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
backdrop-filter:
blur( 4px );
-webkit-backdrop-filter:
blur( 4px );
border-radius:
10px;
border:
1px solid rgba( 255, 255, 255, 0.18 );
    }
}

.tab {
    background: none;
    border: none;
    color: white;
    padding: 1px;
    font-size: 16px;
    cursor: pointer;
}

.tab p {
    margin-top: 1px;
    margin-bottom: 1px;
    font-weight: bold;
    text-shadow: black 9px 0 15px;
}

.tab.active {
    border-bottom: 2px solid white;
}

/* Default (Desktop) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 10px;
}

/* Mobile */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1025px) {
    .product-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.product-card {
    
    background:
rgba( 0, 0, 0, 0.6 );
box-shadow:
0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
backdrop-filter:
blur( 4px );
-webkit-backdrop-filter:
blur( 4px );
border-radius:
10px;
border:
1px solid rgba( 255, 255, 255, 0.18 );

    
    border-radius: 8px;
    padding: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.7);
}

.product-card img {
    width: 100%;
    border-radius: 8px;
}

.product-info {
    margin-top: 10px;
}

.product-info p {
    margin: 0;
    font-size: 14px;
    color: #aaa;
}

.product-info .price {
    font-size: 16px;
    color: white;
    font-weight: bold;
}

.product-info .condition {
    font-size: 12px;
    color: #aaa;
}

.favorite-button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

.favorite-button:hover {
    color: #FF4081;
}

.verify {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
}

.category-product {
    background-color: #1C1C1C;
    width: 40px;
    height: 40px;
    border-radius: 20%;
    object-fit: cover;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid #fff; /* Warna border */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Bayangan */
    padding: 5px; /* Padding di dalam border */
}

/* Tambahan CSS untuk profile section */
.profile-section {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #1C1C1C;
    border-bottom: 1px solid #444;
}

.profile-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 2px solid #fff;
}

.profile-info {
    flex-grow: 1;
    color: white;
}

.profile-info h2 {
    margin: 0;
    font-size: 18px;
}

.profile-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #ccc;
}

.profile-info .verified-icons,
.profile-info .location-icon {
    font-size: 14px;
    color: #ccc;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.share-button,
.follow-button {
    padding: 10px 20px;
    font-size: 14px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.share-button {
    background-color: #444;
    color: white;
}

.follow-button {
    background-color: #388E3C;
    color: white;
}

.follow-button:hover {
    background-color: #2E7D32;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
}

.cart-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -450px !important;
    width: 450px !important;
    max-width: 90vw !important;
    height: 100vh !important;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(40, 40, 40, 0.98) 100%) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.7) !important;
    z-index: 10000 !important;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    display: flex !important;
    flex-direction: column !important;
    color: white !important;
    overflow: hidden !important;
    visibility: visible !important;
}

.cart-sidebar.active {
    right: 0 !important;
}

@keyframes slideInRight {
    from {
        right: -450px;
        opacity: 0;
    }
    to {
        right: 0;
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        right: -450px;
        opacity: 0;
    }
    to {
        right: 0;
        opacity: 1;
    }
}

.cart-header {
    padding: 25px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(211, 47, 47, 0.1);
}

.cart-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: white;
}

.close-cart {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-cart:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    overflow-x: hidden;
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.cart-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
    font-size: 16px;
}

.cart-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cart-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #aaa;
}

.cart-item-total {
    color: #4CAF50 !important;
    font-weight: 600;
    font-size: 15px !important;
    margin-top: 5px !important;
}

.cart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(244, 67, 54, 0.3);
}

.cart-item-remove:hover {
    background: #d32f2f;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 3px 8px rgba(244, 67, 54, 0.5);
}

.cart-footer {
    padding: 25px 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.cart-summary {
    margin-bottom: 20px;
}

.cart-total-items,
.cart-total-price {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 16px;
    align-items: center;
}

.cart-total-items {
    color: #ccc;
    font-size: 15px;
}

.cart-total-items strong {
    color: white;
    font-weight: 600;
}

.cart-total-price {
    font-size: 20px;
    font-weight: 600;
    color: #4CAF50;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    margin-top: 5px;
}

.cart-total-price strong {
    font-size: 24px;
    font-weight: 700;
}

.checkout-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-button:hover {
    background: linear-gradient(135deg, #B71C1C 0%, #C62828 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6);
}

.checkout-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(211, 47, 47, 0.4);
}

/* Product Detail Page */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.product-detail-loading,
.error-message {
    text-align: center;
    padding: 40px;
    color: #aaa;
    font-size: 18px;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 10px;
    padding: 30px;
}

.product-detail-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.3s;
}

.thumbnail:hover {
    opacity: 1;
    border-color: #D32F2F;
}

.thumbnail.active {
    opacity: 1;
    border-color: #D32F2F;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-category {
    color: #aaa;
    font-size: 14px;
    text-transform: uppercase;
}

.product-detail-info h1 {
    margin: 0;
    font-size: 28px;
    color: white;
}

.product-detail-info .product-price {
    font-size: 32px;
    font-weight: bold;
    color: #4CAF50;
}

.product-stock {
    font-size: 16px;
    padding: 10px;
    border-radius: 5px;
}

.product-stock.in-stock {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.product-stock.out-of-stock {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.product-description {
    margin-top: 20px;
}

.product-description h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: white;
}

.product-description p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-cart {
    background: #4CAF50;
    color: white;
}

.btn-add-cart:hover:not(:disabled) {
    background: #388E3C;
}

.btn-buy-now {
    background: #D32F2F;
    color: white;
}

.btn-buy-now:hover:not(:disabled) {
    background: #B71C1C;
}

.btn-add-cart:disabled,
.btn-buy-now:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-sidebar.active {
        animation: slideInRight 0.4s ease-out;
    }
    
    @keyframes slideInRight {
        from {
            right: -100%;
            opacity: 0;
        }
        to {
            right: 0;
            opacity: 1;
        }
    }
    
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-thumbnails {
        justify-content: center;
    }
}

