/* ============================================
   HERBAL TEA STORE – MAIN STYLESHEET
   Google Form-inspired Order Form + Product Grid
   ============================================ */

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

:root {
    --primary: #5746e3;
    --primary-light: #eeecfc;
    --primary-dark: #3d30a3;
    --bg: #f0ebf8;
    --card-bg: #ffffff;
    --text: #202124;
    --text-muted: #5f6368;
    --border: #dadce0;
    --error: #d93025;
    --success: #188038;
    --radius: 10px;
    --shadow: 0 2px 6px rgba(0,0,0,0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Announcement Bar */
.announcement-bar {
    background-color: var(--primary);
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.header-inner { 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 10px 0;
}
.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}
.nav-link:hover {
    color: var(--primary);
}
.nav-btn {
    background-color: var(--primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.nav-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.03);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #110e2e;
    color: #e2e8f0;
    border-top: none;
    padding: 60px 0 20px 0;
    margin-top: 60px;
    font-size: 14px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
}
.footer-col p {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 16px;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-col ul a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-col ul a:hover {
    color: var(--primary-light);
}
.newsletter-form {
    display: flex;
    gap: 8px;
}
.newsletter-input {
    flex-grow: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #334155;
    background-color: #1e293b;
    color: #fff;
    font-size: 13px;
    outline: none;
}
.newsletter-input:focus {
    border-color: var(--primary);
}
.newsletter-btn {
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}
.newsletter-btn:hover {
    background-color: var(--primary-dark);
}
.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom a {
    color: #64748b;
    text-decoration: none;
}
.footer-bottom a:hover {
    color: #94a3b8;
}


/* ============================================
   HOME – PRODUCT LISTING
   ============================================ */
.home-container { padding-top: 30px; padding-bottom: 30px; }
.hero-section { text-align: center; margin-bottom: 36px; }
.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(87,70,227,0.12);
    border-color: var(--primary);
}
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 10;
}
.badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-new { background: #e8f5e9; color: var(--success); }
.badge-low { background: #fff3e0; color: #e65100; }

.product-icon {
    font-size: 2.8rem;
    margin-bottom: 14px;
    line-height: 1;
}
.product-image-container {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 14px;
    border-radius: 8px;
    background-color: #fafbfc;
    border: 1px solid var(--border);
}
.product-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.product-card:hover .product-grid-img {
    transform: scale(1.05);
}
.product-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 2.8em;
}
.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}
.btn-buy {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 10px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.15s ease;
    margin-top: auto;
}
.btn-buy:hover {
    background: var(--primary-dark);
    transform: scale(1.03);
}

/* ============================================
   ORDER FORM – GOOGLE FORM STYLE
   ============================================ */
.form-page {
    background: var(--bg);
    min-height: calc(100vh - 100px);
    padding: 24px 16px;
}
.gform-container {
    max-width: 640px;
    margin: 0 auto;
}

/* Card */
.gform-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 12px;
    position: relative;
}

/* Header Card */
.gform-header-card {
    padding-top: 0;
    overflow: hidden;
}
.gform-accent-bar {
    height: 10px;
    background: var(--primary);
    margin: 0 -24px 20px -24px;
    border-radius: var(--radius) var(--radius) 0 0;
}
.gform-title {
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 6px;
}
.gform-description {
    font-size: 0.88rem;
    color: var(--text);
    margin-bottom: 12px;
}
.gform-required-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.required-star { color: var(--error); }

/* Labels */
.gform-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.5;
}

/* Input */
.gform-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    font-size: 0.88rem;
    font-family: var(--font);
    color: var(--text);
    background: transparent;
    outline: none;
    transition: border-color 0.2s ease;
}
.gform-input:focus {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 7px;
}
.gform-input::placeholder { color: #bdc1c6; }

/* Radio Options */
.gform-options { display: flex; flex-direction: column; gap: 2px; }
.gform-radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.gform-radio-option:hover { background: rgba(87,70,227,0.04); }

.gform-radio-option input[type="radio"] {
    display: none;
}
.gform-radio-circle {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    position: relative;
    margin-top: 1px;
    transition: border-color 0.2s ease;
}
.gform-radio-option input[type="radio"]:checked + .gform-radio-circle {
    border-color: var(--primary);
}
.gform-radio-option input[type="radio"]:checked + .gform-radio-circle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}
.gform-radio-text {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.5;
}

