/* ============================================================
   GLOBAL & SHARED STYLES
   ============================================================ */
* {
    box-sizing: border-box;
    font-family: YekanBakh;
}

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

    border-radius: 2px;
    box-shadow: 0 5px 12px rgba(126, 142, 177, .2);
}

.shop_title_box {
    display: flex;
    flex-direction: column;
}

.shop_title {
    font-weight: 600;
}

.shop_title_desc {
    color: #aaa;
    font-size: .7rem;
}

.filter-sort-section {

    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 1em;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.required {
    color: #f44336;
}

/* ============================================================
   SHOP MAIN (shopmain.tpl)
   ============================================================ */
.filter-sort-sectionB {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;

}

.filter-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    box-shadow: inset 0 0 0.25rem #eee;
}

.filter-select:focus {
    outline: none;
    border-color: #0280b2;
}

.featured-section {
    margin-bottom: 50px;
}

.featured-section h2,
.latest-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0280b2;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 1em;
}

.product-card {
    background: white;
    border: 1px solid #E7EAF0;
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(50, 201, 138, 0.12);
    border-color: #32c98a;
    transform: translateY(-2px);
}

.product-card.featured {
    border: 2px solid #32c98a;
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}

.product-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 0;
    background: #F9FAFB;
}

.no-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    margin-bottom: 0;
    color: #999;
    font-size: 0.875rem;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-info h3 {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0;
    min-height: 2.8rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info h3 a {
    text-decoration: none;
    color: #181E25;
    transition: color 0.2s;
}

.product-info h3 a:hover {
    color: #32c98a;
}

.product-price {
    margin-bottom: 10px;
}

.original-price {
    font-size: 0.875rem;
    line-height: 1.25rem;
    text-decoration: line-through;
    color: #ACB8C4;
}

.current-price {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: #32c98a;

    @media (min-width: 1024px) {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

}

.product-meta {
    margin-bottom: 15px;
}

.in-stock {
    color: #2e7d32;
    font-weight: 600;
    display: inline-block;
    padding: 4px 12px;
    background: #4caf50;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
}

.out-of-stock {
    color: white;
    font-weight: 600;
    display: inline-block;
    padding: 4px 12px;
    background: #dc3545;
    font-size: 12px;
    border-radius: 4px;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
}

.limited-stock {
    display: inline-block;
    padding: 4px 12px;
    background: #ffc107;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
}

.add-to-cart {
    color: white;
    border: none;
    padding: 12px 0;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    transition: background 0.3s ease;
    margin-top: auto;
    width: 100%;
}

.out-of-stock-btn {
    background: #eee;
    color: #aaa;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: .9rem;
    font-weight: 300;
    cursor: not-allowed;
    margin-top: auto;
    width: 100%;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.page-link {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;

    transition: all 0.3s ease;
}

.page-link:hover {
    background: #f0f0f0;
}

.page-link.active {
    background: #0280b2;
    color: white;
    border-color: #0280b2;
}

.page-ellipsis {
    padding: 10px 15px;
    color: #999;
    display: inline-block;
    user-select: none;
}


/* Toast Notifications */
#popup-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: transparent;
    display: none;
    z-index: 99999;
    pointer-events: none;
}

#popup-overlay.active {
    display: block;
}

#popup-box {
    background: #64b40d;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: all;
}

#popup-overlay.active #popup-box {
    transform: translateY(0);
    opacity: 1;
}

#popup-message {
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    margin: 0;
    text-align: right;
    direction: rtl;
}

#popup-ok {
    display: none;
}

@keyframes slideOut {
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}


/* ============================================================
   PRODUCT PAGE (product.tpl)
   ============================================================ */
.breadcrumb {
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #0280b2;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.product-full-description {
    font-size: 14px;
    color: #67788E;
    line-height: 1.8;
    white-space: pre-line;
}

.product-full-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.product-full-description ul,
.product-full-description ol {
    margin: 1rem 0;
    padding-right: 1.5rem;
}

.product-full-description li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.product-full-description h1,
.product-full-description h2,
.product-full-description h3,
.product-full-description h4 {
    color: #181E25;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.product-full-description h1 {
    font-size: 1.5rem;
}

.product-full-description h2 {
    font-size: 1.3rem;
}

.product-full-description h3 {
    font-size: 1.1rem;
}

.product-full-description strong,
.product-full-description b {
    color: #181E25;
    font-weight: 600;
}

.product-full-description a {
    color: #32c98a;
    text-decoration: underline;
}

.product-full-description a:hover {
    color: #2ab87c;
}

.product-full-description img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1rem 0;
}

.product-full-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #F9FAFB;
    border-radius: 0.5rem;
    overflow: hidden;
}

.product-full-description table th,
.product-full-description table td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid #E7EAF0;
}

.product-full-description table th {
    background: #F3F4F6;
    font-weight: 600;
    color: #181E25;
}

.product-full-description table tr:last-child td {
    border-bottom: none;
}

.product-reviews-section {
    font-size: 14px;
    color: #67788E;
}

.product-reviews-section .review-item {
    white-space: pre-line;
}

.product-reviews-section .review-content {
    white-space: pre-line;
    line-height: 1.8;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-gallery {
    position: sticky;
    top: 20px;
}

.gallery-main {
    margin-bottom: 15px;
}

.gallery-image {
    display: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-image.active {
    display: block;
}

.gallery-image img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumbnail {
    cursor: pointer;
    flex-shrink: 0;
    width: 4rem; /* 64px */
    height: 4rem; /* 64px */
    background-color: #ffffff;
    border-radius: 0.75rem; /* 12px */
    padding: 0.375rem; /* 6px */
    border-width: 2px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
    border-color: transparent;
}

.thumbnail:hover {
    border-color: #E7EAF0;
}

.thumbnail.active {
    border-color: #32c98a;
    box-shadow: 0 0 0 2px rgba(50, 201, 138, 0.2);
}

/* Responsive sizes for thumbnails */
@media (min-width: 640px) {
    .thumbnail {
        width: 5rem; /* 80px */
        height: 5rem; /* 80px */
        border-radius: 1rem; /* 16px */
        padding: 0.5rem; /* 8px */
    }
}

@media (min-width: 1024px) {
    .thumbnail {
        width: 6rem; /* 96px */
        height: 6rem; /* 96px */
    }
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0.5rem;
}

.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-title {
    font-size: 1.8rem;
    margin: 0;

}

.sku {
    color: #666;
    font-size: 0.9rem;
}

.type-badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.type-badge.digital {
    background: #e3f2fd;
    color: #1976d2;
}

.type-badge.physical {
    background: #f3e5f5;
    color: #7b1fa2;
}

.stock-badge {
    display: inline-block;
    padding: 6px 15px;
    font-size: 0.9rem;
    border-radius: 4px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.stock-badge.limited-stock {
    background: #fff3e0;
    color: #e65100;
}

.stock-badge.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

.product-price-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.discount-badge {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    background: #FA5C64;

}

.product-short-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

.product-purchase {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quantity-selector {
display: flex; 
padding-left: 1rem;
padding-right: 1rem; 
align-items: center; 
border-radius: 1rem; 
border-width: 1px; 
background-color: #ffffff; 
border-color: #E7EAF0;
justify-content: center;
}

.qty-btn {
display: flex; 
justify-content: center; 
align-items: center; 
width: 2.5rem; 
height: 3.5rem; 
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 300ms; 
cursor: pointer; 
color: #67788E;
}

.qty-btn:hover {
 color: #32c98a;
}

#product-quantity {
width: 3rem; 
font-size: 1.125rem;
line-height: 1.75rem; 
font-weight: 700; 
text-align: center; 
color: #181E25;

}

#product-quantity:focus {
    outline: none;
}


#product-quantity {
    -moz-appearance:textfield;
}
#product-quantity:hover,
#product-quantity:focus {
    -moz-appearance: number;
}

