/* =========== Shop Layout Styles =========== */

/* CSS Variables */
:root {
    /* Colors */
    --shop-primary: #FF4F9A;
    --shop-primary-dark: #E63E8A;
    --shop-text: #333333;
    --shop-text-muted: #666666;
    --shop-text-inverse: #ffffff;
    --shop-border: #e0e0e0;
    --shop-surface: #f5f5f5;
    --shop-surface-elevated: #ffffff;
    --shop-success: #4CAF50;

    /* Spacing */
    --shop-space-1: 4px;
    --shop-space-2: 8px;
    --shop-space-3: 12px;
    --shop-space-4: 16px;
    --shop-space-5: 20px;
    --shop-space-6: 24px;
    --shop-space-8: 32px;
    --shop-space-10: 40px;
    --shop-space-12: 48px;

    /* Border Radius */
    --shop-radius-sm: 4px;
    --shop-radius-md: 8px;
    --shop-radius-lg: 12px;
    --shop-radius-pill: 999px;

    /* Shadows */
    --shop-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shop-shadow-hover: 0 4px 12px rgba(255, 79, 154, 0.2);
    --shop-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Font Sizes */
    --shop-font-sm: 0.875rem;
    --shop-font-base: 1rem;
    --shop-font-lg: 1.125rem;
    --shop-font-xl: 1.5rem;
    --shop-font-2xl: 2rem;

    /* Transitions */
    --shop-transition-base: 0.2s ease-out;
    --shop-transition-slow: 0.3s ease-out;
}

/* Base Styles */
.shop-body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--shop-text);
    background-color: var(--shop-surface);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shop-main {
    flex: 1;
    padding-top: 70px; /* ヘッダー高さ分 */
}

/* Header */
.shop-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--shop-surface-elevated);
    border-bottom: 1px solid var(--shop-border);
    box-shadow: var(--shop-shadow-card);
    z-index: 1000;
    height: 70px;
}

.shop-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--shop-space-4);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--shop-space-6);
}

.shop-logo {
    font-size: var(--shop-font-xl);
    font-weight: 700;
    color: var(--shop-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--shop-transition-base);
}

.shop-logo:hover {
    color: var(--shop-primary-dark);
}

.shop-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--shop-space-4);
}

.shop-header-actions {
    display: flex;
    align-items: center;
    gap: var(--shop-space-4);
}

#shop-user-area {
    display: flex;
    align-items: center;
}

.shop-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--shop-text);
    text-decoration: none;
    border-radius: var(--shop-radius-md);
    transition: background var(--shop-transition-base);
}

.shop-cart-icon:hover {
    background: rgba(255, 79, 154, 0.1);
}

.shop-cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--shop-primary);
    color: var(--shop-text-inverse);
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    padding: 2px 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Hamburger Menu */
.shop-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.shop-hamburger span {
    width: 100%;
    height: 3px;
    background: var(--shop-text);
    border-radius: 2px;
    transition: all var(--shop-transition-base);
}

.shop-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.shop-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.shop-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

/* Footer */
.shop-footer {
    background: var(--shop-text);
    color: var(--shop-text-inverse);
    padding: var(--shop-space-8) var(--shop-space-4);
    margin-top: var(--shop-space-12);
}

.shop-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.shop-footer-nav {
    display: flex;
    justify-content: center;
    gap: var(--shop-space-6);
    margin-bottom: var(--shop-space-4);
    flex-wrap: wrap;
}

.shop-footer-nav a {
    color: var(--shop-text-inverse);
    text-decoration: none;
    transition: opacity var(--shop-transition-base);
}

.shop-footer-nav a:hover {
    opacity: 0.8;
}

.shop-copyright {
    font-size: var(--shop-font-sm);
    opacity: 0.8;
    margin: 0;
}

.shop-footer-legal {
    display: flex;
    justify-content: center;
    gap: var(--shop-space-4);
    margin-bottom: var(--shop-space-4);
    flex-wrap: wrap;
}

.shop-footer-legal a {
    color: var(--shop-text-inverse);
    text-decoration: none;
    font-size: var(--shop-font-sm);
    opacity: 0.7;
    transition: opacity var(--shop-transition-base);
}

.shop-footer-legal a:hover {
    opacity: 1;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--shop-space-4);
}

/* =========== EC Shop Component Styles =========== */

/* Shop Filter */
.shop-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--shop-space-3);
    margin-bottom: var(--shop-space-8);
    justify-content: center;
}

