* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #222;
}

.home {
    width: min(1200px, 92%);
    margin: 40px auto;
}

.home h1 {
    margin-bottom: 10px;
}

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

.product {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.product h2 {
    margin-top: 0;
    font-size: 20px;
}

.product p {
    margin: 10px 0;
}

@media (max-width: 600px) {
    .home {
        width: 94%;
        margin: 25px auto;
    }

    .products {
        grid-template-columns: 1fr;
    }
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 0;
}

.header-inner {
    width: min(1200px, 92%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: #222;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
}

.main-nav a:hover {
    color: #000;
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        gap: 14px;
        flex-wrap: wrap;
    }
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    margin-bottom: 15px;
}

.cart-page {
    width: min(1000px, 92%);
    margin: 40px auto;
}

.cart-page h1 {
    margin-bottom: 25px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.cart-item-image {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.cart-item-info p {
    margin: 6px 0;
}

.cart-total {
    margin-top: 25px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: right;
}

.cart-total h2 {
    margin: 0;
}

@media (max-width: 600px) {
    .cart-page {
        width: 94%;
        margin: 25px auto;
    }

    .cart-item {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-item-image {
        width: 100%;
        height: 160px;
        object-fit: cover;
    }

    .cart-total {
        text-align: left;
    }
}


.cart-save-status {
    display: inline-block;
    min-width: 85px;
    margin-left: 8px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}

.cart-save-status.saving {
    opacity: 0.65;
}

.cart-save-status.saved {
    opacity: 0.85;
}

.cart-save-status.error {
    font-weight: 700;
}

@media (max-width: 600px) {
    .cart-save-status {
        display: block;
        margin-left: 0;
        margin-top: 6px;
    }
}

.cart-remove-form {
    flex-shrink: 0;
}

.cart-remove-button {
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.cart-remove-button:hover {
    background: #f5f5f5;
}

@media (max-width: 600px) {
    .cart-remove-form {
        width: 100%;
    }

    .cart-remove-button {
        width: 100%;
    }
}

.cart-empty {
    background: #ffffff;
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.cart-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.cart-empty h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.cart-empty p {
    margin: 0 0 20px;
    color: #666;
}

.cart-empty-button {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.cart-empty-button:hover {
    opacity: 0.9;
}

.checkout-page {
    width: min(1100px, 92%);
    margin: 40px auto;
}

.checkout-page h1 {
    margin-bottom: 25px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
    gap: 25px;
    align-items: start;
}

.checkout-form-card,
.checkout-summary {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.checkout-form-card h2,
.checkout-summary h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.checkout-field {
    margin-bottom: 18px;
}

.checkout-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.checkout-field input,
.checkout-field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
    outline: none;
    border-color: #888;
}

.checkout-field textarea {
    resize: vertical;
}

.checkout-submit {
    width: 100%;
    border: 0;
    padding: 12px 18px;
    border-radius: 8px;
    background: #222;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.checkout-submit:hover {
    opacity: 0.9;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.checkout-summary-item div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.checkout-summary-item span {
    color: #666;
    font-size: 14px;
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    padding-top: 5px;
    font-size: 18px;
}

.checkout-back {
    display: inline-block;
    margin-top: 22px;
    color: #444;
    text-decoration: none;
    font-weight: 600;
}

.checkout-back:hover {
    color: #000;
}

@media (max-width: 700px) {
    .checkout-page {
        width: 94%;
        margin: 25px auto;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-form-card,
    .checkout-summary {
        padding: 20px;
    }
}

/* ================================
   User Header
   ================================ */

.user-menu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.user-avatar,
.dashboard-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    background: #333;
}

.user-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
}

/* ================================
   Dashboard
   ================================ */

.dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dashboard-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.dashboard-avatar {
    width: 72px;
    height: 72px;
    font-size: 28px;
    margin-bottom: 20px;
}

.dashboard h1 {
    margin-bottom: 12px;
}

.dashboard-welcome {
    font-size: 18px;
}

@media (max-width: 600px) {
    .user-name {
        display: none;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }

    .dashboard {
        padding: 24px 16px;
    }

    .dashboard-card {
        padding: 24px 18px;
    }
}



/* =========================
   LOGIN
   ========================= */

.login-page {
    width: min(460px, 92%);
    margin: 60px auto;
}

.login-card {
    background: #ffffff;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #222;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-size: 28px;
}

.login-subtitle {
    margin: 10px 0 30px;
    text-align: center;
    color: #666;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.login-field input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 9px;
    background: #ffffff;
    font: inherit;
    outline: none;
}

.login-field input:focus {
    border-color: #222;
    box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.08);
}

.login-button {
    width: 100%;
    border: 0;
    padding: 13px 18px;
    border-radius: 9px;
    background: #222;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.login-button:hover {
    opacity: 0.9;
}

.login-back {
    display: inline-block;
    margin-top: 15px;
    color: #222;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 600px) {
    .login-page {
        width: 94%;
        margin: 30px auto;
    }

    .login-card {
        padding: 25px 20px;
    }

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

/* =========================================
   HEADER / NAVIGATION - FINAL
   ========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

.header-inner {
    width: min(1200px, 94%);
    min-height: 64px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    flex-shrink: 0;
    color: #222;
    font-size: 21px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.3px;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

.main-nav > a {
    color: #444;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav > a:hover {
    color: #111;
}

.main-nav .user-menu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #222;
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #222;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.user-name {
    font-weight: 700;
}

/* =========================================
   HEADER MOBILE
   ========================================= */

@media (max-width: 600px) {

    .header-inner {
        width: 94%;
        min-height: 58px;
        gap: 12px;
    }

    .brand {
        font-size: 19px;
    }

    .main-nav {
        gap: 14px;
    }

    .main-nav > a {
        font-size: 13px;
    }

    .user-menu {
        gap: 0 !important;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .user-name {
        display: none;
    }
}

/* =========================================
   VERY SMALL PHONE
   ========================================= */

@media (max-width: 380px) {

    .header-inner {
        width: 96%;
    }

    .main-nav {
        gap: 10px;
    }

    .main-nav > a {
        font-size: 12px;
    }

    .brand {
        font-size: 18px;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }
}

/* =========================================
   PRODUCT DETAIL
   ========================================= */

.product-detail-page {
    width: min(1100px, 94%);
    margin: 40px auto;
}

.product-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;

    background: #ffffff;
    border-radius: 18px;
    padding: 30px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.product-detail-media {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 360px;
    overflow: hidden;

    border-radius: 14px;
    background: #f5f5f5;
}

.product-detail-image {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 14px;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-detail-category {
    margin: 0 0 8px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

.product-detail-info h1 {
    margin: 0 0 16px;
    font-size: 32px;
    line-height: 1.2;
}

.product-detail-price {
    margin: 0 0 10px;
    font-size: 25px;
    font-weight: 800;
    color: #222;
}

.product-detail-stock {
    margin: 0 0 22px;
    color: #555;
}

.product-detail-cart-form {
    margin: 0 0 28px;
}

.product-detail-cart-button {
    width: 100%;
    border: 0;
    padding: 14px 18px;

    border-radius: 10px;
    background: #222;
    color: #ffffff;

    font: inherit;
    font-weight: 700;
    cursor: pointer;

    transition: opacity 0.2s ease;
}

.product-detail-cart-button:hover {
    opacity: 0.9;
}

.product-out-of-stock {
    margin: 0 0 28px;
    font-weight: 700;
}

.product-description {
    padding-top: 22px;
    border-top: 1px solid #e5e5e5;
}

.product-description h2 {
    margin: 0 0 10px;
    font-size: 19px;
}

.product-description p {
    margin: 0;
    color: #555;
    line-height: 1.7;
}

.back-link {
    display: inline-block;
    margin-top: 24px;

    color: #333;
    font-weight: 600;
    text-decoration: none;
}

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

/* =========================================
   PRODUCT DETAIL MOBILE
   ========================================= */

@media (max-width: 700px) {

    .product-detail-page {
        width: 94%;
        margin: 24px auto;
    }

    .product-detail-card {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 18px;
        border-radius: 16px;
    }

    .product-detail-media {
        min-height: 260px;
    }

    .product-detail-image {
        max-height: 360px;
    }

    .product-detail-info h1 {
        font-size: 27px;
    }

    .product-detail-price {
        font-size: 23px;
    }
}

/* =========================================
   ACTIVE NAVIGATION
   ========================================= */

.main-nav > a.active {
    color: #111;
    font-weight: 700;
    position: relative;
}

.main-nav > a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    border-radius: 2px;
    background: #222;
}

.main-nav > a.user-menu.active::after {
    left: 0;
    right: 0;
    bottom: -6px;
}

@media (max-width: 600px) {

    .main-nav > a.active::after {
        bottom: -6px;
    }

    .main-nav > a.user-menu.active::after {
        bottom: -5px;
    }
}

/* =========================================
   DASHBOARD
   ========================================= */

.dashboard {
    width: min(900px, 94%);
    margin: 40px auto;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.dashboard-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e5e5e5;
}

.dashboard-avatar {
    width: 76px;
    height: 76px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #222;
    color: #fff;

    font-size: 30px;
    font-weight: 700;
}

.dashboard-heading h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.dashboard-heading p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.dashboard-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 28px 0;
}

.dashboard-info-item {
    display: flex;
    flex-direction: column;
    gap: 7px;

    padding: 18px;
    border-radius: 12px;
    background: #f7f7f7;
}

.dashboard-label {
    color: #777;
    font-size: 13px;
    font-weight: 600;
}

.dashboard-value {
    color: #222;
    font-weight: 600;
    word-break: break-word;
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #222;
    font-weight: 600;
}

.dashboard-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #222;
}

.dashboard-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.dashboard-actions form {
    margin: 0;
}

.dashboard-logout {
    border: 0;
    padding: 11px 20px;

    border-radius: 9px;
    background: #222;
    color: #fff;

    font: inherit;
    font-weight: 700;
    cursor: pointer;

    transition: opacity 0.2s ease;
}

.dashboard-logout:hover {
    opacity: 0.9;
}

/* =========================================
   DASHBOARD MOBILE
   ========================================= */

@media (max-width: 600px) {

    .dashboard {
        width: 94%;
        margin: 24px auto;
    }

    .dashboard-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .dashboard-profile {
        align-items: flex-start;
        gap: 16px;
        padding-bottom: 22px;
    }

    .dashboard-avatar {
        width: 62px;
        height: 62px;
        font-size: 25px;
    }

    .dashboard-heading h1 {
        font-size: 25px;
    }

    .dashboard-heading p {
        font-size: 14px;
    }

    .dashboard-info {
        grid-template-columns: 1fr;
        padding: 22px 0;
    }

    .dashboard-info-item {
        padding: 16px;
    }

    .dashboard-actions {
        justify-content: stretch;
    }

    .dashboard-logout {
        width: 100%;
    }
}

/* =========================================
   CART UI - FINAL
   ========================================= */

.cart-page {
    width: min(1000px, 94%);
    margin: 40px auto;
}

.cart-page h1 {
    margin: 0 0 24px;
    font-size: 30px;
}

/* Cart item */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;

    padding: 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}

.cart-item-image {
    width: 140px;
    height: 120px;
    object-fit: contain;
    background: #f7f7f7;
    border-radius: 12px;
    padding: 8px;
    margin: 0;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-info h2 {
    margin: 0 0 7px;
    font-size: 19px;
}

.cart-item-info p {
    margin: 7px 0;
    color: #555;
    font-size: 14px;
}

.cart-item-info p:last-child {
    color: #222;
    font-weight: 700;
}

/* Quantity */

.quantity-control {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 12px 0;
}

.quantity-control > span:first-child {
    margin-right: 4px;
    color: #666;
    font-size: 13px;
    font-weight: 600;
}

.quantity-minus,
.quantity-plus {
    width: 34px;
    height: 34px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fff;
    color: #222;

    font-size: 18px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
}

.quantity-minus:hover,
.quantity-plus:hover {
    background: #f3f3f3;
}

.quantity-input {
    width: 48px;
    height: 34px;

    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fff;
    color: #222;

    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

/* Hilangkan spinner input number */

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

/* Save status */

.cart-save-status {
    min-width: 0;
    margin-left: 4px;
    font-size: 11px;
}

/* Remove */

.cart-remove-form {
    align-self: center;
    flex-shrink: 0;
}

.cart-remove-button {
    border: 1px solid #ddd;
    padding: 9px 15px;
    border-radius: 8px;

    background: #fff;
    color: #444;

    font: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.cart-remove-button:hover {
    background: #f5f5f5;
}

/* Total */

.cart-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;

    margin-top: 18px;
    padding: 20px 22px;

    background: #fff;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);

    text-align: right;
}

.cart-total h2 {
    margin: 0;
    font-size: 20px;
}

.total-value {
    margin-left: 8px;
}

/* Checkout */

.cart-checkout-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.cart-checkout-action .checkout-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 140px;
    padding: 12px 20px;

    border-radius: 9px;
    background: #222;
    color: #fff;

    text-decoration: none;
    font: inherit;
    font-weight: 700;
}

.cart-checkout-action .checkout-submit:hover {
    opacity: 0.9;
}

/* Empty cart */

.cart-empty {
    padding: 50px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}

.cart-empty-icon {
    margin-bottom: 16px;
    font-size: 46px;
}

.cart-empty h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.cart-empty p {
    margin: 0 0 22px;
    color: #666;
}

/* =========================================
   CART MOBILE
   ========================================= */

@media (max-width: 600px) {

    .cart-page {
        width: 94%;
        margin: 24px auto;
    }

    .cart-page h1 {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .cart-items {
        gap: 14px;
    }

    .cart-item {
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .cart-item-image {
        width: 90px;
        height: 90px;
        grid-row: span 2;
    }

    .cart-item-info h2 {
        font-size: 17px;
    }

    .cart-item-info p {
        font-size: 13px;
    }

    .quantity-control {
        flex-wrap: wrap;
        gap: 6px;
    }

    .quantity-control > span:first-child {
        width: 100%;
        margin-bottom: 2px;
    }

    .cart-save-status {
        display: inline-block;
        margin-left: 3px;
    }

    .cart-remove-form {
        grid-column: 1 / -1;
        width: 100%;
    }

    .cart-remove-button {
        width: 100%;
    }

    .cart-total {
        justify-content: space-between;
        padding: 18px;
        text-align: left;
    }

    .cart-total h2 {
        font-size: 18px;
    }

    .cart-checkout-action {
        width: 100%;
    }

    .cart-checkout-action .checkout-submit {
        width: 100%;
    }

    .cart-empty {
        padding: 40px 18px;
    }
}

/* =========================================
   CHECKOUT UI - FINAL
   ========================================= */

.checkout-page {
    width: min(1100px, 94%);
    margin: 40px auto;
}

.checkout-page h1 {
    margin: 0 0 24px;
    font-size: 30px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
    gap: 20px;
    align-items: start;
}

/* =========================================
   CHECKOUT FORM
   ========================================= */

.checkout-form-card,
.checkout-summary {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}

.checkout-form-card {
    padding: 26px;
}

.checkout-form-card h2,
.checkout-summary h2 {
    margin: 0 0 22px;
    font-size: 21px;
}

.checkout-field {
    margin-bottom: 18px;
}

.checkout-field label {
    display: block;
    margin-bottom: 7px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

.checkout-field input,
.checkout-field textarea {
    width: 100%;
    padding: 12px 13px;

    border: 1px solid #ddd;
    border-radius: 9px;

    background: #fff;
    color: #222;

    font: inherit;
    font-size: 14px;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.checkout-field textarea {
    min-height: 110px;
    resize: vertical;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
    border-color: #222;
    box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.08);
}

.checkout-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 4px;
    padding: 13px 18px;

    border: 0;
    border-radius: 9px;

    background: #222;
    color: #fff;

    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;

    transition: opacity 0.2s ease;
}

.checkout-submit:hover {
    opacity: 0.9;
}

/* =========================================
   ORDER SUMMARY
   ========================================= */

.checkout-summary {
    padding: 26px;
}

.checkout-summary-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.checkout-summary-item:first-of-type {
    padding-top: 0;
}

.checkout-summary-item > div {
    min-width: 0;
}

.checkout-summary-item strong {
    color: #222;
    font-size: 14px;
}

.checkout-summary-item span {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 13px;
}

.checkout-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding-top: 20px;
    margin-top: 4px;
}

.checkout-summary-total span {
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

.checkout-summary-total strong {
    color: #222;
    font-size: 20px;
}

.checkout-back {
    display: inline-block;
    margin-top: 22px;

    color: #444;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.checkout-back:hover {
    color: #111;
}

/* =========================================
   CHECKOUT MOBILE
   ========================================= */

@media (max-width: 760px) {

    .checkout-page {
        width: 94%;
        margin: 24px auto;
    }

    .checkout-page h1 {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .checkout-form-card,
    .checkout-summary {
        padding: 20px 18px;
        border-radius: 15px;
    }

    .checkout-form-card h2,
    .checkout-summary h2 {
        font-size: 19px;
        margin-bottom: 18px;
    }

    .checkout-field {
        margin-bottom: 16px;
    }

    .checkout-field input,
    .checkout-field textarea {
        font-size: 16px;
    }

    .checkout-summary-item {
        padding: 14px 0;
    }

    .checkout-summary-total strong {
        font-size: 19px;
    }

    .checkout-back {
        margin-top: 18px;
    }
}

/* =========================================
   CHECKOUT CONFIRMATION
   ========================================= */

.checkout-confirm {
    width: min(1000px, 92%);
    margin: 40px auto;
}

.checkout-confirm > h1 {
    margin: 0 0 25px;
}

.checkout-confirm-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
}

.checkout-card {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.checkout-card h2 {
    margin: 0 0 22px;
    font-size: 20px;
}

.checkout-card p {
    margin: 0 0 16px;
    line-height: 1.6;
    color: #555;
}

.checkout-card p:last-child {
    margin-bottom: 0;
}

.checkout-card p strong {
    color: #222;
}

.checkout-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.checkout-item:first-of-type {
    padding-top: 0;
}

.checkout-item > div {
    min-width: 0;
}

.checkout-item strong {
    color: #222;
}

.checkout-item small {
    display: block;
    margin-top: 5px;
    color: #777;
    line-height: 1.5;
}

.checkout-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    font-size: 18px;
}

.checkout-total strong {
    font-size: 20px;
}

.checkout-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.checkout-actions .checkout-back {
    display: inline-flex;
    align-items: center;
    color: #444;
    text-decoration: none;
    font-weight: 600;
}

.checkout-actions .checkout-back:hover {
    color: #111;
}

.checkout-actions form {
    margin: 0;
}

.checkout-actions .checkout-submit {
    min-width: 180px;
}

/* =========================================
   CHECKOUT CONFIRMATION MOBILE
   ========================================= */

@media (max-width: 700px) {

    .checkout-confirm {
        width: 94%;
        margin: 25px auto;
    }

    .checkout-confirm > h1 {
        margin-bottom: 20px;
    }

    .checkout-confirm-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .checkout-card {
        padding: 20px;
        border-radius: 14px;
    }

    .checkout-card h2 {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .checkout-item {
        gap: 12px;
    }

    .checkout-total {
        font-size: 17px;
    }

    .checkout-total strong {
        font-size: 19px;
    }

    .checkout-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .checkout-actions form {
        width: 100%;
    }

    .checkout-actions .checkout-submit {
        width: 100%;
    }

    .checkout-actions .checkout-back {
        justify-content: center;
        padding: 10px;
    }
}


/* =========================================
   ORDER SUCCESS
   ========================================= */

.order-success {
    width: min(600px, 92%);
    margin: 60px auto;
}

.order-success-card {
    background: #fff;
    padding: 45px 35px;
    border-radius: 18px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.order-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
}

.order-success-card h1 {
    margin: 0 0 12px;
    font-size: 28px;
}

.order-success-card > p {
    margin: 0 0 12px;
    color: #666;
    line-height: 1.6;
}

.order-success-number {
    margin: 22px 0 28px !important;
    padding: 16px;
    background: #f6f6f6;
    border-radius: 10px;
    color: #444 !important;
}

.order-success-number strong {
    color: #222;
    font-size: 18px;
}

.order-success-card .checkout-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    text-decoration: none;
}

/* =========================================
   ORDER SUCCESS MOBILE
   ========================================= */

@media (max-width: 600px) {

    .order-success {
        width: 94%;
        margin: 30px auto;
    }

    .order-success-card {
        padding: 35px 22px;
        border-radius: 16px;
    }

    .order-success-icon {
        width: 64px;
        height: 64px;
        font-size: 30px;
    }

    .order-success-card h1 {
        font-size: 25px;
    }

    .order-success-card .checkout-submit {
        width: 100%;
    }
}

