body, html {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: #fafaf6;
    color: #222;
}

.site-footer {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin: 3rem 0 1rem;  
    padding-bottom: 60px; 
}

.site-footer a {
    color: #666;
    text-decoration: none;
}
.site-footer a:hover {
    text-decoration: underline;
}

/* ヘッダー */
.site-header {
    background: #000000;
    color: #fff;
    padding: 14px 14px;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    margin-left: 5px;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.6em;
    font-weight: 700;
}

.logo img {
    height: 100px;       
    width: auto; 
}

/* ハンバーガーアイコン */
.btn-trigger {
    width: 80px;
    height: 56px;
    position: relative;
    cursor: pointer;
    z-index: 999;
    transform-origin: center center;
    margin-right: 20px;
    overflow: visible;
}

.btn-trigger span {
    height: 8px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    left: 0;
    width: 100%;
    transition: all 0.3s ease-in-out;
}


.btn-trigger span:nth-of-type(1) {
    top: 0;
}
.btn-trigger span:nth-of-type(2) {
    top: 24px;
}
.btn-trigger span:nth-of-type(3) {
    top: 48px;
}

#btn08.active {
    transform: scale(0.8) translateX(-20%);
    transform-origin: center center;
}

#btn08.active {
    padding-right: scale(1.0);
}

#btn08.active span:nth-of-type(1) {
    transform: translateY(24px) rotate(-45deg);
}
#btn08.active span:nth-of-type(2) {
    opacity: 0;
}
#btn08.active span:nth-of-type(3) {
    transform: translateY(-24px) rotate(45deg);
}


