:root {
    --bg: #070b12;
    --surface: #0f1622;
    --surface-alt: #121b2e;
    --text: #f4f7ff;
    --muted: #a8b1c3;
    --accent: #52d4ff;
    --accent-dark: #2d9bb9;
    --danger: #ff6b6b;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top left, rgba(82, 212, 255, 0.16), transparent 24%),
        radial-gradient(circle at bottom right, rgba(255, 107, 107, 0.1), transparent 18%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

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

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 32px;
    background: rgba(9, 13, 22, 0.88);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
}

.site-branding a {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.site-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.site-nav a svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.site-nav a:hover svg {
    transform: scale(1.1);
}

/* Cart Link Special Styling */
.cart-link {
    position: relative;
    background: rgba(82, 212, 255, 0.08);
    border: 1px solid rgba(82, 212, 255, 0.2);
    color: var(--accent) !important;
    font-weight: 600;
}

.cart-link:hover {
    background: rgba(82, 212, 255, 0.15);
    border-color: rgba(82, 212, 255, 0.4);
    box-shadow: 0 4px 12px rgba(82, 212, 255, 0.2);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: #03070a;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid rgba(9, 13, 22, 0.9);
    transition: all 0.3s ease;
}

.cart-link:hover .cart-count {
    transform: scale(1.1);
    background: #4f96b1;
}

/* Admin Link Styling */
.admin-link {
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: var(--danger) !important;
}

.admin-link:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.4);
}

.site-content {
    padding: 32px;
    max-width: 1240px;
    margin: 0 auto;
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 48px;
}

.hero-copy .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 16px;
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 4vw, 4.4rem);
    margin: 0 0 20px;
    line-height: 1.05;
}

.hero-copy p {
    max-width: 640px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.hero-image {
    display: grid;
    place-items: center;
}

.hero-card {
    width: 100%;
    min-height: 360px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(82, 212, 255, 0.12)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 1.1rem;
    color: var(--text);
}

.section {
    margin-bottom: 48px;
}

.section-alt {
    background: rgba(255, 255, 255, 0.04);
    padding: 36px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-header h1,
.section-header h2 {
    margin: 0 0 12px;
}

.section-header p {
    margin: 0 0 24px;
    color: var(--muted);
}

.product-grid,
.history-list,
.feature-list,
.dashboard-grid,
.contact-grid,
.checkout-grid {
    display: grid;
    gap: 24px;
}

.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Hero Tech Section */
.hero-tech-section {
    padding: 48px 32px;
    background: linear-gradient(135deg, rgba(82, 212, 255, 0.08), rgba(255, 107, 107, 0.04));
    margin: 32px 0;
    border-radius: 24px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.tech-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.tech-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(82, 212, 255, 0.3);
    box-shadow: 0 20px 60px rgba(82, 212, 255, 0.15);
}

.tech-image {
    width: 100%;
    height: 240px;
    position: relative;
    overflow: hidden;
    background: rgba(82, 212, 255, 0.1);
}

.tech-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(82, 212, 255, 0.3), rgba(255, 107, 107, 0.1));
    transition: opacity 0.4s ease;
    opacity: 0;
}

.tech-card:hover .tech-image::after {
    opacity: 1;
}

.tech-card h3 {
    margin: 20px 20px 8px;
    font-size: 1.2rem;
    color: var(--text);
}

.tech-card p {
    margin: 0 20px 12px;
    color: var(--muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

.tech-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(7, 11, 18, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 5px 14px;
    border-radius: 30px;
    border: 1px solid rgba(82, 212, 255, 0.35);
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 20px 20px;
}

.tech-tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(82, 212, 255, 0.08);
    color: rgba(82, 212, 255, 0.8);
    border: 1px solid rgba(82, 212, 255, 0.18);
    letter-spacing: 0.02em;
}

.product-card,
.dashboard-card,
.auth-card,
.confirmation-card,
.notice,
.contact-info,
.order-summary,
.checkout-form,
.custom-request-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.product-card-media,
.detail-media {
    background: linear-gradient(135deg, rgba(82, 212, 255, 0.16), rgba(255, 107, 107, 0.14));
    border-radius: 18px;
    min-height: 190px;
    margin-bottom: 20px;
}

.product-card-body h3,
.detail-copy h1 {
    margin: 0 0 12px;
}

.product-card-body p {
    color: var(--muted);
    line-height: 1.75;
    min-height: 72px;
}

.product-meta,
.order-details,
.summary-total,
.cart-actions,
.hero-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.product-meta span,
.product-price,
.summary-total strong {
    font-weight: 700;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--accent), #4f96b1);
    color: #03070a;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.button-sm {
    padding: 10px 18px;
}

.button-danger {
    background: var(--danger);
    color: #fff;
}