#product-quantity::-webkit-outer-spin-button,
#product-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
}


.qty-input {
    -moz-appearance:textfield;
}
.qty-input:hover,
.qty-input:focus {
    -moz-appearance: number;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}



.add-to-cart-btn {
    display: flex;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
    flex: 1 1 0%;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    border-radius: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
    cursor: pointer;
    background: #32c98a;

    @media (min-width: 640px) {
        padding-top: 1rem;
        padding-bottom: 1rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        gap: 0.75rem;
        border-radius: 1rem;
    }

    :hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        background: #2ab87c;
    }

}

.product-additional-info {
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.product-additional-info p {
    margin: 5px 0;
    color: #666;
}

.product-additional-info a {
    color: #0280b2;
    text-decoration: none;
}

.product-additional-info a:hover {
    text-decoration: underline;
}

.product-tabs {
    margin-bottom: 40px;
}

.tabs-header {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #0280b2;
}

.tab-btn.active {
    color: #0280b2;
    border-bottom-color: #0280b2;
}

.tab-panel {
    display: none;
    line-height: 1.8;
}

.tab-panel.active {
    display: block;
}

.related-products-section {
    margin-top: 40px;
}

.related-products-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #181E25;
    margin-bottom: 24px;
    padding: 0;
    border: none;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .related-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.related-product {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #E7EAF0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-product:hover {
    box-shadow: 0 4px 12px rgba(50, 201, 138, 0.12);
    border-color: #32c98a;
    transform: translateY(-2px);
}

.related-product a {
    text-decoration: none;
}

.related-product img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.75rem;
    background: #F9FAFB;
}

.related-product h4 {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 600;
    color: #181E25;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-product h4 a {
    color: #181E25;
    transition: color 0.2s;
}

.related-product h4 a:hover {
    color: #32c98a;
}

.related-price {
    font-size: 1rem;
    font-weight: 700;
    color: #32c98a;
    margin: 0;
}

@media (max-width: 640px) {
    .related-product h4 {
        font-size: 0.8rem;
        min-height: 2.4rem;
    }
    
    .related-price {
        font-size: 0.875rem;
    }
    
    .related-product {
        padding: 0.75rem;
    }
}

.reviews-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.reviews-section h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0280b2;
}

.reviews-section h3 {
    font-size: 1.3rem;
    margin: 30px 0 20px 0;

}

.rating-summary {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 40px;
}

.rating-overview {
    text-align: center;
}

.rating-number {
    font-size: 4rem;
    font-weight: bold;
    color: #0280b2;
    line-height: 1;
}

.rating-stars {
    font-size: 2rem;
    color: #ffa000;
    margin: 10px 0;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;
    gap: 15px;
}

.rating-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffa000 0%, #ff6f00 100%);
    transition: width 0.3s ease;
}

.review-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.review-form .form-group {
    margin-bottom: 20px;
}

.rating-input {
    display: flex;
    gap: 5px;
    font-size: 2.5rem;
    cursor: pointer;
}

.rating-star {
    color: #e0e0e0;
    transition: color 0.2s;
    cursor: pointer;
}

.rating-star:hover,
.rating-star.active {
    color: #ffa000;
}

.review-form input[type="text"],
.review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.review-form input:focus,
.review-form textarea:focus {
    outline: none;
    border-color: #0280b2;
}

.submit-review-btn {
    background: #0280b2;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-review-btn:hover {
    background: #026a94;
}

#review-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

#review-message.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

#review-message.error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.reviews-list {
    margin-top: 40px;
}

.review-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

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

.review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.verified-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.star {
    color: #e0e0e0;
    font-size: 1.2rem;
}

.star.filled {
    color: #ffa000;
}

.vote-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.vote-btn:hover:not(:disabled) {
    background: #e0e0e0;
}

.vote-btn.active {
    background: #0280b2;
    color: white;
    border-color: #0280b2;
}

/* Review Images */
.review-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.review-image-link img,
#image-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
}

/* Responsive Product */
@media (max-width: 768px) {
    .product-details {
        grid-template-columns: 1fr;
    }

    .product-details,
    .product-tabs,
    .reviews-section {
        padding: 15px;
    }

    .product-gallery {
        position: static;
    }

    .rating-summary {
        grid-template-columns: 1fr;
        text-align: center;
    }
}


/* ============================================================
   CART & CHECKOUT (cart.tpl, checkout.tpl, etc)
   ============================================================ */