/* メニュー */
.nav-menu {
    display: none;
    position: absolute;
    top: 170px;  
    right: 20px; 
    background-color: #111;
    border-radius: 16px;
    padding: 54px 50px; 
    width: 570px; 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.nav-menu li {
    margin: 20px 0;
}

.nav-menu a,
.nav-menu .nav-btn {
    display: block;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: #222;
    padding: 16px;
    border-radius: 10px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.nav-menu a:hover,
.nav-menu .nav-btn:hover {
    background-color: #333;
    transform: scale(1.03);
}

.nav-btn {
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
}

.nav-btn.logout {
    background-color: #25323e;
}

.nav-btn.logout:hover {
    background-color: #070b12;
}

.form-extra {
    margin-top: 16px;
    text-align: center;
}

.password-reset-link {
    font-size: 0.95em;
    color: #555;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.password-reset-link:hover {
    color: #000;
}


.grayed-out {
    opacity: 0.5;
    pointer-events: none;  /* リンク無効化 */
}
.grayed-out h2,
.grayed-out p,
.grayed-out img {
    filter: grayscale(100%);
}

/* main */
.image-carousel {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
    background-color: #f9f9f9;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.carousel-image {
    position: absolute;
    opacity: 0;
    transition: opacity 1s ease;
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.carousel-image.active {
    opacity: 1;
    position: relative;
}

.section {
    max-width: 880px;
    margin: 60px auto;
    padding: 40px 32px;
    border-radius: 20px;
    background: linear-gradient(to bottom right, #fdfdfd, #f4f4f8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    font-family: "Helvetica Neue", "Segoe UI", sans-serif;
    line-height: 1.9;
    color: #333;
}

.section h2, .section h3 {
    font-size: 1.8em;
    font-weight: bold;
    color: #111;
    margin-bottom: 20px;
    /* border-left: 5px solid #2d2643; */
    padding-left: 16px;
}

.section ul {
    padding-left: 20px;
    list-style: disc;
    font-size: 1.1em;
    color: #444;
}

.section p {
    font-size: 1.1em;
    margin-bottom: 16px;
}

.link-section a {
    color: #22193c;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.0em;
    transition: all 0.3s ease;
}

.link-section a:hover {
    color: #1d1441;
    text-decoration: underline;
}

.link-section {
    background: #ffffff;
    border: 1px solid #e5e5ee;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    border-radius: 18px;
}

.product-card-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.product-card-item {
    background: #ffffff;
    border: 1px solid #e5e5ee;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 240px;
    text-align: center;
    transition: transform 0.3s ease;
}

.product-card-item:hover {
    transform: translateY(-5px);
}

.product-card-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.product-name {
    padding: 16px;
    font-size: 1.05em;
    font-weight: 600;
    color: #2d2643;
    font-family: "Helvetica Neue", "Segoe UI", sans-serif;
}

/* 商品一覧 */
.search-container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto 30px;
    text-align: center;

    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, height 0.4s ease;
}

.search-container.visible {
    opacity: 1;
    height: auto;
}

.product-card.fade-out {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card.fade-in {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.sortToggleZone {
  width: 60px;
  height: 48px;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.sortToggleZone.left {
  margin-right: 8px;
}

.sortToggleZone.right {
  margin-left: 8px;
}

#searchBox {
    flex: 1;
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 1.3em;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#searchBox:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.product-card {
    max-width: 100%;
    padding: 12px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
}

.product-card h2 {
    font-size: 1.3em;
    font-weight: 700;
    color: #111;
    margin: 8px 0 10px;
}

.product-card .price {
    font-weight: 700;
    color: #222;
    font-size: 1.0em;
}

/* 商品詳細 */
.product-image img {
    width: 100%;
    max-width: 90%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-name {
    font-size: 1.8em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.price-block {
    text-align: left;
    font-size: 1.3em;
    font-weight: bold;
    color: #222;
    padding-left: 5%;
}

.muted {
    color: #888;
    font-size: 0.9em;
    margin: 10px 0;
    padding-left: 5%;
    padding-bottom: 15px;

}

.description {
    font-size: 1em;
    color: #333;
    margin: 15px 0;
    padding-left: 5%;
    padding-bottom: 10px;

}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 16px 0;
    
}

.fixed-purchase {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ccc;
    padding: 12px 16px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    z-index: 10;
    padding-bottom: 10px;
}

.purchase-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 10px;
}

.stock-label {
    font-size: 0.9em;
    color: #555;
}

.btn-purchase {
    background: #27ae60;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn-purchase:hover {
    background: #219150;
}

.cart-form input[type="number"] {
    width: 80px;              
    height: 44px;             
    font-size: 1.2em;        
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
}

/* カート画面 */
.cart-container {
    padding: 20px 16px;
}

.cart-summary {
    font-weight: 700;
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
}

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

.cart-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.cart-item img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
}

.cart-item-info {
    font-weight: 600;
    font-size: 1.1em;
    color: #222;
}

.btn-cancel {
    background: #8d3025;
    color: white;
    border: none;
    font-size: 1.2em;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 12px;
}

.btn-cancel:hover {
    background: #2a0e0a;
}

.cart-fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.12);
    padding: 16px 20px;
    text-align: center;
    z-index: 2000;
}

.btn-purchase {
    background: #143924;
    color: white;
    font-size: 1.3em;
    padding: 32px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    width: 80%;
}

.btn-purchase:hover {
    background: #219150;
}

#popup-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #052e16;
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#popup-success.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* プロフィール編集フォーム */
.profile-form {
    max-width: 100%;
    padding: 16px 12px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin: 20px auto;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-row label, .form-row.p {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 1.1em;
    color: #333;
}

.form-row input,
.form-row textarea {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #6f6d6d;
    font-size: 1.1em;
    font-family: inherit;
}

.form-errors {
    color: #6f221a;
    font-size: 0.95em;
    margin-top: 6px;
}

input[type="checkbox"] {
    transform: scale(1.5);
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.1em;
    color: #333;
    gap: 8px;
}


hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 28px 0;
}

.btn {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    font-size: 1.1em;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #555;
}

html, body {
    font-size: 32px;
}

main {
    padding: 16px;
}

/* profile */
.profile-container {
    padding: 32px 20px;
    max-width: 90%;
    margin: 0 auto;
}

.profile-title {
    font-size: 2.4em;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: #222;
}

.profile-info-box {
    background: #fff;
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 1.4em;
    margin: 20px 0;
}

.label {
    font-weight: 600;
    color: #555;
}

.value {
    font-weight: 700;
    color: #111;
    word-break: break-word;
    max-width: 60%;
    text-align: right;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

.edit-btn-container {
    text-align: center;
    margin-top: 40px;
}

.profile-edit-btn {
    background: #333;
    color: white;
    font-size: 1.2em;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.profile-edit-btn:hover {
    background: #555;
}

a {
    color: #100533;     
    font-weight: bold;
    text-decoration: none !important;
}

a:hover {
    color: #000 !important;     
    text-decoration: none !important;
}

@media screen and (min-width: 768px) {
    html {
        font-size: 16px; /* タブレット以上は少し戻す */
    }
}

@media screen and (min-width: 1024px) {
    html {
        font-size: 14px;
    }
}