.shop-filter-item {
    padding: var(--shop-space-2) var(--shop-space-5);
    border-radius: var(--shop-radius-pill);
    border: 2px solid var(--shop-border);
    background: var(--shop-surface-elevated);
    color: var(--shop-text);
    text-decoration: none;
    transition: all var(--shop-transition-base);
    font-weight: 500;
}

.shop-filter-item:hover {
    border-color: var(--shop-primary);
    color: var(--shop-primary);
    transform: translateY(-2px);
}

.shop-filter-item.active {
    background: var(--shop-primary);
    border-color: var(--shop-primary);
    color: var(--shop-text-inverse);
}

/* Product Grid */
.shop-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--shop-space-6);
    margin-top: var(--shop-space-8);
}

/* Product Card */
.shop-card {
    background: var(--shop-surface-elevated);
    border-radius: var(--shop-radius-md);
    box-shadow: var(--shop-shadow-card);
    overflow: hidden;
    transition: all var(--shop-transition-base);
    display: flex;
    flex-direction: column;
}

.shop-card:hover {
    box-shadow: var(--shop-shadow-hover);
    transform: translateY(-4px);
}

.shop-card-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--shop-surface);
}

.shop-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--shop-transition-slow);
}

.shop-card:hover .shop-card-image img {
    transform: scale(1.05);
}

.shop-card-info {
    padding: var(--shop-space-4);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-card-title {
    font-size: var(--shop-font-base);
    font-weight: 700;
    margin-bottom: var(--shop-space-2);
    line-height: 1.4;
    color: var(--shop-text);
}

.shop-card-price {
    font-size: var(--shop-font-lg);
    font-weight: 700;
    color: var(--shop-primary);
    margin-top: auto;
}

.shop-card-btn {
    width: 100%;
    padding: var(--shop-space-3);
    background: var(--shop-primary);
    color: var(--shop-text-inverse);
    border: none;
    border-radius: 0 0 var(--shop-radius-md) var(--shop-radius-md);
    font-size: var(--shop-font-base);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--shop-transition-base);
}

.shop-card-btn:hover {
    background: var(--shop-primary-dark);
}

/* Product Detail */
.shop-detail {
    display: flex;
    gap: var(--shop-space-10);
    max-width: 1200px;
    margin: 0 auto;
}

.shop-detail-images {
    flex: 1;
    min-width: 0;
}

.shop-detail-main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--shop-radius-md);
    overflow: hidden;
    background: var(--shop-surface);
    box-shadow: var(--shop-shadow-card);
    margin-bottom: var(--shop-space-4);
}

.shop-detail-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-detail-thumbnails {
    display: flex;
    gap: var(--shop-space-3);
    flex-wrap: wrap;
}

.shop-detail-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--shop-radius-sm);
    overflow: hidden;
    border: 2px solid var(--shop-border);
    cursor: pointer;
    transition: all var(--shop-transition-base);
    padding: 0;
    background: var(--shop-surface);
}

.shop-detail-thumbnail:hover {
    border-color: var(--shop-primary);
    transform: scale(1.05);
}

.shop-detail-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-detail-info {
    flex: 1;
    min-width: 0;
}

.shop-detail-title {
    font-size: var(--shop-font-2xl);
    font-weight: 700;
    color: var(--shop-text);
    margin-bottom: var(--shop-space-4);
    line-height: 1.3;
}

.shop-detail-price {
    font-size: var(--shop-font-xl);
    font-weight: 700;
    color: var(--shop-primary);
    margin-bottom: var(--shop-space-6);
}

.shop-detail-description {
    font-size: var(--shop-font-base);
    line-height: 1.8;
    color: var(--shop-text);
    margin-bottom: var(--shop-space-6);
}

.shop-detail-description h1,
.shop-detail-description h2,
.shop-detail-description h3 {
    margin-top: var(--shop-space-6);
    margin-bottom: var(--shop-space-3);
    color: var(--shop-text);
}

.shop-detail-description p {
    margin-bottom: var(--shop-space-4);
}

.shop-detail-description ul,
.shop-detail-description ol {
    margin-bottom: var(--shop-space-4);
    padding-left: var(--shop-space-6);
}

.shop-quantity-select {
    padding: var(--shop-space-3) var(--shop-space-4);
    border: 2px solid var(--shop-border);
    border-radius: var(--shop-radius-sm);
    font-size: var(--shop-font-base);
    background: var(--shop-surface-elevated);
    color: var(--shop-text);
    cursor: pointer;
    transition: border-color var(--shop-transition-base);
}

.shop-quantity-select:hover,
.shop-quantity-select:focus {
    border-color: var(--shop-primary);
    outline: none;
}