.cartColumns {
    display: flex;
    gap: 1em;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.cartData {
    background-color: #f4fbff;
    border: 1px solid #e8f6fe;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.02);
    padding: 15px;
    border-radius: 12px;
    flex: 0 0 280px;
    position: sticky;
    top: 200px;
    align-self: flex-start;
}

.cart_items {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

@media (max-width: 768px) {
    .cartColumns {
        flex-direction: column;
        align-items: stretch;
    }

    .cartData,
    .cart_items {
        width: 100%;
        flex: none;
        display: block;
    }
}

.cartCoupon {
    margin-top: 1em;

    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: .5em;
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.cartCoupon input {

    border: 1px solid #eee;
    box-shadow: inset 0 0 0.25rem #eee;
    padding: 15px;
    border-radius: 8px;
    flex: 1;
}

.cartCoupon button {
    background: #31241B;
    color: white;
    border: none;
    padding: 15px 25px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
}

.checkout-btn {
    width: 100%;
    background: #428bca;
    color: white;
    text-shadow: -1px 1px 2px rgba(51, 51, 51, .5);
    border: none;
    padding: 15px 25px;
    text-align: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.checkout-btn:hover {
    background-color: #1976d2;
}

.hasCoupon {
    background-color: #f3fff2;
    margin-bottom: .5em;
    padding: 10px 15px;
    border-radius: 12px;
    color: #4caf50;
    display: flex;
    flex-direction: row;
    gap: 1em;
    align-items: center;
}

.remove-coupon-btn {
    background-color: #31241B;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: .8rem;
    padding: 6px 10px;
}

.remove-coupon-btn:hover {
    background-color: #ff232b;
}

.totalAmount {
    background-color: #31241B;
    margin: 1em 0 .25em 0;
    border-radius: 8px;
    padding: 15px 10px;
    font-weight: 600;
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cartAmounts {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cartAmountsLeft {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stockIssues {
    background-color: #fff2f0;
    color: #f83736;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: .5em;
}

/* Checkout Steps */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
}

.step {
    width: fit-content;
    border-radius: 6px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: #bbb;
    padding: 8px 10px;
}

.step.active {
    background: #4891d1;
    color: white;
}

.step-line {
    width: 30px;
    height: 3px;
    background: #f0f0f0;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.checkout-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.checkout-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #0280b2;
}

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

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;

}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0280b2;
}

.shipping-option,
.payment-option {
    display: flex;
    align-items: start;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.shipping-option:hover,
.payment-option:hover {
    border-color: #0280b2;
    background: #f5f9ff;
}

.option-content {
    flex: 1;
}

.option-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.option-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.order-summary-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.order-total-row.total-row {
    font-size: 1.3rem;
    font-weight: bold;
    color: #0280b2;
    border-bottom: none;
    padding-top: 15px;
}

.place-order-btn {
    width: 100%;
    background: #0280b2;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.3s;
}

.place-order-btn:hover {
    background: #026a94;
}

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

/* ============================================================
   EXTRACTED FROM cart.tpl
   ============================================================ */
@media (max-width: 768px) {
    .cart-header h1 {
        font-size: 1.8rem;
    }

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

    .cart-table {
        font-size: 0.9rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 12px 8px;
    }

    .item-image img,
    .no-image-small {
        width: 70px;
        height: 70px;
    }

    .item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Toast notification */
#popup-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: transparent;
    display: none;
    z-index: 99999;
    pointer-events: none;
}

#popup-overlay.active {
    display: block;
}

#popup-box {
    background: #64b40d;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: all;
}

#popup-overlay.active #popup-box {
    transform: translateY(0);
    opacity: 1;
}

#popup-message {
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
    margin: 0;
    text-align: right;
    direction: rtl;
}

#popup-ok {
    display: none;
}

@keyframes slideOut {
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

/* Empty Cart */
.cart-empty-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;

    border-radius: 2px;
    box-shadow: 0 5px 12px rgba(126, 142, 177, .2);
    color: #999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cart-empty-desc {
    font-size: .7rem;
    color: #bbb;
}


/* ============================================================
   EXTRACTED FROM checkout_step2_physical.tpl
   ============================================================ */
.checkout-container-step2 {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 40px;
}

.checkout-header h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-weight: 700;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.step {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #999;
    transition: all 0.3s;
}

.step.active {
    background: linear-gradient(135deg, #0280b2 0%, #026a94 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 128, 178, 0.3);
    transform: scale(1.1);
}

.step.completed {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.step-line {
    width: 80px;
    height: 3px;
    background: #e0e0e0;
    transition: all 0.3s;
}

.step-line.completed {
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
}

.error-message {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-right: 5px solid #f44336;
    animation: slideIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.province-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #0280b2;
}

.province-info svg {
    color: #0280b2;
    flex-shrink: 0;
}

.province-info>div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.province-info .label {
    font-size: 0.9rem;
    color: #555;
}

.province-info strong {
    font-size: 1.1rem;
    color: #0280b2;
}

.edit-link-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #0280b2;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    transition: all 0.2s;
}

.edit-link-inline:hover {
    background: #0280b2;
    color: white;
    transform: translateX(-3px);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0280b2;
}

.section-title svg {
    color: #0280b2;
}

.section-title h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #1a1a1a;
}

.shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.shipping-option {
    display: flex;
    align-items: start;
    gap: 15px;
    padding: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    position: relative;
    overflow: hidden;
}

.shipping-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #f5f9ff, transparent);
    transition: width 0.3s;
}

.shipping-option:hover {
    border-color: #0280b2;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(2, 128, 178, 0.15);
}

.shipping-option:hover::before {
    width: 100%;
}

.shipping-option input[type="radio"] {
    margin-top: 5px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #0280b2;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.shipping-option-cod {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ff9800;
}

.shipping-option-cod::before {
    background: linear-gradient(90deg, #ffe0b2, transparent);
}

.shipping-option-cod:hover {
    border-color: #f57c00;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25);
}

.option-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.option-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.option-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;

}

.option-meta svg {
    width: 16px;
    height: 16px;
}

.option-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: #0280b2;
}

.badge-cod {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
}

.shipping-free {
    color: #2e7d32;
    font-weight: 700;
}

.shipping-cod {
    color: #f57c00;
    font-weight: 700;
}

.shipping-cost {
    color: #0280b2;
    font-weight: 700;
}

.shipping-pending {
    color: #ff9800;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.no-shipping-message {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe082 100%);
    border-radius: 12px;
    color: #856404;
    font-weight: 600;
    border: 2px solid #ffc107;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-back:hover {
    color: #0280b2;
    background: #f5f9ff;
    gap: 12px;
}

.btn-submit {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0280b2 0%, #026a94 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(2, 128, 178, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 128, 178, 0.4);
    gap: 14px;
}

.btn-submit:active {
    transform: translateY(0);
}

.summary-section {
    position: sticky;
    top: 20px;
}

.summary-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.summary-box h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #1a1a1a;
    padding-bottom: 15px;
    border-bottom: 3px solid #0280b2;
}

.summary-box h3 svg {
    color: #0280b2;
}

.cart-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-name {
    font-weight: 600;
    color: #1a1a1a;
}

.item-price {
    font-weight: 700;
    color: #0280b2;
}

.badge-physical {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border: 1px solid #f57c00;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
    width: fit-content;
    font-weight: 600;
}

.summary-totals {
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.95rem;
}

.summary-row span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
}

.summary-row p {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    margin: 0;
    color: #2e7d32;
}

.summary-row p strong {
    color: #2e7d32;
}

.shipping-row {
    color: #0280b2;
    font-weight: 600;
}

.summary-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #0280b2, transparent);
    margin: 15px 0;
}

.total-row {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0280b2;
    padding-top: 15px;
}

.summary-note {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #495057;
    display: flex;
    align-items: start;
    gap: 10px;
    line-height: 1.5;
}

