/* ============================================================
   FakeShopee - Shopee-Inspired Orange/Dark Theme
   ============================================================ */

:root {
    --shopee-orange: #ee4d2d;
    --shopee-orange-dark: #d73211;
    --shopee-orange-light: #ff6533;
    --shopee-red: #d0011b;
    --shopee-bg: #f5f5f5;
    --shopee-dark: #222222;
    --shopee-text: #333333;
    --shopee-text-muted: #757575;
    --shopee-border: #e0e0e0;
    --shopee-white: #ffffff;
    --shopee-gradient: linear-gradient(135deg, #ee4d2d 0%, #ff6533 100%);
}

/* ---- General ---- */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--shopee-bg);
    color: var(--shopee-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--shopee-orange);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--shopee-orange-dark);
}

.text-orange {
    color: var(--shopee-orange) !important;
}

.bg-shopee {
    background-color: var(--shopee-orange) !important;
    color: var(--shopee-white) !important;
}

/* ---- Buttons ---- */
.btn-shopee {
    background: var(--shopee-gradient);
    border: none;
    color: var(--shopee-white);
    font-weight: 600;
    border-radius: 4px;
    padding: 8px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(238, 77, 45, 0.3);
}

.btn-shopee:hover {
    background: linear-gradient(135deg, var(--shopee-orange-dark) 0%, var(--shopee-orange) 100%);
    color: var(--shopee-white);
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.4);
    transform: translateY(-1px);
}

.btn-shopee:active {
    transform: translateY(0);
}

.btn-outline-shopee {
    border: 1px solid var(--shopee-orange);
    color: var(--shopee-orange);
    background: transparent;
    font-weight: 600;
    border-radius: 4px;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.btn-outline-shopee:hover {
    background-color: var(--shopee-orange);
    color: var(--shopee-white);
}

/* ---- Top Bar ---- */
.topbar {
    background-color: var(--shopee-dark);
    color: #ccc;
    padding: 6px 0;
    font-size: 12px;
}

.topbar a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.topbar a:hover {
    color: var(--shopee-white);
}

.topbar .divider {
    margin: 0 8px;
    color: #555;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- Main Navbar ---- */
.main-navbar {
    background: var(--shopee-gradient);
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 28px;
    color: var(--shopee-white);
}

.brand-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--shopee-white);
    letter-spacing: -0.5px;
}

.search-form {
    flex: 1;
    max-width: 500px;
    margin: 0 24px;
}

.search-input {
    border: none;
    border-radius: 4px 0 0 4px;
    padding: 8px 16px;
    font-size: 14px;
}

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

.btn-search {
    background-color: var(--shopee-orange-dark);
    color: var(--shopee-white);
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 8px 16px;
}

.btn-search:hover {
    background-color: var(--shopee-dark);
    color: var(--shopee-white);
}

.main-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.main-navbar .nav-link:hover {
    color: var(--shopee-white) !important;
    background: rgba(255, 255, 255, 0.15);
}

.cart-link {
    position: relative;
}

/* ---- Hero Banner ---- */
.hero-banner {
    background: var(--shopee-gradient);
    padding: 60px 0;
    color: var(--shopee-white);
    overflow: hidden;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 28px;
    line-height: 1.6;
}

.hero-graphic {
    font-size: 180px;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ---- Category Strip ---- */
.category-strip {
    background: var(--shopee-white);
    border-bottom: 1px solid var(--shopee-border);
}

.category-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--shopee-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.category-icon-link:hover {
    color: var(--shopee-orange);
}

.category-icon-link:hover .category-icon-box {
    border-color: var(--shopee-orange);
    color: var(--shopee-orange);
    transform: translateY(-2px);
}

.category-icon-box {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--shopee-bg);
    border: 2px solid transparent;
    font-size: 24px;
    color: var(--shopee-text-muted);
    transition: all 0.2s;
}

/* ---- Promo Section ---- */
.promo-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--shopee-white);
    border-radius: 8px;
    border: 1px solid var(--shopee-border);
}

.promo-icon {
    font-size: 32px;
    color: var(--shopee-orange);
}

.promo-card h6 {
    margin-bottom: 2px;
    font-weight: 600;
}

.promo-card small {
    color: var(--shopee-text-muted);
}

/* ---- Section Headers ---- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--shopee-orange);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--shopee-dark);
}

/* ---- Product Cards ---- */
.product-card {
    background: var(--shopee-white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #fafafa;
}

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

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

.product-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--shopee-orange);
    color: var(--shopee-white);
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 0 0 0 4px;
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name-link {
    color: var(--shopee-text);
    text-decoration: none;
}

.product-name-link:hover {
    color: var(--shopee-orange);
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.product-price {
    color: var(--shopee-orange);
    font-size: 18px;
    font-weight: 700;
}

.product-sold {
    font-size: 12px;
    color: var(--shopee-text-muted);
}

.product-rating {
    font-size: 12px;
    margin-bottom: 4px;
}

.product-info form {
    margin-top: auto;
}

/* ---- Sidebar ---- */
.sidebar-card {
    background: var(--shopee-white);
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--shopee-dark);
    margin-bottom: 12px;
}

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

.category-list li a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--shopee-text);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.category-list li a:hover,
.category-list li a.active {
    background-color: #fff1ed;
    color: var(--shopee-orange);
    font-weight: 600;
}

.sort-select {
    border: 1px solid var(--shopee-border);
    min-width: 160px;
}

.price-filter .input-group-text {
    font-size: 13px;
}