input,
textarea,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--text);
    padding: 14px 16px;
    margin-top: 10px;
    margin-bottom: 18px;
    font: inherit;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

textarea {
    resize: vertical;
}

.notice {
    border-radius: 18px;
    padding: 18px 22px;
    margin-bottom: 24px;
}

.notice.success {
    background: rgba(82, 212, 255, 0.12);
    border: 1px solid rgba(82, 212, 255, 0.3);
}

.notice.error {
    background: rgba(255, 107, 107, 0.14);
    border: 1px solid rgba(255, 107, 107, 0.28);
}

.empty-state,
.auth-card,
.confirmation-card,
.contact-info {
    text-align: center;
}

.empty-state h2,
.auth-card h1,
.confirmation-card h2,
.contact-info h2 {
    margin-top: 0;
}

.empty-note {
    color: var(--muted);
}

.auth-section {
    display: grid;
    place-items: center;
    min-height: 70vh;
}

.auth-card {
    max-width: 480px;
}

.auth-footnote {
    margin-top: 18px;
    color: var(--muted);
}

.auth-footnote a {
    color: var(--accent);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
}

.product-list {
    list-style: none;
    padding: 0;
    color: var(--muted);
}

.product-list li {
    margin-bottom: 10px;
}

.dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

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

.history-list li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.order-summary,
.checkout-form,
.contact-form,
.custom-request-form {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.order-summary ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.order-summary li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    color: var(--muted);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
}

.cart-table th,
.cart-table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-table input[type="number"] {
    max-width: 90px;
}

.cart-actions {
    justify-content: flex-end;
}

.checkout-grid {
    grid-template-columns: 1.4fr 0.8fr;
}

.contact-grid,
.section-grid {
    grid-template-columns: 1.3fr 0.9fr;
}

.contact-info {
    text-align: left;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.feature-item {
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-item strong {
    display: block;
    margin-bottom: 8px;
}

.site-footer {
    padding: 24px 32px;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 960px) {

    .hero-panel,
    .detail-grid,
    .checkout-grid,
    .contact-grid,
    .dashboard-grid,
    .section-grid {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px 24px;
    }

    .site-nav {
        gap: 12px;
        width: 100%;
        justify-content: center;
    }

    .site-nav a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .site-nav a span:not(.cart-count) {
        display: none;
    }

    .cart-count {
        top: -6px;
        right: -6px;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

@media (max-width: 640px) {
    .site-content {
        padding: 24px 18px;
    }

    .button {
        width: 100%;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .tech-image {
        height: 180px;
    }

    .hero-tech-section {
        padding: 32px 20px;
        margin: 24px 0;
    }

    .product-meta,
    .cart-actions,
    .summary-total {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-table {
        margin-bottom: 24px;
    }
}

/* Enhanced Cart Styling */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.cart-items-section {
    min-height: 300px;
}

.cart-table {
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px 14px 0 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease;
}

.cart-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cart-row:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 14px 14px;
}

.product-name {
    display: block;
    font-weight: 500;
}

.price-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(82, 212, 255, 0.15);
    border-radius: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 4px 8px;
}

.qty-input {
    width: 60px;
    background: transparent;
    border: none;
    text-align: center;
    color: var(--text);
    margin: 0;
    padding: 0;
    font-weight: 600;
}

.qty-input:focus {
    outline: none;
}

.qty-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.qty-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    color: var(--danger);
}

.total-price {
    font-weight: 600;
    color: var(--accent);
}

/* Cart Summary Section */
.cart-summary-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.checkout-summary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.summary-item span:first-child {
    color: var(--muted);
}

.summary-amount {
    color: var(--text);
    font-weight: 500;
}

.summary-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.summary-total span:first-child {
    color: var(--text);
}

.summary-amount-total {
    color: var(--accent);
    font-size: 1.3rem;
}

.cart-actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Button Variations */
.button-full {
    width: 100%;
}

.button-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.12);
}

.button-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.button-tertiary {
    background: rgba(82, 212, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(82, 212, 255, 0.2);
}

.button-tertiary:hover {
    background: rgba(82, 212, 255, 0.15);
}

/* Responsive Cart */
@media (max-width: 960px) {
    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-header,
    .cart-row {
        grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
    }
}

@media (max-width: 640px) {
    .cart-header {
        display: none;
    }

    .cart-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .cart-row::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
        font-size: 0.85rem;
        text-transform: uppercase;
    }

    .cart-col-product::before {
        content: "Product: ";
        font-weight: 600;
        color: var(--muted);
    }

    .cart-col-price::before {
        content: "Price: ";
        font-weight: 600;
        color: var(--muted);
    }

    .cart-col-qty::before {
        content: "Qty: ";
        font-weight: 600;
        color: var(--muted);
    }

    .cart-col-total::before {
        content: "Total: ";
        font-weight: 600;
        color: var(--muted);
    }
}