.summary-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #868e96;
}

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

    .summary-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-header h1 {
        font-size: 1.6rem;
    }

    .step {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-line {
        width: 50px;
    }

    .province-info {
        flex-wrap: wrap;
    }

    .form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-submit,
    .btn-back {
        width: 100%;
        justify-content: center;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   EXTRACTED FROM checkout_step1.tpl
   ============================================================ */
.shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;

    border-radius: 2px;
    box-shadow: 0 5px 12px rgba(126, 142, 177, .2);
}

.shop_title_box {
    display: flex;
    flex-direction: column;
}

.shop_title {
    font-weight: 600;
}

.shop_title_desc {
    color: #aaa;
    font-size: .7rem;
}

.filter-sort-section {

    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.cartColumns {
    display: grid;
    grid-template-columns: 1fr 300px;
    margin-top: 1em;
    gap: 1em;
}

.cartData {
    background-color: #f4fbff;
    border: 1px solid #e8f6fe;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.02);
    padding: 15px;
    border-radius: 12px;
    position: sticky;
    top: 200px;
    align-self: flex-start;
}

.cart_items form {
    display: flex;
    flex-wrap: wrap;
}

/* ============================================================
   EXTRACTED FROM checkout.tpl
   ============================================================ */
.digital-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #0280b2;
    text-align: center;
    padding: 30px;
}

.notice-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.digital-notice h3 {
    color: #0280b2;
    font-size: 1.3rem;
    margin: 0 0 15px 0;
}

.digital-notice p {
    color: #666;
    margin: 8px 0;
    line-height: 1.6;
}

/* ============================================================
   EXTRACTED FROM cart.tpl (Remaining)
   ============================================================ */
* {
    box-sizing: border-box;
}

.cartColumns {
    display: flex;
    gap: 1em;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.cartData {
    background-color: #f4fbff;
    border: 1px solid #e8f6fe;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.02);
    padding: 15px;
    border-radius: 12px;

    flex: 0 0 280px;

    position: sticky;
    top: 200px;
    align-self: flex-start;

}




/* Mobile */
@media (max-width: 768px) {
    .cartColumns {
        flex-direction: column;
        align-items: stretch;
    }

    .cartData,
    .cart_items {
        width: 100%;
    }

    .cartData {
        flex: none;
    }
}

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


    border-radius: 2px;
    box-shadow: 0 5px 12px rgba(126, 142, 177, .2);
}

.shop_title_box {
    display: flex;
    flex-direction: column;
}

.shop_title {
    font-weight: 600;
}

.shop_title_desc {
    color: #aaa;
    font-size: .7rem;
}

.cartCoupon {
    margin-top: 1em;

    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: .5em;
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.cartCoupon input {

    border: 1px solid #eee;
    box-shadow: inset 0 0 0.25rem #eee;
    padding: 15px;
    border-radius: 8px;
    flex: 1;
}

.cartCoupon button {
    background: #31241B;
    color: white;
    border: none;
    padding: 15px 25px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    transition: background 0.3s ease;
    display: inline-block;
}


/* Checkout Button */
.checkout-btn {
    width: 100%;
    background: #428bca;
    color: white;
    text-shadow: -1px 1px 2px rgba(51, 51, 51, .5);
    border: none;
    padding: 15px 25px;
    text-align: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    transition: background 0.3s ease;
    display: inline-block;
}

.checkout-btn:hover {
    background-color: #1976d2;
}

/* Disabled Checkout Button */
.checkout-btn-disabled {
    width: 100%;
    background: #e0e0e0;
    color: #9e9e9e;
    border: none;
    padding: 18px;
    border-radius: 10px;
    cursor: not-allowed;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0.7;
}

.gatewayNote {
    background-color: #4891d1;
    text-align: center;
    padding: 5px 0;
    color: #cfe7ff;
    font-size: .8rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}


/* Coupon area */
.hasCoupon {
    background-color: #f3fff2;
    margin-bottom: .5em;
    padding: 10px 15px;
    border-radius: 12px;

    color: #4caf50;
    text-shadow: 0 0 .3px #4caf50;

    display: flex;
    flex-direction: row;
    gap: 1em;
    align-items: center;
}

.remove-coupon-btn {
    background-color: #31241B;
    color: #fff;
    border: none;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: .8rem;
    transition: background 0.3s ease;
    display: inline-block;
    padding: 6px 10px;
}

.remove-coupon-btn:hover {
    background-color: #ff232b;
    color: #fff;
}

.totalAmount {
    background-color: #31241B;
    margin: 1em 0 .25em 0;
    border-radius: 8px;
    padding: 15px 10px;
    font-weight: 600;
    color: #fff;
    font-size: 1.4rem;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: .5em;
    align-items: center;
}

.cartAmounts {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cartAmountsLeft {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stockIssues {
    background-color: #fff2f0;
    color: #f83736;
    padding: 15px;
    border-radius: 12px;

    margin-bottom: .5em;
}

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

.cart-header {
    text-align: center;
    margin-bottom: 40px;
}

.cart-header h1 {
    font-size: 2.2rem;
    margin: 0 0 10px 0;
    color: #1a1a1a;
    font-weight: 700;
}

.cart-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Mixed Cart Warning */
.alert {
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-right: 5px solid;
    animation: slideDown 0.4s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
    color: #c62828;
}

.alert strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.alert p {
    margin: 8px 0;
    line-height: 1.8;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.cart-table-wrapper {
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.cart-table th {
    padding: 20px 15px;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

.cart-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.cart-table tbody tr:hover {
    background: #f8f9fa;
}

.cart-table td {
    padding: 20px 15px;
    vertical-align: middle;
}

/* Product Image */
.item-image {
    position: relative;
}

.item-image img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.no-image-small {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #999;
}

/* Product Details */
.item-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
}

.item-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.item-title a:hover {
    color: #0280b2;
}

.item-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.item-sku {
    font-size: 0.85rem;
    color: #868e96;
    background: #f1f3f5;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Product Type Badges */
.product-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-type-badge.digital {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 1px solid #1976d2;
}

.product-type-badge.physical {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border: 1px solid #f57c00;
}

.stock-warning {
    display: inline-block;
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
    background: #ffebee;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Price */
.item-price,
.item-total {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0280b2;
}

/* Cart Actions Bottom */
.cart-actions-bottom {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0280b2;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.continue-shopping:hover {
    gap: 12px;
    color: #026a94;
}

/* Sidebar */
.cart-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Coupon Card */
.coupon-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.coupon-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    color: #1a1a1a;
    padding-bottom: 15px;
    border-bottom: 2px solid #0280b2;
}

.coupon-form {
    display: flex;
    gap: 10px;
}


.coupon-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    border: 2px solid #4caf50;
}

.coupon-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2e7d32;
    font-weight: 600;
}

.coupon-info svg {
    color: #4caf50;
}

.remove-coupon {
    background: transparent;
    border: none;
    color: #2e7d32;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    transition: all 0.2s;
}

.remove-coupon:hover {
    color: #d32f2f;
    transform: scale(1.2);
}

#coupon-message {
    margin-top: 12px;
    font-size: 0.9rem;
}

.coupon-success {
    color: #2e7d32;
    font-weight: 600;
}

.coupon-error {
    color: #d32f2f;
    font-weight: 600;
}

/* Summary Card */
.summary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.summary-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #1a1a1a;
    padding-bottom: 15px;
    border-bottom: 2px solid #0280b2;
}

.summary-details {
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 0.95rem;
    color: #495057;
}

.discount-row {
    color: #2e7d32;
}

.discount-value {
    color: #2e7d32;
    font-weight: 700;
}

.summary-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 15px 0;
}

.total-row {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0280b2;
    padding-top: 15px;
    border-top: 2px solid #1a1a1a;
}

.mixed-warning {
    margin-top: 12px;
    text-align: center;
    color: #d32f2f;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Security Badge */
.security-badge {
    margin-top: 20px;
    padding: 15px;
    background: #f1f3f5;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
}

/* Empty Cart State */
.empty-cart-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-icon {
    margin-bottom: 30px;
    opacity: 0.5;
}

.empty-cart-state h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.empty-cart-state p {
    color: #868e96;
    margin-bottom: 35px;
    font-size: 1.05rem;
}

.shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0280b2 0%, #026a94 100%);
    color: white;
    padding: 15px 35px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(2, 128, 178, 0.3);
}

.shop-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(2, 128, 178, 0.4);
}

.filter-sort-section {

    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 1em;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

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

    .cart-sidebar {
        position: static;
        grid-template-columns: 1fr 1fr;
    }
}


/* ============================================================
   EXTRACTED FROM checkout_step2_physical.tpl (Remaining)
   ============================================================ */
.checkout-container-step2 {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 40px;
}

.checkout-header h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-weight: 700;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.step {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #999;
    transition: all 0.3s;
}

.step.active {
    background: linear-gradient(135deg, #0280b2 0%, #026a94 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 128, 178, 0.3);
    transform: scale(1.1);
}

.step.completed {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.step-line {
    width: 80px;
    height: 3px;
    background: #e0e0e0;
    transition: all 0.3s;
}

.step-line.completed {
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
}

.error-message {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-right: 5px solid #f44336;
    animation: slideIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.province-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #0280b2;
}

.province-info svg {
    color: #0280b2;
    flex-shrink: 0;
}

.province-info>div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.province-info .label {
    font-size: 0.9rem;
    color: #555;
}

.province-info strong {
    font-size: 1.1rem;
    color: #0280b2;
}

.edit-link-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #0280b2;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    transition: all 0.2s;
}

.edit-link-inline:hover {
    background: #0280b2;
    color: white;
    transform: translateX(-3px);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #0280b2;
}

.section-title svg {
    color: #0280b2;
}

.section-title h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #1a1a1a;
}

.shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.shipping-option {
    display: flex;
    align-items: start;
    gap: 15px;
    padding: 20px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    position: relative;
    overflow: hidden;
}

.shipping-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #f5f9ff, transparent);
    transition: width 0.3s;
}

.shipping-option:hover {
    border-color: #0280b2;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(2, 128, 178, 0.15);
}

.shipping-option:hover::before {
    width: 100%;
}

.shipping-option input[type="radio"] {
    margin-top: 5px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #0280b2;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.shipping-option-cod {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #ff9800;
}

.shipping-option-cod::before {
    background: linear-gradient(90deg, #ffe0b2, transparent);
}

.shipping-option-cod:hover {
    border-color: #f57c00;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25);
}

.option-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.option-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.option-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;

}

.option-meta svg {
    width: 16px;
    height: 16px;
}

.option-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: #0280b2;
}