.shop-add-to-cart-btn {
    width: 100%;
    padding: var(--shop-space-4) var(--shop-space-6);
    background: var(--shop-primary);
    color: var(--shop-text-inverse);
    border: none;
    border-radius: var(--shop-radius-sm);
    font-size: var(--shop-font-lg);
    font-weight: 700;
    cursor: pointer;
    margin-top: var(--shop-space-6);
    transition: all var(--shop-transition-base);
}

.shop-add-to-cart-btn:hover {
    background: var(--shop-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shop-shadow-hover);
}

/* Cart Badge (compatibility with cart.js) */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--shop-primary);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    padding: 2px 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Cart Page */
.cart-page {
    max-width: 900px;
    margin: 0 auto;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--shop-space-4);
    margin-bottom: var(--shop-space-8);
}

.cart-item {
    background: white;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius-lg);
    padding: var(--shop-space-4);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--shop-space-4);
    align-items: center;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: var(--shop-space-1);
}

.cart-item-name {
    font-size: var(--shop-font-lg);
    font-weight: 600;
    color: var(--shop-text);
    text-decoration: none;
    transition: color var(--shop-transition-base);
}

.cart-item-name:hover {
    color: var(--shop-primary);
}

.cart-item-price {
    font-size: var(--shop-font-base);
    color: var(--shop-text-muted);
    margin: 0;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: var(--shop-space-4);
}

.cart-item-quantity {
    display: flex;
    flex-direction: column;
}

.cart-quantity-input {
    width: 70px;
    padding: var(--shop-space-2);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius-md);
    font-size: var(--shop-font-base);
    text-align: center;
}

.cart-item-subtotal {
    text-align: right;
    min-width: 100px;
}

.cart-item-remove {
    padding: var(--shop-space-2) var(--shop-space-3);
    background: transparent;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius-md);
    color: var(--shop-text-muted);
    cursor: pointer;
    font-size: var(--shop-font-sm);
    transition: all var(--shop-transition-base);
}

.cart-item-remove:hover {
    background: #FFEBEE;
    border-color: #EF5350;
    color: #C62828;
}

.cart-summary {
    background: var(--shop-surface);
    padding: var(--shop-space-6);
    border-radius: var(--shop-radius-lg);
    position: sticky;
    top: calc(70px + var(--shop-space-4));
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--shop-space-4) 0;
    border-bottom: 2px solid var(--shop-border);
    margin-bottom: var(--shop-space-4);
}

.checkout-btn {
    width: 100%;
    padding: var(--shop-space-4);
    background: var(--shop-primary);
    color: white;
    border: none;
    border-radius: var(--shop-radius-lg);
    font-size: var(--shop-font-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--shop-transition-base);
}

.checkout-btn:hover {
    background: var(--shop-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shop-shadow-hover);
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Checkout Success/Cancel Pages */
.checkout-success,
.checkout-cancel {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: var(--shop-space-8);
    border-radius: var(--shop-radius-lg);
    box-shadow: var(--shop-shadow-md);
}

/* =========== Legal Page Styles =========== */

.legal-page {
    max-width: 800px;
    margin: 0 auto;
    background: var(--shop-surface-elevated);
    padding: var(--shop-space-8);
    border-radius: var(--shop-radius-lg);
    box-shadow: var(--shop-shadow-card);
}

.legal-page h1 {
    font-size: var(--shop-font-2xl);
    font-weight: 700;
    color: var(--shop-primary);
    margin-bottom: var(--shop-space-6);
    padding-bottom: var(--shop-space-4);
    border-bottom: 2px solid var(--shop-border);
}

.legal-page h2 {
    font-size: var(--shop-font-xl);
    font-weight: 700;
    color: var(--shop-text);
    margin-top: var(--shop-space-8);
    margin-bottom: var(--shop-space-4);
}

.legal-page p {
    line-height: 1.8;
    margin-bottom: var(--shop-space-4);
    color: var(--shop-text);
}

.legal-page ul,
.legal-page ol {
    margin-bottom: var(--shop-space-4);
    padding-left: var(--shop-space-6);
    line-height: 1.8;
}

.legal-page li {
    margin-bottom: var(--shop-space-2);
}

.legal-page table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--shop-space-6);
}

.legal-page th,
.legal-page td {
    padding: var(--shop-space-3) var(--shop-space-4);
    border: 1px solid var(--shop-border);
    text-align: left;
    line-height: 1.6;
}

.legal-page th {
    background: var(--shop-surface);
    font-weight: 500;
    white-space: nowrap;
    width: 180px;
}

.legal-page a {
    color: var(--shop-primary);
    text-decoration: underline;
    transition: color var(--shop-transition-base);
}