/* ---- Product Detail ---- */
.product-detail-card {
    background: var(--shopee-white);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.product-detail-image-wrapper {
    padding: 20px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.product-detail-image {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 4px;
}

.product-detail-body {
    padding: 24px 32px;
}

.product-detail-name {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.product-detail-meta {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--shopee-border);
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.rating-value {
    color: var(--shopee-orange);
    font-size: 18px;
    font-weight: 700;
    text-decoration: underline;
}

.rating-row .divider {
    color: var(--shopee-border);
    margin: 0 8px;
}

.sold-count {
    color: var(--shopee-text-muted);
}

.product-detail-price-box {
    background: #fef6f5;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.product-detail-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--shopee-orange);
}

.product-detail-original-price {
    font-size: 16px;
    color: var(--shopee-text-muted);
    text-decoration: line-through;
}

.product-detail-discount {
    background: var(--shopee-orange);
    color: var(--shopee-white);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
}

.product-detail-section {
    margin-bottom: 16px;
}

.detail-label {
    font-size: 13px;
    color: var(--shopee-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
}

.detail-value {
    font-size: 14px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
}

.qty-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-input {
    width: 60px;
    text-align: center;
    border-radius: 0;
    height: 36px;
}

.delivery-info {
    border-top: 1px solid var(--shopee-border);
    padding-top: 16px;
}

.delivery-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.delivery-item i {
    font-size: 20px;
    margin-top: 2px;
}

/* ---- Cart ---- */
.cart-card {
    background: var(--shopee-white);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.cart-header {
    background: #fafafa;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--shopee-text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--shopee-border);
}

.cart-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--shopee-border);
    transition: background 0.2s;
}

.cart-item:hover {
    background: #fef9f8;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--shopee-border);
}

.cart-qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qty-display {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.cart-footer {
    padding: 16px 20px;
    background: #fafafa;
    border-top: 1px solid var(--shopee-border);
}

/* ---- Summary Card ---- */
.summary-card {
    background: var(--shopee-white);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.summary-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--shopee-orange);
}

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

.summary-total {
    font-size: 18px;
    font-weight: 700;
}

.summary-item {
    padding: 8px 0;
    border-bottom: 1px dashed var(--shopee-border);
    font-size: 13px;
}

/* ---- Checkout ---- */
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--shopee-text-muted);
    transition: color 0.3s;
}

.step.active {
    color: var(--shopee-orange);
}

.step.completed {
    color: #28a745;
}

.step-icon {
    font-size: 28px;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--shopee-border);
    max-width: 120px;
    margin: 0 12px;
    margin-bottom: 22px;
    transition: background 0.3s;
}

.step-line.active {
    background: var(--shopee-orange);
}

.checkout-form-card {
    background: var(--shopee-white);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 28px;
}

.form-card-title {
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--shopee-orange);
}

.payment-methods {
    padding: 12px 0;
}

.secure-badge {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f0fff4;
    border-radius: 4px;
}

.confirm-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--shopee-border);
}

.confirm-section h6 {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--shopee-text-muted);
}

.confirm-detail p {
    margin-bottom: 4px;
    font-size: 14px;
}

.confirm-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

/* ---- Orders ---- */
.order-card {
    background: var(--shopee-white);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.order-card-header {
    padding: 14px 20px;
    background: #fafafa;
    border-bottom: 1px solid var(--shopee-border);
}

.order-id {
    font-weight: 700;
    color: var(--shopee-dark);
}

.order-date {
    font-size: 13px;
    color: var(--shopee-text-muted);
}

.order-card-body {
    padding: 16px 20px;
}

.order-items-preview {
    border-left: 3px solid var(--shopee-orange);
    padding-left: 12px;
}

.order-item-row {
    padding: 4px 0;
    font-size: 14px;
}

/* ---- Order Detail ---- */
.order-detail-card {
    background: var(--shopee-white);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.order-detail-header {
    padding-bottom: 16px;
    border-bottom: 2px solid var(--shopee-orange);
}

.order-progress .progress-bar {
    transition: width 1s ease;
}

.bg-shopee {
    background-color: var(--shopee-orange) !important;
}

.order-detail-items {
    border: 1px solid var(--shopee-border);
    border-radius: 4px;
    overflow: hidden;
}

.order-detail-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--shopee-border);
}

.order-detail-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--shopee-border);
}

/* ---- Empty States ---- */
.empty-state {
    background: var(--shopee-white);
    border-radius: 8px;
    padding: 60px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ---- Footer ---- */
.site-footer {
    background: var(--shopee-dark);
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-col h5 {
    color: var(--shopee-white);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

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

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #999;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--shopee-orange);
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.footer-divider {
    border-color: #444;
    margin: 24px 0 16px;
}

.copyright {
    font-size: 13px;
    margin-bottom: 4px;
    color: #999;
}

.disclaimer {
    font-size: 11px;
    color: #666;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 13px;
}

.breadcrumb-item a {
    color: var(--shopee-text-muted);
}

.breadcrumb-item a:hover {
    color: var(--shopee-orange);
}

.breadcrumb-item.active {
    color: var(--shopee-text);
}

/* ---- Alerts ---- */
.alert-success {
    background-color: #e8f8ef;
    border-color: #b8e6c8;
    color: #1a6b3c;
}

.alert-danger {
    background-color: #fdf0f0;
    border-color: #f5c6c6;
    color: #8b1a1a;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-image-col {
        display: none;
    }

    .search-form {
        margin: 12px 0;
        max-width: 100%;
    }

    .topbar {
        display: none;
    }

    .cart-header {
        display: none;
    }

    .cart-item .row {
        flex-direction: column;
        gap: 8px;
    }

    .cart-item .col-2,
    .cart-item .col-1 {
        text-align: left !important;
    }

    .checkout-steps {
        transform: scale(0.85);
    }

    .product-detail-body {
        padding: 16px;
    }

    .product-detail-price {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .product-name {
        font-size: 13px;
        min-height: 36px;
    }

    .product-price {
        font-size: 16px;
    }
}