.badge-cod {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
}

.shipping-free {
    color: #2e7d32;
    font-weight: 700;
}

.shipping-cod {
    color: #f57c00;
    font-weight: 700;
}

.shipping-cost {
    color: #0280b2;
    font-weight: 700;
}

.shipping-pending {
    color: #ff9800;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.no-shipping-message {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe082 100%);
    border-radius: 12px;
    color: #856404;
    font-weight: 600;
    border: 2px solid #ffc107;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-back:hover {
    color: #0280b2;
    background: #f5f9ff;
    gap: 12px;
}

.btn-submit {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0280b2 0%, #026a94 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(2, 128, 178, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 128, 178, 0.4);
    gap: 14px;
}

.btn-submit:active {
    transform: translateY(0);
}

.summary-section {
    position: sticky;
    top: 20px;
}

.summary-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.summary-box h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #1a1a1a;
    padding-bottom: 15px;
    border-bottom: 3px solid #0280b2;
}

.summary-box h3 svg {
    color: #0280b2;
}

.cart-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-name {
    font-weight: 600;
    color: #1a1a1a;
}

.item-price {
    font-weight: 700;
    color: #0280b2;
}

.badge-physical {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border: 1px solid #f57c00;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
    width: fit-content;
    font-weight: 600;
}

.summary-totals {
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.95rem;
}

.summary-row span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
}

.summary-row p {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    margin: 0;
    color: #2e7d32;
}

.summary-row p strong {
    color: #2e7d32;
}

.shipping-row {
    color: #0280b2;
    font-weight: 600;
}

.summary-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #0280b2, transparent);
    margin: 15px 0;
}

.total-row {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0280b2;
    padding-top: 15px;
}

.summary-note {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #495057;
    display: flex;
    align-items: start;
    gap: 10px;
    line-height: 1.5;
}