.legal-page a:hover {
    color: var(--shop-primary-dark);
}

.legal-page .legal-date {
    text-align: right;
    font-size: var(--shop-font-sm);
    color: var(--shop-text-muted);
    margin-bottom: var(--shop-space-6);
}

/* =========== Responsive Styles =========== */

@media (max-width: 768px) {
    .shop-main {
        padding-top: 60px;
    }

    .shop-header {
        height: 60px;
    }

    .shop-logo {
        font-size: var(--shop-font-lg);
    }

    .shop-hamburger {
        display: flex;
    }

    .shop-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--shop-space-4);
    }

    .shop-detail {
        flex-direction: column;
        gap: var(--shop-space-6);
    }

    .shop-detail-thumbnails {
        justify-content: center;
    }

    .shop-filter {
        justify-content: flex-start;
    }

    .shop-filter-item {
        padding: var(--shop-space-2) var(--shop-space-3);
        font-size: var(--shop-font-sm);
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: var(--shop-space-3);
    }

    .cart-item-controls {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .cart-summary {
        position: static;
    }
}

/* =========== Order Management Styles =========== */

.order-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.order-status-paid {
    background: #E3F2FD;
    color: #1565C0;
}

.order-status-preparing {
    background: #FFF3E0;
    color: #E65100;
}

.order-status-shipped {
    background: #E8F5E9;
    color: #2E7D32;
}

.order-status-delivered {
    background: #F3E5F5;
    color: #6A1B9A;
}

.order-status-cancelled {
    background: #FFEBEE;
    color: #C62828;
}

.order-filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.order-filter-tab {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--shop-border);
    text-decoration: none;
    color: var(--shop-text);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.order-filter-tab:hover {
    border-color: var(--shop-primary);
}

.order-filter-tab.active {
    background: var(--shop-primary);
    color: #fff;
    border-color: var(--shop-primary);
}

.order-detail-section {
    margin-bottom: 24px;
}

.order-detail-section h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--shop-text);
}

.order-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.order-detail-item label {
    font-size: 0.8rem;
    color: var(--shop-text-muted);
    display: block;
    margin-bottom: 2px;
}

.order-detail-item span {
    font-size: 0.95rem;
}

.order-items-table {
    width: 100%;
}

/* =========== Authentication UI Styles =========== */

/* Login Page */
.shop-login-page {
    max-width: 480px;
    margin: var(--shop-space-12) auto;
    padding: 0 var(--shop-space-4);
}

.shop-login-card {
    background: var(--shop-surface-elevated);
    border-radius: var(--shop-radius-lg);
    box-shadow: var(--shop-shadow-md);
    padding: var(--shop-space-8);
}

.shop-login-card h1 {
    font-size: var(--shop-font-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--shop-space-6);
    color: var(--shop-text);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: var(--shop-space-2);
    margin-bottom: var(--shop-space-6);
    border-bottom: 2px solid var(--shop-border);
}

.auth-tab {
    flex: 1;
    padding: var(--shop-space-3) var(--shop-space-4);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--shop-text-muted);
    font-size: var(--shop-font-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--shop-transition-base);
    margin-bottom: -2px;
}

.auth-tab:hover {
    color: var(--shop-text);
}

.auth-tab.active {
    color: var(--shop-primary);
    border-bottom-color: var(--shop-primary);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--shop-space-4);
}

.auth-form label {
    font-size: var(--shop-font-sm);
    font-weight: 500;
    color: var(--shop-text);
    margin-bottom: calc(var(--shop-space-1) * -1);
}

.auth-form input {
    padding: var(--shop-space-3);
    border: 2px solid var(--shop-border);
    border-radius: var(--shop-radius-sm);
    font-size: var(--shop-font-base);
    transition: border-color var(--shop-transition-base);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--shop-primary);
}

.auth-submit-btn {
    padding: var(--shop-space-4);
    background: var(--shop-primary);
    color: var(--shop-text-inverse);
    border: none;
    border-radius: var(--shop-radius-sm);
    font-size: var(--shop-font-base);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--shop-transition-base);
    margin-top: var(--shop-space-2);
}

.auth-submit-btn:hover {
    background: var(--shop-primary-dark);
    transform: translateY(-2px);
}

/* Auth Messages */
.auth-error {
    padding: var(--shop-space-3);
    background: #FFEBEE;
    color: #C62828;
    border-radius: var(--shop-radius-sm);
    font-size: var(--shop-font-sm);
    margin-top: var(--shop-space-4);
}

