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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

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

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2c5f4e 0%, #3d7a63 100%);
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

main {
    padding: 60px 0;
}

.page-title {
    font-size: 2.4rem;
    margin: 0 0 40px;
    text-align: center;
    color: #101828;
}

.page-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

/* Products Page */
.products {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* Styles from checkout.php */

.secure-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f0fdf4;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
    z-index: 1100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .secure-badge {
        top: 75px;
        right: 10px;
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    align-items: start;
}

.checkout-form {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    width: 24px;
    height: 24px;
    color: #8b5cf6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.order-summary {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #111827;
}

.summary-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.25rem;
}

.summary-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-quantity {
    font-size: 0.875rem;
    color: #6b7280;
}

.item-price {
    font-weight: 700;
    color: #8b5cf6;
    white-space: nowrap;
}

.summary-totals {
    padding-top: 1.25rem;
    border-top: 2px solid #e5e7eb;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.summary-row.total {
    font-size: 1.375rem;
    font-weight: 800;
    color: #8b5cf6;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.security-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #0c4a6e;
}

.security-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Legal Pages */
.legal-page {
    padding: 80px 0;
}

.legal-header {
    text-align: center;
    margin-bottom: 60px;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e4436;
    margin-bottom: 16px;
}

.legal-header p {
    color: #6c757d;
    font-size: 1rem;
}

.legal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 4px 12px rgba(44, 95, 78, 0.04);
}

.legal-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e4436;
    margin-top: 40px;
    margin-bottom: 20px;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c5f4e;
    margin-top: 30px;
    margin-bottom: 16px;
}

.legal-content p {
    margin-bottom: 16px;
}

.legal-content ul {
    margin-bottom: 20px;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 12px;
}

.legal-content strong {
    color: #1e4436;
}

.update-date {
    display: inline-block;
    background: rgba(212, 163, 115, 0.15);
    color: #d4a373;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Order Tracking */
.tracking-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.tracking-card .header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.tracking-card .header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
}

.tracking-card .content {
    padding: 40px 30px;
}

.btn-track {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-track:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.order-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.order-id {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 16px;
    color: #1e293b;
    font-weight: 600;
}

.items-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1e293b;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 10px;
}

.item-info {
    flex: 1;
}

.item-details {
    font-size: 14px;
    color: #64748b;
}

/* Payment Success */

.success-container {
    background: white;
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: scaleIn 0.5s ease 0.2s both;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

@keyframes scaleIn {
    from {
        transform: scale(0) rotate(180deg);
    }
    to {
        transform: scale(1) rotate(0deg);
    }
}

.success-icon svg {
    width: 60px;
    height: 60px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.checkmark {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 0.5s ease 0.5s forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.success-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.success-container .subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.success-container .order-info {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 2rem;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #10b981;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.order-info-row:last-child {
    border-bottom: none;
    padding-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #10b981;
}

.order-info-label {
    font-weight: 600;
    color: #047857;
}

.order-info-value {
    font-weight: 700;
    color: #065f46;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: #7c3aed;
    stroke-width: 2;
}

.feature-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.info-text {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 1.5rem;
}

/* Payment Failed */
.error-container {
    background: white;
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.6s ease;
}

.error-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: shake 0.5s ease;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.error-icon svg {
    width: 60px;
    height: 60px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.error-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #dc2626;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.error-container .subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.error-info {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    padding: 2rem;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #ef4444;
}

.error-title {
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.error-message {
    color: #dc2626;
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.error-reasons {
    text-align: left;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #fecaca;
}

.error-reasons-title {
    font-weight: 700;
    color: #7f1d1d;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.error-reasons ul {
    list-style: none;
    padding: 0;
}

.error-reasons li {
    padding: 0.5rem 0;
    color: #991b1b;
    display: flex;
    align-items: start;
    gap: 0.5rem;
    font-size: 0.9375rem;
}

.error-reasons li::before {
    content: "•";
    color: #dc2626;
    font-weight: 900;
    font-size: 1.25rem;
}

.help-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #3b82f6;
}

.help-title {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.help-text {
    color: #1e3a8a;
    font-size: 0.9375rem;
    line-height: 1.6;
}


@media (max-width: 968px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .legal-content {
        padding: 32px 24px;
    }

    .legal-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .tracking-card .content {
        padding: 30px 20px;
    }

    .tracking-card .header h1 {
        font-size: 24px;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .success-container {
        padding: 2rem 1.5rem;
    }

    .success-container h1 {
        font-size: 2rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .order-info-row:last-child {
        font-size: 1.25rem;
    }

    .error-container {
        padding: 2rem 1.5rem;
    }

    .error-container h1 {
        font-size: 2rem;
    }
}