/* Order Form Product Selection Grid */
.gform-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.gform-product-card {
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}
.gform-product-card:hover {
    border-color: var(--primary);
}
.gform-product-card.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
}
.gform-product-card .product-badge {
    top: 8px;
    right: 8px;
}
.gform-product-card .badge {
    font-size: 0.6rem;
    padding: 2px 6px;
}
.gform-product-card .product-image-container {
    height: 100px;
    margin-bottom: 8px;
}
.gform-product-card .product-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.gform-product-card .product-name {
    font-size: 0.8rem;
    min-height: auto;
    margin-bottom: 6px;
    line-height: 1.3;
}
.gform-product-card .product-price {
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.btn-select {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    width: 100%;
}
.btn-select.selected {
    background-color: var(--primary);
    color: #fff;
}

/* T&C Card */
.gform-tc-card { border-left: 4px solid var(--primary); }
.gform-tc-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Error */
.gform-error {
    display: block;
    color: var(--error);
    font-size: 0.78rem;
    margin-top: 6px;
}

/* Actions */
.gform-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 40px;
}
.gform-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.gform-submit:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(87,70,227,0.25);
}
.gform-clear {
    color: var(--primary);
    font-size: 0.88rem;
    text-decoration: none;
    font-weight: 500;
}
.gform-clear:hover { text-decoration: underline; }

/* ============================================
   SUCCESS PAGE
   ============================================ */
.gform-success-card {
    text-align: center;
    padding: 40px 24px;
    overflow: hidden;
    padding-top: 0;
}
.success-icon { font-size: 3rem; margin-bottom: 16px; }
.success-message { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 12px; }
.success-order-number { font-size: 1rem; color: var(--text); margin-bottom: 16px; }
.success-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.detail-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.detail-image-card {
    position: relative;
    width: 100%;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #fafbfc;
    border: 1px solid var(--border);
    overflow: hidden;
}
.product-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.product-fallback-icon {
    font-size: 80px;
}
.detail-product-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}
.detail-price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.detail-price-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}
.stock-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.stock-badge.instock {
    background-color: #e8f5e9;
    color: var(--success);
}
.stock-badge.soldout {
    background-color: #ffebee;
    color: var(--error);
}
.detail-description-section {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}
.detail-description-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}
.detail-description-section p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}
.benefits-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.benefits-list li {
    font-size: 14px;
    color: var(--text-muted);
}
.detail-action-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}
.detail-btn-buy {
    background-color: var(--primary);
    color: #fff;
    padding: 12px 36px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s, transform 0.15s;
    display: inline-block;
}
.detail-btn-buy:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}
.detail-btn-disabled {
    background-color: #e0e0e0;
    color: #9e9e9e;
    padding: 12px 36px;
    border-radius: 24px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: not-allowed;
}
.detail-btn-back {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}
.detail-btn-back:hover {
    text-decoration: underline;
}
.trust-badge-container {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .product-card { padding: 18px 14px; }
    .product-icon { font-size: 2.2rem; margin-bottom: 10px; }
    .product-name { font-size: 0.82rem; min-height: auto; }
    .product-price { font-size: 0.95rem; margin-bottom: 12px; }
    .btn-buy { padding: 8px 22px; font-size: 0.82rem; }
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.88rem; }
    .home-container { padding-top: 20px; }
    .detail-grid-wrapper { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    .detail-image-card { height: 280px; }
    .trust-badge-container { flex-direction: column; gap: 8px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .form-page { padding: 16px 12px; }
    .gform-card { padding: 20px 16px; }
    .gform-accent-bar { margin: 0 -16px 16px -16px; }
    .gform-title { font-size: 1.35rem; }
    .gform-radio-text { font-size: 0.82rem; }
    .gform-radio-option { padding: 8px 4px; gap: 10px; }
}