.auth-success {
    padding: var(--shop-space-3);
    background: #E8F5E9;
    color: #2E7D32;
    border-radius: var(--shop-radius-sm);
    font-size: var(--shop-font-sm);
    margin-top: var(--shop-space-4);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: var(--shop-space-6) 0;
    color: var(--shop-text-muted);
    font-size: var(--shop-font-sm);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--shop-border);
}

.auth-divider span {
    padding: 0 var(--shop-space-4);
}

/* Social Login Buttons */
.auth-social-btn {
    width: 100%;
    padding: var(--shop-space-3);
    border: 2px solid var(--shop-border);
    border-radius: var(--shop-radius-sm);
    background: var(--shop-surface-elevated);
    color: var(--shop-text);
    font-size: var(--shop-font-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--shop-transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--shop-space-2);
}

.auth-social-btn:hover {
    border-color: var(--shop-text);
    transform: translateY(-2px);
}

/* User Dropdown */
.shop-user-dropdown {
    position: relative;
}

.shop-user-btn {
    display: flex;
    align-items: center;
    gap: var(--shop-space-2);
    padding: var(--shop-space-2) var(--shop-space-3);
    background: transparent;
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius-md);
    color: var(--shop-text);
    cursor: pointer;
    transition: all var(--shop-transition-base);
    font-size: var(--shop-font-sm);
}

.shop-user-btn:hover {
    background: rgba(255, 79, 154, 0.1);
    border-color: var(--shop-primary);
}

.shop-user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-user-menu {
    position: absolute;
    top: calc(100% + var(--shop-space-2));
    right: 0;
    background: var(--shop-surface-elevated);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius-md);
    box-shadow: var(--shop-shadow-md);
    min-width: 200px;
    z-index: 100;
}

.shop-user-menu a,
.shop-user-menu button {
    display: block;
    width: 100%;
    padding: var(--shop-space-3) var(--shop-space-4);
    text-align: left;
    text-decoration: none;
    color: var(--shop-text);
    border: none;
    background: transparent;
    font-size: var(--shop-font-sm);
    cursor: pointer;
    transition: background var(--shop-transition-base);
}

.shop-user-menu a:hover,
.shop-user-menu button:hover {
    background: rgba(255, 79, 154, 0.1);
}

.shop-user-menu a:first-child {
    border-radius: var(--shop-radius-md) var(--shop-radius-md) 0 0;
}

.shop-user-menu button:last-child {
    border-radius: 0 0 var(--shop-radius-md) var(--shop-radius-md);
    border-top: 1px solid var(--shop-border);
    color: #C62828;
}

/* Login Link */
.shop-login-link {
    padding: var(--shop-space-2) var(--shop-space-4);
    color: var(--shop-primary);
    text-decoration: none;
    border: 1px solid var(--shop-primary);
    border-radius: var(--shop-radius-md);
    font-size: var(--shop-font-sm);
    font-weight: 500;
    transition: all var(--shop-transition-base);
    display: inline-block;
}

.shop-login-link:hover {
    background: var(--shop-primary);
    color: var(--shop-text-inverse);
}

/* Responsive Adjustments for Auth UI */
@media (max-width: 768px) {
    .shop-user-name {
        display: none;
    }

    .shop-user-btn {
        padding: var(--shop-space-2);
    }

    .legal-page {
        padding: var(--shop-space-4);
    }

    .legal-page h1 {
        font-size: var(--shop-font-xl);
    }

    .legal-page th {
        width: auto;
        white-space: normal;
    }

    .shop-footer-legal {
        gap: var(--shop-space-3);
    }
}

/* =========== Inventory / Sold Out Styles =========== */

/* 売り切れバッジ */
.shop-sold-out-badge {
    position: absolute;
    top: var(--shop-space-3);
    left: var(--shop-space-3);
    background: #e53e3e;
    color: white;
    padding: var(--shop-space-1) var(--shop-space-3);
    border-radius: var(--shop-radius-md);
    font-size: var(--shop-font-sm);
    font-weight: 700;
    z-index: 1;
}

/* 売り切れカードの画像を薄くする */
.shop-card--sold-out .shop-card-image img {
    opacity: 0.5;
}

/* 売り切れ価格テキスト */
.shop-price-sold-out {
    color: #e53e3e;
    font-weight: 700;
}

/* 無効化ボタン */
.shop-card-btn--disabled,
.shop-add-to-cart-btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--shop-text-muted);
}

/* 在庫情報テキスト */
.shop-stock-info {
    color: var(--shop-text-muted);
    font-size: var(--shop-font-sm);
    margin-top: var(--shop-space-2);
}
