@import url('https://fonts.cdnfonts.com/css/long-shot');

/* source-sans-3-latin-500-normal */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url(https://cdn.jsdelivr.net/fontsource/fonts/source-sans-3@latest/latin-500-normal.woff2) format('woff2'), url(https://cdn.jsdelivr.net/fontsource/fonts/source-sans-3@latest/latin-500-normal.woff) format('woff');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f7f7;
    color: #6b7280;
    line-height: 1.5;
}

.header {
    background-image: url('https://www.chunkinstudio.com/image/About%20Me.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 2rem 0;
    border-bottom: 0.5px solid #5f5f5f;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-word {
    font-size: 1.8rem;
    font-weight: bold;
    color: #d9a91c;
    text-decoration: none;
    margin: 0 auto;
    font-family: 'Long Shot', 'san serif';
    transform: scaleX(1.1);
    letter-spacing: 1px;
}

.cart a {
    color: #D9A91C;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Long Shot', 'san serif';
}

.cart a:hover {
    color: #ffcc00;
}

/* Hiệu ứng rung */
@keyframes rotate-swing {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(8deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.cart-icon i.swing {
    animation: rotate-swing 0.6s ease;
    transform-origin: center center;
    display: inline-block;
}

/* Thông báo thêm sản phẩm */
.cart-notification {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: #D9A91C;
    color: #000;
    font-weight: 700;
    padding: 12px 20px 16px;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

.cart-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.cart-responsive {
    display: none;
    font-size: 28px;
    color: #D9A91C;
    cursor: pointer;
}

.empty-cart-message {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 1.2rem;
}

.start-shopping-button {
    display: block;
    width: 80%;
    margin: 1rem auto;
    padding: 0.75rem;
    background-color: #D9A91C;
    color: rgb(0, 0, 0);
    text-align: center;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 800;
}

.start-shopping-button:hover {
    background-color: #ffcc00;
}

#cart-total-section {
    display: none;
    /* Mặc định ẩn, sẽ hiện khi có sản phẩm */
}

/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    /* Hidden by default */
    width: 400px;
    /* Fixed width */
    height: 100%;
    /* Full height */
    background-color: #1a1a1a;
    color: #D9A91C;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2000;
    transition: right 0.3s ease;
    /* Smooth slide-in */
    overflow-y: auto;
    /* Scroll if content overflows */
}

.cart-sidebar.show {
    right: 0;
    /* Slide in from right */
}

.cart-sidebar h2 {
    margin: 0 0 20px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Long Shot', 'san serif';
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #D9A91C;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 10px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
}

.cart-item-details a:hover {
    text-decoration: underline;
}

.cart-item-details p {
    margin: 5px 0;
    font-size: 14px;
    color: #ccc;
}

.cart-item-price {
    font-size: 16px;
    font-weight: bold;
    margin-right: 10px;
    color: white;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-item-controls button {
    background: none;
    border: 1px solid #ccc;
    color: white;
    font-size: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-controls span {
    font-size: 16px;
    width: 30px;
    text-align: center;
    color: white;
}

.cart-item-controls .remove-item {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.close-cart {
    background: none;
    border: none;
    color: #D9A91C;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Cart Total and Checkout Button */
.cart-total {
    margin-top: 20px;
    padding-top: 10px;
    color: white;
}

.cart-total p {
    margin: 5px 0;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
}

.cart-total .subtext {
    font-size: 12px;
    color: #ccc;
}

.checkout-button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #D9A91C;
    color: black;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    margin-top: 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.checkout-button:hover {
    background-color: #ffcc00;
}

/* Overlay for clicking anywhere to close */
.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

.cart-overlay.show {
    display: block;
}

.container-all {
    background-color: #000;
    width: 100%;
    position: relative;
}

.main-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 4rem;
    padding: 2rem;
    min-height: calc(100vh - 80px);
    position: relative;
}

@media (max-width: 1024px) {
    .main-container:before {
        display: none;
    }
}

.payment-section {
    padding: 2rem;
    height: fit-content;
    box-sizing: border-box;
}

/* Order Summary */
.order-summary {
    padding-left: 2rem;
    position: sticky;
    top: 150px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.order-summary h2 {
    color: #D9A91C;
}

.summary-card {
    background: rgba(188, 188, 188, 0.2);
    border: 1px solid #afafaf;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.product-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-image {
    position: relative;
    flex-shrink: 0;
}

.product-image img {
    width: 5rem;
    height: 5rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.quantity-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: #6b7280;
    color: white;
    font-size: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-details {
    flex: 1;
}

.product-details h3 {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.product-details p {
    font-size: 0.875rem;
    color: #6b7280;
}

.product-price {
    font-weight: 500;
    color: #D9A91C;
}

/* Discount Section */
.discount-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.discount-input {
    display: flex;
}

.discount-input .form-input {
    border-radius: 0.375rem 0 0 0.375rem;
    border-right: none;
}

.btn-apply {
    background: #D9A91C;
    border: 1px solid #d1d5db;
    border-left: none;
    border-radius: 0 0.375rem 0.375rem 0;
    padding: 0 1.5rem;
    font-size: 0.875rem;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Long Shot', 'san serif';
}

.btn-apply:hover {
    background-color: #ffcc00;
}

/* Total Section */
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.125rem;
    font-weight: 500;
    color: #ffffff;
}

.total-price {
    text-align: right;
}

.currency {
    font-size: 0.75rem;
    color: #6b7280;
}

.amount {
    font-size: 1.125rem;
    font-weight: 500;
    color: #ffffff;
    margin-left: 0.25rem;
}

.message {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

.success {
    color: #4CAF50;
    font-weight: bold;
}

.error {
    color: #f44336;
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.express-checkout {
    margin-bottom: 2rem;
}

.express-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.express-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    padding: 0 1rem;
}

.form-section {
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row.three-col {
    grid-template-columns: 2fr 1fr 1fr;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: #000;
    border: 1px solid #5f5f5f;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    color: #fff;
}

.form-input:focus {
    outline: none;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox {
    width: 16px;
    height: 16px;
    background-color: #000;
    border: 1px solid #5f5f5f;
    cursor: pointer;
    border-radius: 2px;
}

.checkbox:checked {
    background-color: #000;
    border-color: #d9a91c;
    border-radius: 2px;
}

.checkbox {
    appearance: none;
    position: relative;
}

.checkbox:checked::after {
    content: '✔';
    color: #d9a91c;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.payment-method {
    padding: 1rem;
    border: 0.75px solid #5f5f5f;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.payment-method.active {
    border-color: #5f5f5f;
}

.payment-method-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.payment-method-title {
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icons {
    display: flex;
    gap: 0.25rem;
}

.card-icon {
    height: 20px;
    width: auto;
}

.more-cards {
    background: #374151;
    color: white;
    font-size: 0.75rem;
    height: 20px;
    width: auto;
    border-radius: 0.25rem;
}

.payment-form {
    margin-top: 1rem;
    display: none;
}

.payment-method.active .payment-form {
    display: block;
}

.radio {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.product-item:last-child {
    border-bottom: none;
}

.product-details {
    flex: 1;
    margin-left: 20px;
}

.product-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.product-price {
    font-weight: 600;
    color: #c7c7c7;
}

.quantity-badge {
    background: #de3a21;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    position: absolute;
    top: -8px;
    right: -10px;
}

.discount-section {
    margin: 1.5rem 0;
    padding-top: 1.5rem;
}

.discount-input-group {
    display: flex;
    gap: 0.5rem;
}

.discount-input {
    flex: 1;
}

.apply-btn {
    padding: 0.75rem 1rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.apply-btn:hover {
    background: #4b5563;
}

.cost-summary {
    padding-top: 1.5rem;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.cost-row.total {
    font-weight: 600;
    font-size: 1rem;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.complete-order-btn {
    width: 100%;
    padding: 1rem;
    background: #d9a91c;
    color: black;
    border: none;
    border-radius: 6px;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 2rem;
    transition: background-color 0.2s;
    font-family: 'Long Shot', 'san serif';
}

.complete-order-btn:hover {
    background: #facc15;
    transform: scaleY(1.02);
}

.policy-divider {
    border: none;
    border-top: 1px solid #444;
    margin: 20px 0;
}

.policy-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 14px;
}

.policy-links a {
    color: #7d7d7d;
    text-decoration: none;
}

.policy-links a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .order-summary {
        position: static;
        order: -1;
    }
}

/* Stripe */
.payment-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 400px;
    max-width: 100%;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-element {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 40px;
    font-size: 16px;
}

.submit-btn {
    padding: 12px;
    background-color: #2b6cb0;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #3182ce;
}

.error-message {
    color: red;
    font-size: 14px;
}