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

:root {
    --bg-primary: #eaeded;
    --bg-secondary: #ffffff;
    --navbar-bg: #131921;
    --navbar-text: #ffffff;
    --navbar-accent: #febd69;
    
    --card-bg: #ffffff;
    --card-border: #dde2e5;
    
    --text-primary: #0f1111;
    --text-secondary: #565959;
    --text-link: #007185;
    --text-link-hover: #c45500;
    
    --color-primary: #ffd814;
    --color-primary-hover: #f7ca00;
    --color-primary-border: #fcd200;
    
    --color-secondary: #a9acb6;
    --color-secondary-hover: #8f929d;
    
    --color-success: #007600;
    --color-success-bg: #e7f4e7;
    
    --color-warning: #b12704;
    --color-warning-bg: #fff8f7;
    
    --color-danger: #c45500;
    --color-danger-bg: #fffbf8;
    
    --radius-lg: 8px;
    --radius-md: 4px;
    --font-sans: 'Inter', Arial, sans-serif;
    
    --transition-fast: 0.15s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Amazon Dark Top Navbar */
header {
    background-color: var(--navbar-bg);
    color: var(--navbar-text);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(to bottom, #000000 0%, #000000 33%, #FF0000 33%, #FF0000 66%, #FFD700 66%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 0px 1px rgba(255, 255, 255, 0.9));
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.logo span {
    color: var(--navbar-accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #d1d5db;
    padding: 0.4rem 0.1rem;
    transition: color var(--transition-fast);
    position: relative;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--navbar-accent);
}

.nav-links a.active {
    color: var(--navbar-accent);
    font-weight: 700;
}


/* Main Layout */
main {
    max-width: 1300px;
    margin: 1.5rem auto 0 auto;
    padding: 0 2rem;
}

/* Page Titles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #d5dbdb;
    padding-bottom: 0.75rem;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.kpi-card::before {
    display: none;
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #b12704; /* Amazon price red */
}

.kpi-card.success .kpi-value { color: var(--color-success); }
.kpi-card.warning .kpi-value { color: #c45500; }

/* White panel cards like Amazon search results */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e7e7e7;
    padding-bottom: 0.5rem;
}

/* Layout Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr 2fr;
    }
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid #a6a99b;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) inset;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: #e77600;
    box-shadow: 0 0 3px 2px rgba(228, 121, 17, 0.5);
}

/* Amazon Gold / Yellow Pill Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 100px; /* Pill-shaped button */
    border: 1px solid;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: var(--font-sans);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: #fcd200 #f5c400 #e6b400;
    color: #111;
}

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

.btn-success {
    background-color: #a3e0a3;
    border-color: #79c579;
    color: #111;
}

.btn-success:hover {
    background-color: #8cd38c;
}

.btn-danger {
    background-color: #f0c14b;
    border-color: #a88734 #9c7e31 #846a29;
    color: #111;
}

.btn-danger:hover {
    background-color: #ddb347;
}

.btn-secondary {
    background-color: #f7f8fa;
    border-color: #adb1b8 #a2a6ac #8d9096;
    color: #111;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}

.btn-secondary:hover {
    background-color: #e7e9ec;
}

.btn-sm {
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
}

/* Data Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.75rem;
    border-bottom: 1px solid #e7e7e7;
    background-color: #f7f7f7;
    text-align: left;
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid #e7e7e7;
    color: var(--text-primary);
}

tr:hover td {
    background-color: #f5fafd; /* Subtle highlight */
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
}

.badge-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid #a3d6a3;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge-info {
    background-color: #e8f4fd;
    color: #004b87;
    border: 1px solid #bce0fd;
}

/* Dynamic Order Form Rows */
.order-product-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    background: #f7f7f7;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid #e7e7e7;
}

.item-checkbox {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #e77600;
    cursor: pointer;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
}

/* Order Details Details Layout */
.order-details-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .order-details-card {
        grid-template-columns: repeat(3, 1fr);
    }
}

.detail-block {
    background: #fcfcfc;
    border: 1px solid #e7e7e7;
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #d5dbdb;
    padding-bottom: 0.25rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-link);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.85rem;
}

.tab-btn:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

.tab-btn.active {
    color: var(--text-primary);
    font-weight: 700;
    border-bottom: 3px solid #e77600;
}

/* Interactive Calculator Panel */
.price-info-block {
    background: #fff8f2;
    border: 1px solid #ffdec0;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-top: 1rem;
}

.price-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.price-info-grid div:nth-child(even) {
    font-family: monospace;
    font-weight: 700;
}

/* Clippy Style */
.clippy-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 1rem;
}

.clippy-bubble {
    background-color: #ffffe1;
    border: 1px solid #000000;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
    color: #000000;
    font-size: 0.95rem;
    position: relative;
    flex: 1;
    line-height: 1.4;
    min-height: 80px;
}

.clippy-bubble::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent #ffffe1 transparent transparent;
    display: block;
    width: 0;
}

.clippy-bubble::before {
    content: '';
    position: absolute;
    bottom: 20px;
    left: -11px;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent #000000 transparent transparent;
    display: block;
    width: 0;
    z-index: -1;
}

.clippy-avatar {
    width: 80px;
    height: 110px;
    flex-shrink: 0;
    position: relative;
}

.clippy-body {
    width: 32px;
    height: 90px;
    border: 4px solid #7f8c8d;
    border-radius: 20px;
    position: absolute;
    bottom: 10px;
    left: 24px;
    transform: rotate(-10deg);
    background-color: #bdc3c7;
}

.clippy-body-inner {
    width: 16px;
    height: 70px;
    border: 4px solid #7f8c8d;
    border-radius: 20px;
    position: absolute;
    bottom: 6px;
    left: 4px;
}

.clippy-eye-left, .clippy-eye-right {
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 50%;
    position: absolute;
}

.clippy-eye-left {
    top: 25px;
    left: 20px;
}

.clippy-eye-right {
    top: 23px;
    left: 34px;
}

.clippy-pupil {
    width: 4px;
    height: 4px;
    background-color: #000000;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
}

.clippy-eyebrow-left, .clippy-eyebrow-right {
    width: 10px;
    height: 3px;
    background-color: #000000;
    position: absolute;
}

.clippy-eyebrow-left {
    top: 19px;
    left: 20px;
    transform: rotate(-25deg);
}

.clippy-eyebrow-right {
    top: 17px;
    left: 35px;
    transform: rotate(25deg);
}

.clippy-helper-modal .modal-content {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 2px solid #131921 !important;
    max-width: 500px;
}

.clippy-step {
    display: none;
}

.clippy-step.active {
    display: block;
}

/* Interactive Cookie Rating Styles */
.cookie-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.cookie-rating input {
    display: none;
}

.cookie-rating label {
    cursor: pointer;
    font-size: 2.8rem;
    transition: transform 0.2s, filter 0.2s;
    filter: grayscale(100%) opacity(30%);
    user-select: none;
}

.cookie-rating label:hover,
.cookie-rating label:hover ~ label,
.cookie-rating input:checked ~ label {
    filter: grayscale(0%) opacity(100%) drop-shadow(0px 2px 4px rgba(231, 118, 0, 0.3));
    transform: scale(1.15);
}

.cookie-rating label:active {
    transform: scale(0.9);
}

