/* ============================================
   JURAGAN GEROBAK 21 - E-COMMERCE STYLES
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #ee4d2d;
    --primary-dark: #d73211;
    --primary-light: #ff6b4a;
    --secondary-color: #f5f5f5;
    --text-dark: #333;
    --text-muted: #666;
    --text-light: #999;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f5f5;
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    color: var(--primary-color);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.logo img {
    height: 45px;
}

.logo-text {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

.search-bar {
    flex: 1;
    max-width: 600px;
}

.search-bar .input-group {
    background: var(--white);
    border-radius: 50px;
    overflow: hidden;
}

.search-bar input {
    border: none;
    padding: 12px 20px;
}

.search-bar input:focus {
    box-shadow: none;
}

.search-bar .btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 25px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-btn {
    color: var(--white);
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.header-btn:hover {
    transform: translateY(-2px);
    color: var(--white);
}

.header-btn i {
    font-size: 1.3rem;
}

.header-btn span {
    display: block;
    font-size: 0.75rem;
    margin-top: 3px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--white);
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu .dropdown-toggle {
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 8px 15px;
}

.user-menu .dropdown-toggle::after {
    display: none;
}

/* Navigation */
.nav-categories {
    background: var(--white);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-categories .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.nav-categories .nav-link:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* ============================================
   HERO BANNER
   ============================================ */

.hero-banner {
    margin-bottom: 20px;
}

.hero-banner .carousel-item img {
    height: 400px;
    object-fit: cover;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.carousel-caption {
    background: rgba(0,0,0,0.5);
    padding: 20px 40px;
    border-radius: var(--radius);
}

/* ============================================
   SECTIONS & TITLES
   ============================================ */

section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   CATEGORIES
   ============================================ */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.category-item {
    text-align: center;
    padding: 15px;
    background: var(--white);
    border-radius: var(--radius-lg);
    transition: all 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.category-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.category-name {
    font-size: 0.85rem;
    color: var(--text-dark);
}

/* ============================================
   FLASH SALE
   ============================================ */

.flash-sale-section {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    padding: 30px 0;
    border-radius: var(--radius-lg);
}

.flash-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 5px;
}

.time-box {
    background: var(--text-dark);
    color: var(--white);
    padding: 5px 10px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.9rem;
}

.flash-sale-progress {
    margin-top: 10px;
}

.flash-sale-progress .progress {
    height: 8px;
    border-radius: 4px;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.product-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.product-scroll::-webkit-scrollbar {
    height: 6px;
}

.product-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    min-width: 200px;
}

.product-scroll .product-card {
    min-width: 180px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--white);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
}

.product-card:hover .btn-wishlist {
    opacity: 1;
}

.btn-wishlist:hover {
    background: var(--danger-color);
    color: var(--white);
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 2.5em;
    overflow: hidden;
}

.product-name a {
    color: var(--text-dark);
}

.product-name a:hover {
    color: var(--primary-color);
}

.product-price {
    margin-bottom: 8px;
}

.current-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 5px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   PRODUCT DETAIL
   ============================================ */

.product-detail {
    background: var(--white);
    padding: 30px 0;
}

.product-images {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.main-image {
    position: relative;
    padding-top: 100%;
    background: var(--secondary-color);
}

.main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.thumbnail-images img:hover,
.thumbnail-images img.active {
    border-color: var(--primary-color);
}

.product-info-detail {
    padding: 20px;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    color: var(--warning-color);
}

.product-price-detail {
    background: #fafafa;
    padding: 20px;
    border-radius: var(--radius);
}

.product-price-detail .current-price {
    font-size: 2rem;
}

.discount-badge-large {
    background: var(--danger-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-left: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cart {
    flex: 1;
    background: var(--warning-color);
    color: var(--text-dark);
    border: none;
    padding: 15px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    min-width: 200px;
}

.btn-cart:hover {
    background: #e0a800;
}

.btn-buy {
    flex: 1;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    min-width: 200px;
}

.btn-buy:hover {
    background: var(--primary-dark);
}

.btn-wishlist-detail {
    width: 55px;
    height: 55px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius);
    font-size: 1.2rem;
}

.seller-info {
    background: #fafafa;
    padding: 20px;
    border-radius: var(--radius);
}

.seller-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Reviews */
.reviews-list {
    margin-top: 20px;
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-info {
    flex: 1;
}

.review-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ============================================
   CART PAGE
   ============================================ */

.cart-page {
    background: var(--white);
    min-height: 500px;
}

.cart-items {
    background: var(--white);
    border-radius: var(--radius-lg);
}

.cart-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
}

.cart-item-name {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cart-item-name a {
    color: var(--text-dark);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-control .qty-input {
    width: 50px;
    text-align: center;
}

.cart-item-total {
    font-weight: 700;
    color: var(--primary-color);
}

.btn-remove {
    margin-left: 15px;
}

.cart-summary {
    background: #fafafa;
    padding: 25px;
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
}

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

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.btn-checkout {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: var(--radius);
    font-weight: 600;
}

.btn-checkout:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.empty-cart {
    padding: 50px 0;
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */

.checkout-page {
    background: var(--white);
    min-height: 500px;
}

.checkout-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 20px;
}

.checkout-section h6 {
    margin-bottom: 20px;
    font-weight: 600;
}

.address-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.address-item:hover {
    border-color: var(--primary-color);
}

.address-item input[type="radio"] {
    margin-top: 5px;
}

.address-item label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.shipping-option,
.payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.shipping-option:hover,
.payment-option:hover {
    border-color: var(--primary-color);
}

.shipping-option input,
.payment-option input {
    margin-right: 15px;
}

.shipping-option label,
.payment-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.shipping-price {
    font-weight: 700;
    color: var(--primary-color);
}

.order-summary {
    background: #fafafa;
    padding: 25px;
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius);
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.order-item-qty {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.order-item-price {
    font-weight: 600;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ============================================
   PRODUCTS PAGE
   ============================================ */

.products-page {
    background: var(--white);
    min-height: 500px;
}

.filter-sidebar {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.filter-section {
    margin-bottom: 25px;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 15px;
}

.filter-list {
    list-style: none;
    padding: 0;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list a {
    color: var(--text-muted);
    display: block;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.filter-list a:hover,
.filter-list a.active {
    background: var(--primary-color);
    color: var(--white);
}

.price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-range input {
    flex: 1;
}

.products-header {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.search-form .input-group {
    border-radius: 50px;
    overflow: hidden;
}

.empty-state {
    padding: 50px 0;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--white);
    padding: 50px 0 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
}

.app-links img {
    height: 40px;
    margin-right: 10px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.payment-methods i {
    font-size: 1.5rem;
    margin-left: 10px;
    color: var(--text-muted);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-dark);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--danger-color);
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-section {
    background: var(--white);
    padding: 50px 0;
}

.feature-item i {
    color: var(--primary-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .hero-banner .carousel-item img {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-image {
        height: 80px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-cart, .btn-buy {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        min-width: auto;
    }
}
