/* =============================================
   CSS VARIABLES (Design System)
============================================= */
:root {
    --background: hsl(209, 40%, 96%);
    --foreground: hsl(222, 47%, 11%);
    --card: hsl(210, 40%, 98%);
    --card-foreground: hsl(222, 47%, 11%);
    --primary: hsl(200, 98%, 39%);
    --primary-foreground: hsl(204, 100%, 97%);
    --secondary: hsl(215, 24%, 26%);
    --secondary-foreground: hsl(210, 40%, 98%);
    --muted: hsl(215, 20%, 65%);
    --muted-foreground: hsl(222, 47%, 11%);
    --accent: hsl(210, 40%, 98%);
    --accent-foreground: hsl(215, 19%, 34%);
    --destructive: hsl(0, 72%, 50%);
    --destructive-foreground: hsl(0, 85%, 97%);
    --border: hsl(212, 26%, 83%);
    --radius: 0.5rem;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* =============================================
   UTILITIES
============================================= */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: var(--accent);
}

/* =============================================
   HEADER
============================================= */
.header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
}

.logo-icon.small {
    width: 2rem;
    height: 2rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--muted);
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.nav-mobile.active {
    display: flex;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    .mobile-menu-btn {
        display: none;
    }
}

/* =============================================
   HERO SECTION
============================================= */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    padding: 2rem;
    color: var(--primary-foreground);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .hero {
        padding: 3rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
}

/* =============================================
   SEARCH & FILTER
============================================= */
.search-filter {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--foreground);
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
    background-color: var(--card);
    color: var(--foreground);
}

.filter-btn.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.filter-btn:hover:not(.active) {
    background-color: var(--accent);
}

@media (min-width: 768px) {
    .search-filter {
        flex-direction: row;
    }
}

/* =============================================
   PRODUCTS GRID
============================================= */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-title span {
    color: var(--muted);
    font-weight: 400;
    font-size: 1.125rem;
    margin-left: 0.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =============================================
   PRODUCT CARD
============================================= */
.product-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background-color: var(--accent);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1rem;
}

.product-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent);
    color: var(--accent-foreground);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 2rem;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* =============================================
   FORM STYLES
============================================= */
.form-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header .icon {
    width: 4rem;
    height: 4rem;
    background-color: var(--primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-foreground);
}

.form-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--foreground);
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--foreground);
    outline: none;
    resize: none;
}

.form-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--muted);
}

.form-footer a {
    color: var(--primary);
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border);
}

.divider span {
    color: var(--muted);
    font-size: 0.875rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* =============================================
   CART STYLES
============================================= */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .cart-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.cart-item {
    display: flex;
    gap: 1rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 6rem;
    height: 6rem;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--accent);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-size: 1.125rem;
    font-weight: 600;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.quantity-control button {
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--foreground);
}

.quantity-control button:hover {
    background-color: var(--accent);
}

.quantity-control span {
    width: 2rem;
    text-align: center;
    font-weight: 500;
}

.cart-summary {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    position: sticky;
    top: 6rem;
}

.cart-summary h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.summary-total {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.summary-total span:last-child {
    color: var(--primary);
}

/* =============================================
   DASHBOARD STYLES
============================================= */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 250px 1fr;
    }
}

.dashboard-sidebar {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.user-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 5rem;
    height: 5rem;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-foreground);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-menu a, .sidebar-menu button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    color: var(--foreground);
}

.sidebar-menu a:hover, .sidebar-menu button:hover {
    background-color: var(--accent);
}

.sidebar-menu a.active, .sidebar-menu button.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.sidebar-menu .logout {
    color: var(--destructive);
}

.sidebar-menu .logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.order-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.order-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.order-header:hover {
    background-color: var(--accent);
}

.order-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.order-info div p:first-child {
    font-size: 0.75rem;
    color: var(--muted);
}

.order-info div p:last-child {
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-completed {
    background-color: rgba(0, 136, 204, 0.1);
    color: var(--primary);
}

.status-shipping {
    background-color: rgba(59, 130, 246, 0.1);
    color: hsl(213, 93%, 67%);
}

.status-pending {
    background-color: var(--accent);
    color: var(--muted);
}

/* =============================================
   ADMIN STYLES
============================================= */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 4rem);
}

.admin-sidebar {
    width: 250px;
    background-color: var(--card);
    border-right: 1px solid var(--border);
    padding: 1rem;
    display: none;
}