.summary-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #868e96;
}

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

    .summary-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-header h1 {
        font-size: 1.6rem;
    }

    .step {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-line {
        width: 50px;
    }

    .province-info {
        flex-wrap: wrap;
    }

    .form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-submit,
    .btn-back {
        width: 100%;
        justify-content: center;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.order-summary-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.shipping-time {
    color: #666;
}

.discount {
    color: #2e7d32;
}

.terms-checkbox {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.terms-checkbox label {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================================
   EXTRACTED FROM order_complete.tpl
   ============================================================ */
.order-complete-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2e7d32;
}

.success-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    border-right: 4px solid #1976d2;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-right: 4px solid #e65100;
}

.order-summary-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item .label {
    font-size: 0.85rem;
    color: #666;
}

.info-item .value {
    font-size: 1rem;
    font-weight: 600;
}

.status-badge,
.payment-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.processing {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.payment-badge.unpaid {
    background: #ffebee;
    color: #c62828;
}

.payment-badge.paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.payment-badge.failed {
    background: #ffebee;
    color: #c62828;
}

.order-details-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.order-details-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #0280b2;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.order-items-table thead {
    background: #f8f9fa;
}

.order-items-table th {
    padding: 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.order-items-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.badge-digital,
.badge-physical {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 5px;
}

.badge-digital {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-physical {
    background: #f3e5f5;
    color: #7b1fa2;
}

.order-totals {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}

.total-row.discount-row {
    color: #2e7d32;
}

.total-row.final-total {
    font-size: 1.3rem;
    font-weight: bold;
    color: #0280b2;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    margin-top: 10px;
}

.addresses-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.address-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.address-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #0280b2;
}

.address-content {
    line-height: 1.8;
    color: #666;
}

.order-actions {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: #0280b2;
    color: white;
}

.btn-primary:hover {
    background: #026a94;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-right: 4px solid #2e7d32;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border-right: 4px solid #c62828;
}

@media (max-width: 768px) {
    .order-header-info {
        grid-template-columns: 1fr;
    }

    .addresses-section {
        grid-template-columns: 1fr;
    }

    .order-items-table {
        font-size: 0.85rem;
    }
}

/* ============================================================
   EXTRACTED FROM mini_product.tpl
   ============================================================ */
.productMini {

    border: 1px solid #f5f5f5;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.02);
    padding: 15px;
    border-radius: 12px;

    grid-row: span 4;
    display: grid;
    grid-template-rows: subgrid;
    gap: .5em;

    position: relative;
}

.product_image {
    width: 100%;
}

.product_image img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.titleBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.itemFeatured {
    color: #eb0b86;
    text-shadow: 0 0 .3px #eb0b86;
}

.short_text {
    font-size: .8rem;

    margin-top: 3px;
}

.productMini .product_link a {


    text-decoration: none;
    font-weight: 600;
}

.productStock {
    position: absolute;
}

.stockNo {
    background-color: #f83736;
    border-top-right-radius: 6px;
    border-bottom-left-radius: 6px;
    font-size: .7rem;
    padding: 5px;
    color: #fff;
    text-shadow: 0 0 .3px #fff;
    margin: 15px 15px 0 0;
}

.stockLimited {
    background-color: #ffae05;
    border-top-right-radius: 6px;
    border-bottom-left-radius: 6px;
    font-size: .7rem;
    padding: 5px;
    color: #fff;
    text-shadow: 0 0 .3px #fff;
    margin: 15px 15px 0 0;
}

.instantItem {
    position: absolute;
    left: 0;
    margin-left: 20px;
    margin: 15px 0 0 15px;

    background-color: #953ed0;
    border-top-left-radius: 6px;
    border-bottom-right-radius: 6px;
    font-size: .7rem;
    padding: 5px;
    color: #fff;
    text-shadow: 0 0 .3px #fff;
}


.noSale {
    background-color: #f5f5f5;
    text-align: center;
    border-radius: 6px;
    color: #212121;
    text-shadow: 0 0 .3px #212121;
    font-weight: 600;
    min-height: 40px;
    display: flex;
    flex-direction: row;
    gap: 1em;
    align-items: center;
    justify-content: center;
}

.onSale {
    min-height: 40px;
    background-color: #f3fff2;
    text-align: center;
    border-radius: 6px;
    color: #4caf50;
    text-shadow: 0 0 .3px #4caf50;
    font-weight: 600;

    display: flex;
    flex-direction: row;
    gap: 1em;
    align-items: center;
    justify-content: center;
}

.salePercentage {
    background-color: #4caf50;
    border-radius: 6px;
    padding: 2px 5px 0px 5px;
    color: #fff;
}

/* ============================================================
   EXTRACTED FROM guest_order_view.tpl
   ============================================================ */
.account-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar */
.account-sidebar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    border: 1px solid #e0e0e0;
}

.account-user-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px;
}

.account-user-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.user-email {
    color: #666;
    font-size: 0.85rem;
}

.account-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
}

.menu-item:hover {
    background: #f5f5f5;
    color: #0280b2;
}

.menu-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-item.logout {
    color: #d32f2f;
    margin-top: 10px;
}

.menu-item.logout:hover {
    background: #ffebee;
}

.menu-item .icon {
    font-size: 1.2rem;
}

/* Content */
.account-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    border: 1px solid #e0e0e0;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #0280b2;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Order Header */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.order-title-section h1 {
    margin: 0 0 5px 0;
    font-size: 2rem;
}

.order-date {
    color: #666;
    margin: 0;
}

.order-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-badge,
.payment-badge {
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-processing {
    background: #e3f2fd;
    color: #1976d2;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.status-shipped {
    background: #e1f5fe;
    color: #0277bd;
}

.payment-unpaid {
    background: #ffebee;
    color: #c62828;
}

.payment-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.payment-failed {
    background: #ffebee;
    color: #c62828;
}

/* Alert */
.alert-link {
    color: #0277bd;
    font-weight: 600;
    text-decoration: underline;
}

/* Order Sections */
.order-section {
    margin-bottom: 30px;
}

.order-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;

}

/* Status Card */
.status-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.status-icon-pending {
    background: #fff3e0;
}

.status-icon-processing {
    background: #e3f2fd;
}

.status-icon-completed {
    background: #e8f5e9;
}

.status-icon-cancelled {
    background: #ffebee;
}

.status-icon-shipped {
    background: #e1f5fe;
}

.status-details {
    flex: 1;
}

.status-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.status-desc {
    color: #666;
    font-size: 0.9rem;
}

.tracking-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.tracking-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.tracking-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0280b2;
}

/* Timeline */
.order-timeline {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.timeline-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 11px;
    top: 30px;
    width: 2px;
    height: calc(100% - 10px);
    background: #e0e0e0;
}

.timeline-item.completed:not(:last-child)::after {
    background: #4caf50;
}

.timeline-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0e0e0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.timeline-item.completed .timeline-marker {
    background: #4caf50;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.timeline-date {
    font-size: 0.85rem;
    color: #666;
}

/* Items Table */
.items-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table thead {
    background: #f8f9fa;
}

.items-table th {
    padding: 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.items-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.item-info a {
    color: #0280b2;
    text-decoration: none;
    font-weight: 600;
}

.item-info a:hover {
    text-decoration: underline;
}

.item-meta {
    margin-top: 5px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.badge-type {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.item-price,
.item-quantity,
.item-subtotal {
    font-weight: 600;
}

.item-subtotal {
    color: #0280b2;
}

/* Order Bottom Grid */
.order-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.address-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.address-detail {
    color: #666;
    line-height: 1.6;
    margin-bottom: 3px;
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-row.discount-row {
    color: #2e7d32;
}

.summary-row.total-row {
    font-size: 1.3rem;
    font-weight: bold;
    color: #0280b2;
    border-bottom: none;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.payment-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.payment-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.payment-detail strong {
    color: #666;
}

/* Customer Note */
.customer-note {
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffd54f;
    margin-bottom: 20px;
}

.customer-note strong {
    display: block;
    margin-bottom: 8px;
}

.customer-note p {
    margin: 0;
    line-height: 1.6;
}

.btn-secondary {
    background: #f0f0f0;

    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

@media (max-width: 1024px) {
    .account-container {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }

    .order-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .order-header {
        flex-direction: column;
        gap: 15px;
    }

    .status-info {
        flex-direction: column;
        text-align: center;
    }

    .items-table {
        font-size: 0.85rem;
    }
}

/* ============================================================
   EXTRACTED FROM checkout_step3_payment.tpl
   ============================================================ */
/* Info Box */
.info-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.info-box h3 {
    font-size: 1.2rem;

    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0280b2;
}

.info-content p {
    margin: 8px 0;
    color: #555;
    line-height: 1.6;
}

.info-content p strong {}

.edit-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #0280b2;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.edit-link:hover {
    text-decoration: underline;
}

/* Payment Methods */
.payment-methods {
    margin-bottom: 30px;
}

.payment-option {
    display: flex;
    align-items: start;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.payment-option:hover {
    border-color: #0280b2;
    background: #f5f9ff;
}

.payment-option input[type="radio"] {
    margin-top: 5px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0280b2;
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.form-group textarea:focus {
    outline: none;
    border-color: #0280b2;
}

/* Terms Box */
.terms-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.terms-label {
    display: flex;
    align-items: start;
    gap: 10px;
    cursor: pointer;
}

.terms-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.terms-label span {
    font-size: 0.95rem;
    line-height: 1.5;
}

.required {
    color: #f44336;
}

/* Payment Notice */
.payment-notice {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}

.payment-notice .notice-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.payment-notice p {
    margin: 0;
    color: #2e7d32;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ============================================================
   EXTRACTED FROM checkout_step3_cod.tpl
   ============================================================ */
/* COD Notice */
.cod-notice {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.cod-notice h3 {
    color: #f57c00;
    font-size: 1.5rem;
    margin: 0 0 15px 0;
}

.cod-notice p {
    color: #555;
    margin: 8px 0;
    line-height: 1.6;
    font-size: 1rem;
}

.btn-cod {
    background: #ff9800;
}

.btn-cod:hover {
    background: #f57c00;
}

.cod-total {
    background: #fff8e1;
    padding: 15px;
    border-radius: 5px;
    color: #f57c00;
}

/* ============================================================
   EXTRACTED FROM checkout_step2_digital.tpl
   ============================================================ */
/* Digital Notice */
.digital-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #0280b2;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.digital-notice h3 {
    color: #0280b2;
    font-size: 1.5rem;
    margin: 0 0 15px 0;
}

.digital-notice p {
    color: #555;
    margin: 8px 0;
    line-height: 1.6;
    font-size: 1rem;
}


/* ============================================================
   CHECKOUT PAGE (checkout.tpl) - Modern Design
   ============================================================ */

.checkout-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 50px;
}

.checkout-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    position: relative;
    display: inline-block;
}

.checkout-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0280b2, #4caf50);
    border-radius: 2px;
}

/* Error Messages */
.error-message,
.checkout-container .error-message {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-right: 5px solid #f44336;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 30px;
    color: #c62828;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.15);
    animation: errorSlideIn 0.4s ease-out;
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content Grid */
.checkout-content {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 40px;
    align-items: start;
}

/* Left Column - Forms */
.checkout-forms {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.checkout-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.checkout-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: #0280b2;
}

.checkout-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-section h2::before {
    content: '';
    width: 5px;
    height: 30px;
    background: linear-gradient(180deg, #0280b2, #4caf50);
    border-radius: 3px;
}

/* Form Fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background: #fafafa;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0280b2;
    background: white;
    box-shadow: 0 0 0 4px rgba(2, 128, 178, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230280b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 20px;
    padding-left: 40px;
}

.required {
    color: #f44336;
    font-weight: 700;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #1a1a1a;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #0280b2;
}

/* Shipping Fields Toggle */
#shipping-fields {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px dashed #e0e0e0;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Shipping & Payment Methods */
.shipping-methods,
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shipping-option,
.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border: 3px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.shipping-option::before,
.payment-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(2, 128, 178, 0.05), transparent);
    transition: width 0.3s ease;
    z-index: 0;
}

.shipping-option:hover::before,
.payment-option:hover::before {
    width: 100%;
}

.shipping-option:hover,
.payment-option:hover {
    border-color: #0280b2;
    background: white;
    transform: translateX(-3px);
    box-shadow: 0 4px 16px rgba(2, 128, 178, 0.15);
}

.shipping-option input[type="radio"],
.payment-option input[type="radio"] {
    margin-top: 3px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #0280b2;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.option-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.option-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.option-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #0280b2;
    font-weight: 600;
}

.option-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: #0280b2;
}

/* Digital Notice */
.digital-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #0280b2;
    text-align: center;
    padding: 35px 30px;
}

.notice-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.digital-notice h3 {
    font-size: 1.4rem;
    color: #0280b2;
    margin: 0 0 15px 0;
}

.digital-notice p {
    color: #1976d2;
    font-size: 1rem;
    line-height: 1.7;
    margin: 10px 0;
}

/* Right Column - Order Summary */
.order-summary-sidebar {
    position: sticky;
    top: 20px;
}

.order-summary-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #e8e8e8;
}

.order-summary-box h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #0280b2;
    text-align: center;
}

/* Order Items */
.order-items {
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
    padding-left: 5px;
}

.order-items::-webkit-scrollbar {
    width: 6px;
}

.order-items::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.order-items::-webkit-scrollbar-thumb {
    background: #0280b2;
    border-radius: 10px;
}

.order-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e8e8e8;
}

.order-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-item-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
    line-height: 1.3;
}

.order-item-qty {
    font-size: 0.85rem;
    color: #666;
}

.order-item-price {
    font-weight: 700;
    color: #0280b2;
    font-size: 1rem;
}

/* Order Totals */
.order-totals {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 1rem;
    color: #333;
}

.order-total-row:not(:last-child) {
    border-bottom: 1px dashed #e0e0e0;
}

.order-total-row span:first-child {
    font-weight: 600;
}

.order-total-row span:last-child {
    font-weight: 700;
    color: #0280b2;
}

.order-total-row.total-row {
    font-size: 1.4rem;
    color: #1a1a1a;
    padding-top: 18px;
    margin-top: 8px;
    border-top: 3px solid #0280b2;
    border-bottom: none;
}

.order-total-row.total-row span:last-child {
    color: #4caf50;
    font-size: 1.5rem;
}

.free-shipping {
    color: #4caf50 !important;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Terms Checkbox */
.terms-checkbox {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff8e1;
    border-radius: 10px;
    border: 2px solid #ffc107;
}

.terms-checkbox label {
    display: flex;
    align-items: start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #ff9800;
    flex-shrink: 0;
}

.terms-checkbox span {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
}

/* Place Order Button */
.place-order-btn {
    width: 100%;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    position: relative;
    overflow: hidden;
}

.place-order-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.place-order-btn:hover::before {
    width: 300px;
    height: 300px;
}

.place-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
}

.place-order-btn:active {
    transform: translateY(-1px);
}

/* Coupon Display */
.coupon-display {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #4caf50;
    margin: 10px 0;
}

.coupon-display .order-total-row {
    border: none;
    padding: 5px 0;
    color: #2e7d32;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .checkout-content {
        grid-template-columns: 1fr 400px;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .order-summary-sidebar {
        position: static;
        order: -1;
    }

    .checkout-container {
        padding: 30px 15px;
    }
}

@media (max-width: 768px) {
    .checkout-header h1 {
        font-size: 2rem;
    }

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

    .checkout-section {
        padding: 20px;
    }

    .order-summary-box {
        padding: 20px;
    }

    .shipping-option,
    .payment-option {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .checkout-header h1 {
        font-size: 1.6rem;
    }

    .checkout-section h2 {
        font-size: 1.2rem;
    }

    .place-order-btn {
        font-size: 1.1rem;
        padding: 15px 25px;
    }
}

/* Loading State */
.place-order-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

.place-order-btn:disabled:hover {
    transform: none;
}

/* Smooth Transitions */
* {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 3px solid #0280b2;
    outline-offset: 2px;
}

/* Print Styles */
@media print {

    .checkout-forms,
    .place-order-btn,
    .terms-checkbox {
        display: none;
    }

    .order-summary-box {
        box-shadow: none;
        border: 2px solid #000;
    }
}


/* ============================================================
   CART SUMMARY ITEMS (cart_items_summary from PHP)
   ============================================================ */
.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #F9FAFB;
    border-radius: 12px;
    margin-bottom: 8px;
}