@media (min-width: 1024px) {
    .admin-sidebar {
        display: block;
    }
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue {
    background-color: rgba(0, 136, 204, 0.1);
    color: var(--primary);
}

.stat-icon.green {
    background-color: rgba(34, 197, 94, 0.1);
    color: hsl(142, 71%, 45%);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.data-table {
    width: 100%;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    background-color: var(--accent);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .actions {
    display: flex;
    gap: 0.5rem;
}

.data-table .actions button {
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.data-table .actions .edit {
    background-color: rgba(59, 130, 246, 0.1);
    color: hsl(217, 91%, 60%);
}

.data-table .actions .delete {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--destructive);
}

/* =============================================
   FOOTER
============================================= */
.footer {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    padding: 3rem 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-desc {
    opacity: 0.8;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    opacity: 0.6;
}

/* =============================================
   MAIN CONTENT WRAPPER
============================================= */
main {
    flex: 1;
    padding: 2rem 0;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state svg {
    width: 6rem;
    height: 6rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 2rem;
}

/* =============================================
   SUCCESS PAGE
============================================= */
.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.success-icon {
    width: 6rem;
    height: 6rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.success-page h1 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
}

.success-page p {
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* =============================================
   PRODUCT DETAIL
============================================= */
.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
    }
}

.product-detail-image {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-detail-price {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.product-detail-desc {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.specs-box {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.specs-box h3 {
    margin-bottom: 1rem;
}

.specs-box ul {
    list-style: none;
}

.specs-box li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.specs-box li svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.feature-box {
    text-align: center;
    padding: 1rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}

.feature-box svg {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.feature-box p {
    font-size: 0.875rem;
    font-weight: 500;
}

/* =============================================
   BACK LINK
============================================= */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

/* =============================================
   CHECKOUT STEPS
============================================= */
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.step-number.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.step-number.inactive {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.step-line {
    width: 3rem;
    height: 2px;
}

.step-line.active {
    background-color: var(--primary);
}

.step-line.inactive {
    background-color: var(--border);
}

/* =============================================
   MODAL
============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal {
    background-color: var(--card);
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.modal h2 {
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    flex: 1;
}

/* =============================================
   ADDITIONAL STYLES FOR NEW PAGES
============================================= */

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--muted);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--muted);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 2rem;
}

.category-name {
    font-weight: 500;
}

/* Section */
.section {
    margin-bottom: 3rem;
}

/* Products Layout */
.products-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .products-layout {
        grid-template-columns: 250px 1fr;
    }
}

.filters-sidebar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--background);
    color: var(--foreground);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

/* Product Image Fix */
.product-card .product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-stock .in-stock {
    color: hsl(142, 71%, 45%);
    font-size: 0.875rem;
}

.product-stock .out-of-stock {
    color: var(--destructive);
    font-size: 0.875rem;
}

/* Buttons */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* No Products */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

/* Product Detail Page */
.product-gallery {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.product-price-lg {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.product-stock-info .in-stock {
    color: hsl(142, 71%, 45%);
}

.product-stock-info .out-of-stock {
    color: var(--destructive);
}

.product-description {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.product-description h3 {
    margin-bottom: 0.75rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.quantity-input button {
    padding: 0.5rem 1rem;
    background: var(--accent);
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
}

.quantity-input input {
    width: 60px;
    text-align: center;
    border: none;
    padding: 0.5rem;
    font-weight: 500;
}

/* Reviews */
.review-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.3;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    opacity: 1;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.review-rating {
    color: #fbbf24;
}

.review-date {
    color: var(--muted);
    font-size: 0.875rem;
}

.no-reviews {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

/* Cart Table */
.cart-table {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cart-table th {
    background: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
}

.cart-table tbody tr:last-child td {
    border-bottom: none;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.cart-product a {
    font-weight: 500;
    color: var(--foreground);
}

.cart-product a:hover {
    color: var(--primary);
}

.cart-product small {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
}

.cart-subtotal {
    font-weight: 600;
    color: var(--primary);
}

.quantity-input-sm {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-input-sm button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.quantity-input-sm span {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.btn-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.6;
}

.btn-remove:hover {
    opacity: 1;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.cart-summary h3 {
    margin-bottom: 1rem;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
}

.summary-row.total span:last-child {
    color: var(--primary);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-cart h2 {
    margin-bottom: 0.5rem;
}

.empty-cart p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* Checkout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1.5fr 1fr;
    }
}

.checkout-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkout-section h2 {
    margin-bottom: 1.5rem;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(0, 136, 204, 0.05);
}

.payment-option input {
    margin-top: 4px;
}

.payment-label strong {
    display: block;
    margin-bottom: 0.25rem;
}

.payment-label small {
    color: var(--muted);
}

.checkout-summary {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: sticky;
    top: 5rem;
    height: fit-content;
}

.checkout-summary h2 {
    margin-bottom: 1rem;
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    display: block;
}

.order-item-qty {
    font-size: 0.75rem;
    color: var(--muted);
}

.order-item-price {
    font-weight: 600;
    font-size: 0.875rem;
}

.checkout-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 1rem;
}

.checkout-note a {
    color: var(--primary);
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card > p {
    text-align: center;
    color: var(--muted);
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* Dashboard */
.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.dashboard-link:hover {
    background: var(--accent);
}

.dashboard-link.active {
    background: var(--primary);
    color: var(--primary-foreground);
}

.dashboard-link.text-danger {
    color: var(--destructive);
}

.dashboard-main {
    flex: 1;
}

.dashboard-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.dashboard-section h2 {
    margin-bottom: 1.5rem;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--accent);
}

.order-date {
    color: var(--muted);
    font-size: 0.875rem;
    margin-left: 1rem;
}

.order-body {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.order-footer {
    padding: 0 1rem 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.profile-form,
.password-form {
    max-width: 500px;
}

.profile-form .form-group small {
    color: var(--muted);
    font-size: 0.75rem;
}

/* Order Detail Page */
.order-detail-page {
    max-width: 1000px;
    margin: 0 auto;
}

.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-detail-header h1 {
    font-size: 1.5rem;
}

.status-lg {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .order-detail-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.order-detail-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.order-detail-section h2 {
    margin-bottom: 1rem;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.order-item-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--accent);
    border-radius: 0.5rem;
}

.order-item-detail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.order-item-detail .order-item-info {
    flex: 1;
}

.order-item-detail h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.order-item-detail p {
    font-size: 0.875rem;
    color: var(--muted);
}

.item-price {
    color: var(--primary);
}

.order-item-subtotal {
    font-weight: 700;
    font-size: 1.125rem;
}

.order-summary-box {
    background: var(--accent);
    border-radius: 0.5rem;
    padding: 1rem;
}

.order-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
}

.order-info-card h3 {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.order-info-card pre {
    white-space: pre-wrap;
    font-family: inherit;
}

/* Status Colors */
.status-processing {
    background: rgba(59, 130, 246, 0.1);
    color: hsl(217, 91%, 60%);
}

.status-shipped {
    background: rgba(168, 85, 247, 0.1);
    color: hsl(271, 91%, 65%);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--destructive);
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: hsl(142, 71%, 35%);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--destructive);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Nav */
.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

/* Footer Content */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Table */
@media (max-width: 768px) {
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        border-radius: 0.5rem;
    }
    
    .cart-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .cart-table td:last-child {
        border-bottom: none;
    }
    
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
    }
    
    .cart-product {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =============================================
   AUTH PAGE
============================================= */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.btn-full {
    width: 100%;
}

/* =============================================
   PAGE HEADER
============================================= */
.page-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--muted);
}

/* =============================================
   EMPTY STATE
============================================= */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.empty-state svg {
    color: var(--muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* =============================================
   PRODUCTS SECTION
============================================= */
.products-section {
    margin-bottom: 2rem;
}

/* =============================================
   DASHBOARD PAGE
============================================= */
.dashboard-page {
    padding: 2rem 0;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.user-avatar {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
}

.user-info h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.user-info p {
    color: var(--muted);
}

.dashboard-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--foreground);
    font-weight: 500;
    transition: all 0.2s;
}

.dashboard-nav .nav-item:hover {
    background: var(--accent);
}

.dashboard-nav .nav-item.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
}

.stat-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-content p {
    color: var(--muted);
    font-size: 0.875rem;
}

.info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.info-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.info-card .card-header h3 {
    font-size: 1.125rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-item svg {
    color: var(--muted);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.info-item .label {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-item .value {
    display: block;
    font-weight: 500;
}

.orders-section {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.order-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.1);
}

.order-info {
    flex: 1;
}

.order-id {
    font-weight: 600;
    display: block;
}

.order-date {
    font-size: 0.875rem;
    color: var(--muted);
}

.order-total {
    font-weight: 700;
    color: var(--primary);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending, .status-processing {
    background: rgba(59, 130, 246, 0.1);
    color: hsl(217, 91%, 60%);
}

.status-shipped {
    background: rgba(168, 85, 247, 0.1);
    color: hsl(271, 91%, 65%);
}

.status-delivered {
    background: rgba(34, 197, 94, 0.1);
    color: hsl(142, 71%, 45%);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--destructive);
}

/* =============================================
   CART PAGE
============================================= */
.cart-page {
    padding: 2rem 0;
}

.cart-page .page-header {
    text-align: left;
    margin-bottom: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}

.cart-item-image {
    width: 5rem;
    height: 5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: var(--muted);
    font-size: 0.875rem;
}

.cart-item-quantity {
    flex-shrink: 0;
}

.cart-item-subtotal {
    font-weight: 700;
    color: var(--primary);
    min-width: 120px;
    text-align: right;
}

.cart-item-remove {
    color: var(--muted);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.cart-item-remove:hover {
    color: var(--destructive);
    background: rgba(239, 68, 68, 0.1);
}

.cart-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cart-summary {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: sticky;
    top: 5rem;
}

.cart-summary h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.summary-rows {
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.free-shipping {
    color: hsl(142, 71%, 45%);
    font-weight: 500;
}

.login-prompt {
    text-align: center;
    padding: 1rem 0;
}

.login-prompt p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.checkout-form .form-group {
    margin-bottom: 1rem;
}

.checkout-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.checkout-form label svg {
    color: var(--muted);
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--foreground);
}

.checkout-form textarea {
    min-height: 80px;
    resize: vertical;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

/* =============================================
   PROFILE FORMS
============================================= */
.profile-forms {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .profile-forms {
        grid-template-columns: repeat(2, 1fr);
    }
}

.profile-forms .form-card {
    max-width: none;
}

.profile-forms .card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-forms .header-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
    flex-shrink: 0;
}

.profile-forms .header-icon.warning {
    background: linear-gradient(135deg, hsl(38, 92%, 50%), hsl(25, 95%, 53%));
}

.profile-forms .card-header h2 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.profile-forms .card-header p {
    color: var(--muted);
    font-size: 0.875rem;
}

.input-wrapper.disabled {
    opacity: 0.6;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.75rem;
}

/* =============================================
   ORDERS TABLE
============================================= */
.orders-table-wrapper {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.orders-table th,
.orders-table td {
    padding: 1rem;
    text-align: left;
}

.orders-table th {
    background: var(--accent);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.orders-table td {
    border-top: 1px solid var(--border);
}

.orders-table td.price {
    font-weight: 700;
    color: var(--primary);
}

/* =============================================
   ORDER DETAIL
============================================= */
.order-detail-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.order-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-title h1 {
    font-size: 1.75rem;
}

.order-detail-layout {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .order-detail-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.detail-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--muted);
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.order-item-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--accent);
    border-radius: 0.5rem;
}

.order-item-detail img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 0.5rem;
}

.order-item-detail .order-item-info {
    flex: 1;
}

.order-item-detail h4 {
    font-size: 0.875rem;
    font-weight: 600;
}

.order-item-detail p {
    font-size: 0.75rem;
    color: var(--muted);
}

.order-item-subtotal {
    font-weight: 700;
}

.order-summary-box {
    background: var(--accent);
    border-radius: 0.75rem;
    padding: 1rem;
}

.order-summary-box .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.order-summary-box .summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-weight: 700;
}

.order-summary-box .summary-total span:last-child {
    color: var(--primary);
    font-size: 1.125rem;
}

.order-detail-sidebar .detail-card h3 {
    margin-bottom: 1.5rem;
}

/* Order Success Page */
.order-success {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 1.5rem;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, hsl(142, 71%, 45%) 0%, hsl(142, 71%, 35%) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.order-success h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: hsl(142, 71%, 35%);
}

.success-message {
    color: var(--muted);
    margin-bottom: 2rem;
}

.order-info-box {
    background: var(--accent);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.order-info-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.order-info-row span {
    color: var(--muted);
}

.order-info-row strong {
    font-size: 1rem;
}

.order-info-row .text-primary {
    color: var(--primary);
    font-size: 1.125rem;
}

.success-note {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .success-actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-subtotal {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}