.order-item:last-child {
    margin-bottom: 0;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 12px;
    font-weight: 500;
    color: #181E25;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price {
    font-size: 12px;
    font-weight: 700;
    color: #32c98a;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-physical {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: #EDE9FE;
    color: #7C3AED;
    width: fit-content;
}

.badge-digital {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: #DBEAFE;
    color: #1D4ED8;
    width: fit-content;
}

/* ============================================================
   COUPON DISPLAY (coupon_display from PHP)
   ============================================================ */
.coupon-display,
#coupon-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #FA5C64;
    font-weight: 500;
    padding: 6px 0;
}

/* When coupon_display outputs a plain <p> tag */
.space-y-3 > p {
    font-size: 13px;
    color: #FA5C64;
    font-weight: 500;
    padding: 6px 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.space-y-3 > p strong {
    color: #181E25;
    font-weight: 600;
}


/* ============================================================
   SHIPPING METHODS (checkout_step2_physical)
   ============================================================ */
.shipping-methods-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.shipping-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 2px solid #E7EAF0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #F9FAFB;
    position: relative;
    transform: none;
    box-shadow: none;
}

.shipping-option::before {
    display: none;
}

.shipping-option:hover {
    border-color: rgba(50, 201, 138, 0.4);
    background: #fff;
    transform: none;
    box-shadow: 0 2px 12px rgba(50, 201, 138, 0.08);
}

.shipping-option:has(input[type="radio"]:checked) {
    border-color: #32c98a;
    background: rgba(50, 201, 138, 0.04);
    box-shadow: 0 2px 12px rgba(50, 201, 138, 0.12);
}

.shipping-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #32c98a;
    cursor: pointer;
    position: relative;
    z-index: auto;
}

.shipping-option .option-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: auto;
}

.shipping-option .option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.shipping-option .option-title {
    font-size: 13px;
    font-weight: 600;
    color: #181E25;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shipping-option .option-desc {
    font-size: 11px;
    color: #67788E;
    margin-bottom: 4px;
    line-height: 1.5;
}

.shipping-option .option-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shipping-time {
    font-size: 11px;
    color: #67788E;
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 6px;
}

.shipping-option:has(input[type="radio"]:checked) .shipping-time {
    background: rgba(50, 201, 138, 0.1);
    color: #32c98a;
}

.option-price {
    font-size: 13px;
    font-weight: 700;
    color: #181E25;
    white-space: nowrap;
    flex-shrink: 0;
}

.shipping-cost {
    color: #F97316;
}

.shipping-option:has(input[type="radio"]:checked) .shipping-cost {
    color: #32c98a;
}

.shipping-cod {
    color: #32c98a;
}

/* COD special style */
.shipping-option-cod {
    background: #FFFBF5;
    border-color: #FED7AA;
}

.shipping-option-cod:hover {
    border-color: #FDBA74;
    background: #FFF7ED;
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.08);
}

.shipping-option-cod:has(input[type="radio"]:checked) {
    border-color: #F97316;
    background: #FFF7ED;
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.12);
}

.shipping-option-cod .shipping-time {
    background: #FEF3C7;
    color: #D97706;
}

.badge-cod {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: #FED7AA;
    color: #C2410C;
    box-shadow: none;
    letter-spacing: 0;
    text-transform: none;
}


/* ============================================================
   PAYMENT METHODS (checkout_step3_payment)
   ============================================================ */
.payment-methods-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 2px solid #E7EAF0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #F9FAFB;
    position: relative;
    transform: none;
    box-shadow: none;
}

.payment-option:hover {
    border-color: rgba(50, 201, 138, 0.4);
    background: #fff;
    box-shadow: 0 2px 12px rgba(50, 201, 138, 0.08);
}

.payment-option:has(input[type="radio"]:checked) {
    border-color: #32c98a;
    background: rgba(50, 201, 138, 0.04);
    box-shadow: 0 2px 12px rgba(50, 201, 138, 0.12);
}

.payment-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #32c98a;
    cursor: pointer;
}

.payment-option .option-content {
    flex: 1;
    min-width: 0;
}

.payment-option .option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.payment-option .option-title {
    font-size: 13px;
    font-weight: 600;
    color: #181E25;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-option .option-desc {
    font-size: 11px;
    color: #67788E;
    line-height: 1.5;
    margin-bottom: 0;
}

.payment-option .option-price {
    font-size: 13px;
    font-weight: 700;
    color: #32c98a;
    white-space: nowrap;
}

.payment-option img {
    height: 24px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}


/* ============================================================
   ORDER COMPLETE PAGE
   ============================================================ */

/* Header message wrapper from PHP */
.order-complete-header .error-icon,
.order-complete-header .success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 16px;
}

.order-complete-header .error-title,
.order-complete-header h1 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.order-complete-header .error-subtitle,
.order-complete-header p {
    font-size: 13px;
    color: #67788E;
    margin-bottom: 0;
}

/* Alert */
.alert {
    font-size: 13px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 12px;
    display: inline-block;
    max-width: 480px;
}

.alert-danger {
    background: #FEF2F2;
    color: #EF4444;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #F0FDF4;
    color: #16A34A;
    border: 1px solid #BBF7D0;
}

/* Status & Payment Badges */
.status-badge,
.payment-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 8px;
}

.status-badge.pending,
.payment-badge.pending {
    background: #FEF3C7;
    color: #D97706;
}

.status-badge.processing {
    background: #DBEAFE;
    color: #1D4ED8;
}

.status-badge.completed {
    background: #DCFCE7;
    color: #16A34A;
}

.status-badge.cancelled,
.payment-badge.failed {
    background: #FEF2F2;
    color: #EF4444;
}

.payment-badge.paid {
    background: #DCFCE7;
    color: #16A34A;
}

/* Order Items Table */
.order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.order-items-table thead th {
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: #67788E;
    padding: 12px 20px;
    background: #F9FAFB;
    border-bottom: 1px solid #E7EAF0;
}

.order-items-table tbody tr {
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.15s;
}

.order-items-table tbody tr:last-child {
    border-bottom: none;
}

.order-items-table tbody tr:hover {
    background: #FAFAFA;
}

.order-items-table tbody td {
    text-align: right;
    font-size: 12px;
    color: #181E25;
    padding: 14px 20px;
    vertical-align: middle;
}

.order-items-table tbody td:first-child {
    font-weight: 500;
}

/* Address content */
.address-content br {
    line-height: 2;
}

/* Customer note from PHP */
.customer-note {
    background: #F9FAFB;
    border: 1px solid #E7EAF0;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #67788E;
    line-height: 1.7;
}

/* Digital codes display */
.codes-display,
.digital-codes {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #15803D;
}

